b99
Posts: 10
Joined: Mon Jun 11, 2018 10:45 am

VNC suddenly not working.

Mon Jun 11, 2018 11:15 am

This is my first post and let me begin by thanking the creators of Pi for their awesome product and to all the members of the community for creating the support environment.

I am a proud new owner of a Raspberry Pi 3 B+ running the latest version of Raspbian Stretch. I'm set it up and am running it headless. I've set up Pi-hole which seems to be running fine.

Initially I set up VNC and was able to access the desktop via VNC.

I then found I was unable to connect and this is what I found in the log:
/var/log/syslog
Jun 11 06:47:53 raspberrypi systemd[1]: Reloading.
Jun 11 06:47:53 raspberrypi systemd[1]: Started VNC Server in Service Mode daemon.
Jun 11 06:47:53 raspberrypi vncserver-x11[11303]: ServerManager: Server started
Jun 11 06:47:53 raspberrypi vncserver-x11[11303]: ConsoleDisplay: Cannot find a running X server on vt1
Jun 11 06:47:53 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:47:58 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:48:03 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:48:08 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:48:13 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:48:18 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:48:23 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:48:28 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:48:33 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:48:38 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:48:43 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:48:48 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:48:53 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:48:58 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:49:03 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:49:08 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:49:13 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:49:18 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:49:23 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:49:28 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:49:33 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:49:38 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:49:43 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:49:48 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent
Jun 11 06:49:53 raspberrypi vncserver-x11[11303]: AgentInitCheck: agent comms failure
Jun 11 06:49:58 raspberrypi vncserver-x11[11303]: AgentInitCheck: no response from agent


That continues every five seconds until I disable VNC in raspi-config.


Shorty before VNC stopped working, I rebooted the router that the Pi is plugged in to.

I've since restarted Pi via shutdown -r now and shutdown -h now, and rebooted the router. The error persists.

Does anyone know what the problem is?

User avatar
sconemad
Posts: 230
Joined: Thu Apr 28, 2016 1:47 pm
Location: Cambridge, UK
Contact: Website

Re: VNC suddenly not working.

Mon Jun 11, 2018 2:25 pm

Is your Pi set to boot to desktop? This is normally required for VNC to work, although you can get around this by enabling experimental direct capture mode, see here for how to do this from the command line:
https://support.realvnc.com/knowledgeba ... mmand-line

b99
Posts: 10
Joined: Mon Jun 11, 2018 10:45 am

Re: VNC suddenly not working.

Mon Jun 11, 2018 7:15 pm

sconemad wrote:
Mon Jun 11, 2018 2:25 pm
Is your Pi set to boot to desktop? This is normally required for VNC to work, although you can get around this by enabling experimental direct capture mode, see here for how to do this from the command line:
https://support.realvnc.com/knowledgeba ... mmand-line
Thanks for your reply.

My Pi is set to boot to CL. I did, however, manage to VNC directly to desktop during my initial set up.

I followed the instructions in the link you provided and that did clear up the errors, but now there are new ones:
Jun 11 10:50:30 raspberrypi systemd[1]: Started VNC Server in Service Mode daemon.
Jun 11 10:50:31 raspberrypi vncserver-x11[13922]: ServerManager: Server started
Jun 11 10:50:31 raspberrypi vncserver-x11[13922]: ConsoleDisplay: Cannot find a running X server on vt1
Jun 11 10:50:31 raspberrypi kernel: [78678.821724] input: vnc-keyboard as /devices/virtual/input/input0
Jun 11 10:50:31 raspberrypi kernel: [78678.821882] input: vnc-abspointer as /devices/virtual/input/input1
Jun 11 10:50:31 raspberrypi kernel: [78678.822098] input: vnc-relpointer as /devices/virtual/input/input2
Jun 11 10:50:31 raspberrypi vncserver-x11[13922]: Agent: SServerAgent: Unknown parameter 'UseXFixes'
Jun 11 10:50:31 raspberrypi vncserver-x11[13922]: Agent: SServerAgent: Unknown parameter 'CaptureMethod'
Jun 11 10:50:31 raspberrypi systemd-udevd[13955]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
Jun 11 10:50:31 raspberrypi systemd-udevd[13952]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
Jun 11 10:50:31 raspberrypi systemd-udevd[13947]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
Jun 11 10:50:31 raspberrypi systemd-udevd[13946]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
Jun 11 10:50:31 raspberrypi systemd-udevd[13948]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
Jun 11 10:50:31 raspberrypi systemd-udevd[13954]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.

