Solved

Ubuntu 16.04 black screen after VNC'ing in

Posted on 2016-10-18
5
24 Views
Last Modified: 2016-11-12
Ubuntu 16.04, x11vnc installed. When I try to VNC into my machine (tightvnc from a Win10 or a Win7 machine) and it's been more than say 15-30 minutes after the machine has booted I cannot.

I can ssh in fine and reboot the machine, then I can VNC in. I've checked processes and VNC is running. I've tried to VNC in from several machines, doesn't matter. I've check all the power settings I know and turned them all off. I've tried the function keys to move to a different desktop (although ultimately I want to VNC into the same desktop I usually work in) and that does nothing either.

What's going on here? Any help is appreciated.

Update 1: When I'm VNC'ing in, I'm doing so over a VPN tunnel.

Update 2: Results of checking xsession errors-

    sudo cat /home/<username>/.xsession-errors 
    openConnection: connect: No such file or directory
    cannot connect to brltty at :0

Open in new window


Update 3: Looking at display information from lshw gives me:

   
  *-display
            description: VGA compatible controller
            product: GF119 [NVS 310]
            vendor: NVIDIA Corporation
            physical id: 0
            bus info: pci@0000:02:00.0
            version: a1
            width: 64 bits
            clock: 33MHz
            capabilities: vga_controller bus_master cap_list rom
            configuration: driver=nouveau latency=0

Open in new window


I am using nouveau drivers since I had so many problems with the official Nvidia drivers.

Update 4: I went idle for about an hour on the VNC connection and didn't disconnect so I'm not experiencing a timeout issue once I'm connected, at least so far.

Update 5: When I grep for VNC in my processes I have two very similar entries as shown below:

    root       1341  0.0  0.0  97748  6944 ?        Ss   10:43   0:00 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
    root       1348  2.0  0.7 169176 61264 ?        S    10:43   6:14 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared

Open in new window


Update 6: I left my VNC connection up for several hours, idle, and it never disconnected. I'm not sure what other logs to check. The xsession error file gave me one error message but no dates or times to go on.

Update 7: So I think I'm running into this bug: https://bugs.launchpad.net/ubuntu/+source/light-locker/+bug/1287171 but I'd like some confirmation from someone else.

Additional information: -Using light locker as my screen saver/lock screen program -Running dual monitors: Ubuntu on one screen and a Win 10 VM on the other -Using noveau drivers -I do want to VNC into my current screen, not another blank workspace

Update 8: The more I'm reading through this bug report the more I'm thinking it doesn't address my situation because I'm not switching users. I'd like to stay on the same user. One of the workarounds is tricking the account into unlocking remotely which I'll have to try if that is the issue. I haven't left my computer unlocked then tried to VNC into it.

Update 9: I've VNC'd in after a reboot and my machine has been on the lock screen. This makes me think it's not related to the bug previously linked.

Update 10: I locked my machine and left it for approx 45 minutes. When I came back I had a black screen on both monitors (I run dual monitors). My machine didn't respond to key presses including ctrl+alt+del, the Windows key and any of the alt+"F" keys.

I tried unplugging and replugging my monitors, one by one then both at the same time. That did not bring my lock screen back.

I ssh'd in successfully. I could not VNC in. I could RDP into my Windows Virtualbox VM. I again grep'd for VNC processes on my machine, there were two. When I tried to kill one of the VNC processes, another would pop up. I repeated this a few times until all of the VNC processes shutdown as shown in the block below:

