Fix login display problems due to libglx.so conflict on Ubuntu 16.04 LTS
Under certain conditions, you may experience trouble launching a graphical session on your Ubuntu 16.04 LTS computer provided by SCS Computing Facilities. This problem occurs when the symlinked version of libglx.so is overwritten by an update to the xserver-xorg-core package. While SCS Computing Facilities has taken steps to reduce the number of occurrences of this problem in the SCS computing environment, it is still possible that you may experience this problem. The following document describes how to check if your machine is impacted by the problem. Self-service instructions are provided to allow impacted users to address this problem themselves.
Description of the problem
Hosts experiencing this problem run Ubuntu 16.04 LTS and have one or more NVIDIA GPUs.
Hosts are impacted by this problem when the NVIDIA drivers have been installed manually via a .run file provided by NVIDIA. (If the NVIDIA drivers have been installed via apt, the host will not experience this problem. We generally advise against installing the NVIDIA drivers via apt as the version in the repositories is older than what is available from NVIDIA directly.)
When this problem is present, attempts to log in to a graphical session will fail (though SSH and virtual console sessions continue to work as expected).
- Users using Unity will simply be returned back to the login prompt after attempting to log in, even if the correct password is entered.
- Users using KDE will be stuck in an incomplete GUI session without any visible UI elements.
Check if your machine has this problem:
From an SSH or virtual console session, the output of the following command will provide further confirmation of whether a recent graphical login failed as a result of this libglx.so conflict:
# grep 'EE' /var/log/Xorg.0.log
If this machine is experiencing the libglx.so conflict, the output will look like what is shown in this screenshot:
How to fix this problem on your machine
Once you have successfully determined that your machine is impacted by this conflict, the one-time procedure below will guide you through resolving the conflict.
First, obtain a command prompt on the impacted host. You can do this by connecting to the machine via SSH as this problem does not adversely impact SSH logins. Alternately, if you are physically near the machine, you can drop in to a virtual console by pressing the keyboard shortcut Ctrl + Alt + F1 and logging in there.
Become the user root by running:
# sudo su
The following commands will address the immediate problem on the machine and ensure that the resolution persists across updates to the package that causes this problem (xserver-xorg-core):
# service lightdm stop
# dpkg-divert --divert /usr/lib/xorg/modules/extensions/libglx.so.xserver-xorg-core --rename /usr/lib/xorg/modules/extensions/libglx.so
# cd /usr/lib/xorg/modules/extensions/
# ln -s libglx.so.$(nvidia-smi --query-gpu=driver_version --format=csv,noheader) libglx.so
# service lightdm start
You should now be back at the graphical login screen and you should be able to proceed to log in to a graphical session on the machine normally. If this procedure does not work or you have questions, please contact the SCS Help Desk by sending email to email@example.com.
The dpkg-divert command will rename the version of libglx.so provided by the xserver-xorg-core package to /usr/lib/xorg/modules/extensions/libglx.so.xserver-xorg-core. The ln command will make libglx.so a symlink that links to the version of libglx provided by the NVIDIA drivers.