Xlib: extension "RANDR" Missing


#1

I have just come back to using the GoPiGo after some time. I had it running fine, but now I am having difficulty. It starts up and I can VNC in via http://dex.local. When I attempt to run the demo or tests and troubleshooting, i get…

xlib: extension “RANDR” missing on display “:1.0”.
Must be connected to a terminal.

I am using the the image downloaded from Dexter Industries - Raspian for Robots. The follwing log file is created. Can you provide some assitance?

Check space left

Filesystem Size Used Avail Use% Mounted on
/dev/root 7.1G 2.9G 4.0G 43% /
devtmpfs 428M 0 428M 0% /dev
tmpfs 87M 444K 86M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 173M 0 173M 0% /run/shm
/dev/mmcblk0p1 56M 20M 37M 36% /boot

Check for dependencies

python 2.7.3-4+deb7u1 install ok installed
python-pip 1.1-3 install ok installed
git 1:1.7.10.4-1+wheezy1+rpi2 install ok installed
libi2c-dev 3.1.1+svn-1 install ok installed
python-serial 2.5-2.1 install ok installed
python-rpi.gpio 0.6.1~wheezy-1 install ok installed
i2c-tools 3.1.1+svn-1 install ok installed
python-smbus 3.1.1+svn-1 install ok installed
arduino 1:1.0.1+dfsg-7 install ok installed
minicom 2.6.1-1 install ok installed
scratch 1.4.20131203-2 install ok installed

wiringPi Found
wiringPi Found
I2C already removed from blacklist
SPI already removed from blacklist

Check for addition in /modules

I2C-dev already there
i2c-bcm2708 already there
spi-dev already there

Hardware revision

gpio version: 2.26
Copyright © 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
Type: Model 2, Revision: 1.1, Memory: 1024MB, Maker: Sony

Check the /dev folder

i2c-1
spidev0.0
spidev0.1
ttyAMA0

USB device status

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/5p, 480M
|__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
|__ Port 3: Dev 4, If 0, Class=vend., Driver=rt2800usb, 480M

Checking for Atmega chip

avrdude: Version 5.10, compiled on Jun 18 2012 at 12:38:29
Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright © 2007-2009 Joerg Wunsch

     System wide configuration file is "/etc/avrdude.conf"
     User configuration file is "/root/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : unknown
     Using Programmer              : gpio
     AVR Part                      : ATMEGA328P
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PC2
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : GPIO
     Description     : Use sysfs interface to bitbang GPIO lines

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f

avrdude done. Thank you.

Checking I2C bus for devices

Checking I2C bus 0

Error: Could not open file /dev/i2c-0’ or/dev/i2c/0’: No such file or directory

Checking I2C bus 1

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

Checking for firmware version and CPU Speed and Voltage

v -1
CPU speed: -1
-1 V

CHECKING ENCODER READINGS
-1 -1
Both motors moving Forward with LED On
after 5 sec 0 0
Both motors stopped with LED Off
None after stop cmd 0 0
None after 2 more sec 0 0
Both motors moving back with LED On
after 5 sec 0 0
Both motors stopped with LED Off
None after stop cmd 0 0
None after 2 more sec 0 0

CHECKING ENCODER TARGETING

Initial encoder read vals: 0 0
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
FAIL
Final encoder read vals: 0 0

Initial encoder read vals: 0 0
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
FAIL
Final encoder read vals: 0 0

Initial encoder read vals: 0 0
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
FAIL
Final encoder read vals: 0 0

Initial encoder read vals: 0 0
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
FAIL
Final encoder read vals: 0 2

Initial encoder read vals: 0 0
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
Enc tgt Status: 1
FAIL
Final encoder read vals: 0 0


#2

It looks like you’re not getting a response from your GoPiGo. What version of the GoPiGo are you using? And to double check, how are you powering the GoPiGo and Pi?


#3

USing GoPiGo 2. I am powering through the GoPiGo board with the 8 AA Battery pack.


#4

After updating Dexter software and updating hardware, I tried again and got the same error. I then hooked up HDMI, Mouse, and Keyboard to see what would happen if I ran directly on the Pi rather than using VCN. The RANDR error does not appear but I still have no access to the GoPiGo board. Troubleshooting gives different results when working directly on the Pi. Here is the log…

Check space left

Filesystem Size Used Avail Use% Mounted on
/dev/root 7.1G 2.9G 4.0G 43% /
devtmpfs 428M 0 428M 0% /dev
tmpfs 87M 480K 86M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 173M 0 173M 0% /run/shm
/dev/mmcblk0p1 56M 20M 37M 36% /boot

Check for dependencies