username@machinename:~$ ps -aux | grep vnc
root      46805  0.0  0.0  97528  5956 ?        Ss   15:40   0:00 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
root      46811  0.0  0.0 106104  6784 ?        S    15:40   0:00 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
root      46812  0.0  0.0   4508   784 ?        S    15:40   0:00 sh -c /usr/bin/x11vnc -findauth  -env _D_XDM=1
root      46813  0.0  0.0 106104  6636 ?        S    15:40   0:00 /usr/bin/x11vnc -findauth -env _D_XDM=1
username   46933  0.0  0.0  38868   944 pts/3    S+   15:41   0:00 grep --color=auto vnc
username@machinename:~$ sudo kill 46811
username@machinename:~$ ps -aux | grep vnc
root      46805  0.0  0.0  97528  5956 ?        Ss   15:40   0:00 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
root      46812  0.0  0.0   4508   784 ?        S    15:40   0:00 sh -c /usr/bin/x11vnc -findauth  -env _D_XDM=1
root      46813  0.0  0.0 106104  6636 ?        S    15:40   0:00 /usr/bin/x11vnc -findauth -env _D_XDM=1
root      46953  0.0  0.0 106104  6784 ?        S    15:42   0:00 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
root      46954  0.0  0.0   4508   788 ?        S    15:42   0:00 sh -c /usr/bin/x11vnc -findauth  -env _D_XDM=1
root      46955  0.0  0.0 106104  6624 ?        S    15:42   0:00 /usr/bin/x11vnc -findauth -env _D_XDM=1
username   47075  0.0  0.0  38868   948 pts/3    S+   15:42   0:00 grep --color=auto vnc
username@machinename:~$ sudo kill 46953
username@machinename:~$ ps -aux | grep vnc
root      46805  0.0  0.0  97528  5956 ?        Ss   15:40   0:00 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
root      46812  0.0  0.0   4508   784 ?        S    15:40   0:00 sh -c /usr/bin/x11vnc -findauth  -env _D_XDM=1
root      46813  0.0  0.0 106104  6636 ?        S    15:40   0:00 /usr/bin/x11vnc -findauth -env _D_XDM=1
root      46954  0.0  0.0   4508   788 ?        S    15:42   0:00 sh -c /usr/bin/x11vnc -findauth  -env _D_XDM=1
root      46955  0.0  0.0 106104  6624 ?        S    15:42   0:00 /usr/bin/x11vnc -findauth -env _D_XDM=1
root      47094  0.0  0.0 106104  6632 ?        S    15:43   0:00 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
root      47095  0.0  0.0   4508   700 ?        S    15:43   0:00 sh -c /usr/bin/x11vnc -findauth  -env _D_XDM=1
root      47096  0.0  0.0 106104  6832 ?        S    15:43   0:00 /usr/bin/x11vnc -findauth -env _D_XDM=1
username   47216  0.0  0.0  38868   928 pts/3    S+   15:43   0:00 grep --color=auto vnc
username@machinename:~$ sudo kill 46805
username@machinename:~$ ps -aux | grep vnc
username   47247  0.0  0.0  38868   940 pts/3    S+   15:43   0:00 grep --color=auto vnc

Open in new window


After that I checked syslog, he's a snippet of what I found there:

Oct 14 15:54:50 machinename x11vnc[47284]:  --- x11vnc loop: sleeping 2000 ms ---
Oct 14 15:54:52 machinename x11vnc[47284]:  --- x11vnc loop: 6 ---
Oct 14 15:54:53 machinename x11vnc[47284]:  --- x11vnc loop: waiting for: 48077
Oct 14 15:54:53 machinename x11vnc[47284]: 14/10/2016 15:54:53 passing arg to libvncserver: -rfbauth
Oct 14 15:54:53 machinename x11vnc[47284]: 14/10/2016 15:54:53 passing arg to libvncserver: /etc/x11vnc.pass
Oct 14 15:54:53 machinename x11vnc[47284]: 14/10/2016 15:54:53 passing arg to libvncserver: -rfbport
Oct 14 15:54:53 machinename x11vnc[47284]: 14/10/2016 15:54:53 passing arg to libvncserver: 5900
Oct 14 15:54:53 machinename x11vnc[47284]: 14/10/2016 15:54:53 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 48077
Oct 14 15:54:53 machinename x11vnc[47284]: xauth:  unable to generate an authority file name
Oct 14 15:56:52 machinename systemd[1]: Stopped Start x11vnc at startup..
Oct 14 15:56:52 machinename systemd[1]: Started Start x11vnc at startup..
Oct 14 15:56:52 machinename x11vnc[48295]:  --- x11vnc loop: 1 ---
Oct 14 15:56:52 machinename x11vnc[48295]:  --- x11vnc loop: waiting for: 48301
Oct 14 15:56:52 machinename x11vnc[48295]: 14/10/2016 15:56:52 passing arg to libvncserver: -rfbauth
Oct 14 15:56:52 machinename x11vnc[48295]: 14/10/2016 15:56:52 passing arg to libvncserver: /etc/x11vnc.pass
Oct 14 15:56:52 machinename x11vnc[48295]: 14/10/2016 15:56:52 passing arg to libvncserver: -rfbport
Oct 14 15:56:52 machinename x11vnc[48295]: 14/10/2016 15:56:52 passing arg to libvncserver: 5900
Oct 14 15:56:52 machinename x11vnc[48295]: 14/10/2016 15:56:52 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 48301
Oct 14 15:56:52 machinename x11vnc[48295]: xauth:  unable to generate an authority file name