Now when I VNC into Pi I get a CL prompt to log in. When I type startx I get similar errors to above.
X.Org X Server 1.19.2
Release Date: 2017-03-02
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.9.41-v7+ armv7l Raspbian
Current Operating System: Linux raspberrypi 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l
Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=7d2d3bc7-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
Build Date: 18 October 2017 04:55:30PM
xorg-server 2:1.19.2-1+rpt1+deb9u2 (https://www.debian.org/support)
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/xx/.local/share/xorg/Xorg.0.log", Time: Mon Jun 11 15:05:43 2018
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/home/xx/.local/share/xorg/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console
Here's the log file mentioned:

Code: Select all

[ 93990.321]
X.Org X Server 1.19.2
Release Date: 2017-03-02
[ 93990.321] X Protocol Version 11, Revision 0
[ 93990.321] Build Operating System: Linux 4.9.41-v7+ armv7l Raspbian
[ 93990.321] Current Operating System: Linux raspberrypi 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l
[ 93990.322] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=7d2d3bc7-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[ 93990.322] Build Date: 18 October 2017  04:55:30PM
[ 93990.322] xorg-server 2:1.19.2-1+rpt1+deb9u2 (https://www.debian.org/support)
[ 93990.322] Current version of pixman: 0.34.0
[ 93990.322]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[ 93990.322] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 93990.323] (==) Log file: "/home/r/.local/share/xorg/Xorg.0.log", Time: Mon Jun 11 15:05:43 2018
[ 93990.323] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 93990.324] (==) No Layout section.  Using the first Screen section.
[ 93990.324] (==) No screen section available. Using defaults.
[ 93990.324] (**) |-->Screen "Default Screen Section" (0)
[ 93990.324] (**) |   |-->Monitor "<default monitor>"
[ 93990.325] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
[ 93990.325] (**) |   |-->Device "Allwinner A10/A13 FBDEV"
[ 93990.325] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[ 93990.325] (==) Automatically adding devices
[ 93990.325] (==) Automatically enabling devices
[ 93990.326] (==) Automatically adding GPU devices
[ 93990.326] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 93990.326] (WW) The directory "/usr/share/fonts/X11/misc" does not exist.
[ 93990.326]    Entry deleted from font path.
[ 93990.326] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 93990.326]    Entry deleted from font path.
[ 93990.326] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 93990.326]    Entry deleted from font path.
[ 93990.326] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 93990.326]    Entry deleted from font path.
[ 93990.326] (==) FontPath set to:
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        built-ins
[ 93990.326] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 93990.326] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 93990.326] (II) Loader magic: 0x1fbf40
[ 93990.326] (II) Module ABI versions:
[ 93990.326]    X.Org ANSI C Emulation: 0.4
[ 93990.326]    X.Org Video Driver: 23.0
[ 93990.326]    X.Org XInput driver : 24.1
[ 93990.327]    X.Org Server Extension : 10.0
[ 93990.336] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c13
[ 93990.337] (II) no primary bus or device found
[ 93990.337] (II) LoadModule: "glx"
[ 93990.337] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 93990.341] (II) Module glx: vendor="X.Org Foundation"
[ 93990.341]    compiled for 1.19.2, module version = 1.0.0
[ 93990.341]    ABI class: X.Org Server Extension, version 10.0
[ 93990.341] (II) LoadModule: "fbturbo"
[ 93990.341] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so
[ 93990.341] (II) Module fbturbo: vendor="X.Org Foundation"
[ 93990.341]    compiled for 1.19.2, module version = 0.5.1
[ 93990.341]    Module class: X.Org Video Driver
[ 93990.341]    ABI class: X.Org Video Driver, version 23.0
[ 93990.341] (II) FBTURBO: driver for framebuffer: fbturbo
[ 93990.341] (EE)
Fatal server error:
[ 93990.341] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[ 93990.342] (EE)
[ 93990.342] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[ 93990.342] (EE) Please also check the log file at "/home/r/.local/share/xorg/Xorg.0.log" for additional information.
[ 93990.342] (EE)
[ 93990.342] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[ 93990.342] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[ 93990.344] (EE) Server terminated with error (1). Closing log file.

Finally, I can get in to the desktop from the VNC CL via sudo startx but without sudo I get the above errors.

What's going on?

b99
Posts: 10
Joined: Mon Jun 11, 2018 10:45 am

Re: VNC suddenly not working.

Thu Jun 14, 2018 12:02 pm

Bump.

I'm considering restarting from scratch.

User avatar
sconemad
Posts: 230
Joined: Thu Apr 28, 2016 1:47 pm
Location: Cambridge, UK
Contact: Website

Re: VNC suddenly not working.

Fri Jun 15, 2018 10:14 am

This new issue you're seeing looks the same as this one: viewtopic.php?t=171843
Have you updated the packages on your system to the latest versions?

b99
Posts: 10
Joined: Mon Jun 11, 2018 10:45 am

Re: VNC suddenly not working.

Fri Jun 15, 2018 11:56 am

I saw that thread and it does seem similar, though they are discussing Jessie and I'm running Stretch, not that I'm certain that makes a difference.
Also, I'm running headless, they are not.

I tried

Code: Select all

sudo apt-get install xserver-xorg-legacy
from the last post in that thread and it did not work, so I removed it.

I only installed Stretch about a week ago so it should be fairly updated. I've also run apt-get upgrade and update. Are there any packages that need to be updated individually?

Return to “Troubleshooting”