python 2.7.3-4+deb7u1 install ok installed
python-pip 1.1-3 install ok installed
git 1:1.7.10.4-1+wheezy1+rpi2 install ok installed
libi2c-dev 3.1.1+svn-1 install ok installed
python-serial 2.5-2.1 install ok installed
python-rpi.gpio 0.6.1~wheezy-1 install ok installed
i2c-tools 3.1.1+svn-1 install ok installed
python-smbus 3.1.1+svn-1 install ok installed
arduino 1:1.0.1+dfsg-7 install ok installed
minicom 2.6.1-1 install ok installed
scratch 1.4.20131203-2 install ok installed

wiringPi Found
wiringPi Found
I2C already removed from blacklist
SPI already removed from blacklist

Check for addition in /modules

I2C-dev already there
i2c-bcm2708 already there
spi-dev already there

Hardware revision

gpio version: 2.31
Copyright © 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
Type: Pi 2, Revision: 01, Memory: 1024MB, Maker: Sony
Device tree is enabled.
This Raspberry Pi supports user-level GPIO access.
-> See the man-page for more details

Check the /dev folder

i2c-1
spidev0.0
spidev0.1
ttyAMA0

USB device status

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 005: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 006: ID 04f2:0841 Chicony Electronics Co., Ltd

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/5p, 480M
|__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
|__ Port 2: Dev 4, If 0, Class=HID, Driver=usbhid, 1.5M
|__ Port 3: Dev 5, If 0, Class=vend., Driver=rt2800usb, 480M
|__ Port 5: Dev 6, If 0, Class=HID, Driver=usbhid, 1.5M
|__ Port 5: Dev 6, If 1, Class=HID, Driver=usbhid, 1.5M

Checking for Atmega chip

avrdude: Version 5.10, compiled on Jun 18 2012 at 12:38:29
Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright © 2007-2009 Joerg Wunsch

     System wide configuration file is "/etc/avrdude.conf"
     User configuration file is "/root/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : unknown
     Using Programmer              : gpio
     AVR Part                      : ATMEGA328P
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PC2
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : GPIO
     Description     : Use sysfs interface to bitbang GPIO lines

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f

avrdude done. Thank you.

Checking I2C bus for devices

Checking I2C bus 0

Error: Could not open file /dev/i2c-0’ or/dev/i2c/0’: No such file or directory

Checking I2C bus 1

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

Checking for firmware version and CPU Speed and Voltage

v -1
CPU speed: -1
-1 V

CHECKING ENCODER READINGS
-1 -1
Both motors moving Forward with LED On
after 5 sec -1 -1
Both motors stopped with LED Off
-1 after stop cmd -1 -1
-1 after 2 more sec -1 -1
Both motors moving back with LED On
after 5 sec -1 -1
Both motors stopped with LED Off
-1 after stop cmd -1 -1
-1 after 2 more sec -1 -1

CHECKING ENCODER TARGETING

Initial encoder read vals: -1 -1
Traceback (most recent call last):
File “/home/pi/Desktop/GoPiGo/Software/Python/tests/enc_tgt_test.py”, line 69, in <module>
enc_stat=read_enc_status()
File “build/bdist.linux-armv7l/egg/gopigo.py”, line 521, in read_enc_status
File “build/bdist.linux-armv7l/egg/gopigo.py”, line 513, in read_status
IOError: [Errno 5] Input/output error


#5

Just ran GoPiGo Demo again, and noticed that LEDs do cycle as indicated in the Demo, but no motor activity.


#6

Problem solved after some careful troubleshooting. Once I noticed the LEDs were working, I decided to test the motors with another driver board. I found that one motor was not working. I tested continuity on the leads and they were good, but there was no continuity across the leads. I disassembled the motor and found that one of the copper strips leading from the motor brushes had broken inside the motor housing. Can’t figure out that could have possibly happened. Must have been a manufacturing defect. I removed the brush and strip and soldered a new lead on. I modified the terminal block on the motor to accept my new lead and reassembled the motor. Motor now works and GoPiGo is not throwing any errors.

QUESTION: Why would a defective motor throw the error indicated above?


#7

Hey dwphoto, thanks for the update. I’m sorry to hear about the motor, and sorry to hear that was the source of the problem.

I can’t think of why the motor would cause a software problem; they’re pretty well disconnected. It may have been shorting out the motor chip, causing the problem.

In your troublshooting script paste, it looksl ike you’re still not getting an I2C response from the board though. If you run sudo i2cdetect -y 1 in your terminal, what do you get back? You should see a response back from the board in the I2C response.


#8

All seems to be good there as well now.

pi@raspberrypi:~ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: 70 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- pi@raspberrypi:~


#9

Ok, great to hear. I’m going to close the issue, glad it’s working now!