Open in new window


I tried Googling around for "xauth: unable to generate an authority file name" and didn't find anything useful.

Alternatively, it could be a video card issue. I've tried two different VCs, both Nvidia. The first one I got stuck in a login/logout whether I used different versions of the Nvidia drivers or the Noveau driver. I switched to a different card, tried Nvidia drivers, same issues. Switched to the Noveau drivers on this card, everything seemed to be working...until now.

Here's some verifying information on my video card:

username@machinename:~$ lspci | grep VGA
02:00.0 VGA compatible controller: NVIDIA Corporation GF119 [NVS 310] (rev a1)


username@machinename:~$ grep LoadModule /var/log/Xorg.0.log
[     4.869] (II) LoadModule: "glx"
[     4.877] (II) LoadModule: "nvidia"
[     4.877] (II) LoadModule: "nouveau"
[     4.878] (II) LoadModule: "modesetting"
[     4.878] (II) LoadModule: "fbdev"
[     4.879] (II) LoadModule: "vesa"
[     4.879] (II) LoadModule: "nvidia"
[     4.879] (II) LoadModule: "nouveau"
[     4.879] (II) LoadModule: "modesetting"
[     4.879] (II) LoadModule: "fbdev"
[     4.879] (II) LoadModule: "vesa"
[     4.880] (II) LoadModule: "fbdevhw"
[     4.880] (II) LoadModule: "dri2"
[     5.220] (II) LoadModule: "fb"
[     5.222] (II) LoadModule: "shadowfb"
[     5.267] (II) LoadModule: "exa"
[     5.414] (II) LoadModule: "libinput"

username@machinename:~$ lsmod | grep nou
nouveau              1495040  7
mxm_wmi                16384  1 nouveau
video                  40960  1 nouveau
i2c_algo_bit           16384  1 nouveau
ttm                    94208  1 nouveau
drm_kms_helper        147456  1 nouveau
drm                   364544  18 ttm,drm_kms_helper,nouveau
wmi                    20480  3 hp_wmi,mxm_wmi,nouveau

Open in new window

At this point my next thing to try is getting an ATI card to eliminate the nouveau driver completely. If that doesn't work...maybe it's the bug I referenced earlier? Maybe something entirely unrelated?

Update 11: Got the AMD/ATI card in...and it's actually causing more problems than it's fixing so far. Unless someone thinks this is absolutely, positively a nouveau/Nvidia problem I will be easily persuaded to use one of those cards again.
0
Comment
Question by:travisryan
  • 3
  • 2
5 Comments
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
It sounds to me like the target system has gone into screen saver mode and VNC cannot wake up X.
Perhaps you could ssh in and wake up X using crikey
0
 

Author Comment

by:travisryan
Comment Utility
Duncan, I certainly try that the next time I run into the issue. I believe I have all of the screen saver options turned off in settings. If there's some place else I'm missing to check you can suggest, I'd appreciate it.
0
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points (awarded by participants)
Comment Utility
When I had to comprehensively turn off screen saver, I inserted xset s off in .xinitrc
0
 

Author Comment

by:travisryan
Comment Utility
Duncan, I just set that. I'll let you know what happens. I didn't have too much luck getting crikey installed.
0
 
LVL 34

Expert Comment

by:Duncan Roe
Comment Utility
The author last posted that he would try the accepted solution. He posted in a timely fashion that a previous solution did not work for him, so it seems reasonable to infer that this solution did work.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

At the beginning of the year, the IT world was taken hostage by the shareholders of LogMeIn. Their free product, which had been free for ten years, all of the sudden became a "pay" product. Now, I am the first person who will say that software maker…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now