CentOS Linux release 7.4.1708 (Core)
uname -r output: 3.10.0-693.2.2.el7.x86_64
NVidia driver: NVIDIA-Linux-x86_64-375.66.run
When using the Nvidia graphics card driver with the Nvidia GeForce GT 720 graphics card on CentOS 7.4 it works fine for the wired computer monitor on the console. However, when attempting to connect to the vncserver, you only get a blank black screen on connection. I have removed the Nvidia driver, and VNC works again. Apparently I just recently found out that the Nouveau driver works with VNC, but it doesn't with the wired computer monitor on the console.
Is there a work around for using the Nvidia driver and be able to get VNC to work? Possible configuration files changes or a simpler GUI to use with Gnome? Currently I'm using metacity in the ~user/.vnc/xstartup file. Or is there another good alternative to using the vncserver/tigervnc?
TurboVNC + VirtualGL is a good alternative.
Pros:
-3dwm
.The cons is that it might be tricky to config. I've just finished setting it up on my CentOS 7 and NVidia K80. I doubt my config is perfect, but here's a set of points I'd like to highlight:
Official guides (1,2,3,4) might look somewhat too long and scary at the first glance, but they are rather easy to follow. They do miss some important pieces of information, though (1,2,3,4).
I've used kmod-nvidia drivers from elrepo, blacklisting
nouveau
with two linesecho -e "blacklist nouveau\noptions nouveau modeset=0" > /etc/modprobe.d/disable-nouveau.conf
, not with one single-line, like suggested in many other guides (1,2).Checking the following logs is a good starting point, when something goes wrong:
/var/log/messages
,/var/log/Xorg.0.log
,~/.vnc/*.log
. Most error messages I ran into are already discussed and rather easy to google.Pay attention to the
xdpyinfo -display :0
sanity check there. If it's not working, try answeringn
/n
/n
invglserver_config
and disabling selinux. Also, personally, I ended up replacinggdm
withlightdm
.-3dwm
is no longer needed. (But I still like TurboVNC server, cause it's fast).My understanding the root cause is NVIDIA installs its own GL libraries which break other X environments.
A cheat is to jumper-out the NVIDIA libGL.so by directing vncserver to the /usr/lib64 BEFORE /usr/lib64/nvidia:
This is working for me with Red Hat 7.1 and CUDA 9-2.
To continue working around the NVIDIA vs native graphics problem with the NVIDIA libGL issue, I have made the following cheats:
Here is my solution on a fedora 29 machine. I believe this is a distribution independent issue.
Move or copy the distribution versions of libGL to /usr/local/vnclib: