Saturday, June 17, 2017

xorg - lightdm and startx fail to start graphics mode; traces of Nvidia driver are involved



My Ubuntu 12.04 system boots to a text mode login prompt (virtual console #1) since I upgraded the kernel (using Ubuntu's automatic upgrade system). I was using an Nvidia driver that worked well until that update. I had installed it from Nvidia's shell script instead of apt-get.



I have uninstalled this driver. I also tried Ubuntu's nvidia-current package, without success. I have purged it. I also reinstalled the desktop packages using "apt-get install ubuntu-desktop".



Rebooting still boots to text mode. Doing "sudo service lightdm restart" does not go to graphics mode. It just switches to virtual console #7.




As a test, I run sudo startx from a text mode shell, and it fails with this message:



FATAL: Error inserting nvidia_304 (/lib/modules/3.8.0-34-generic/updates/dkms/nvidia_304.ko): No such device


That .ko file exists and contains 15254672 bytes.



It seems like the system still wants to use the Nvidia driver, even though I uninstalled it.



How can I tell startx to avoid the Nvidia driver completely? Once startx would work, I assume lightdm might work too. Then I could try to reinstall the Nvidia driver.




I have looked at numerous pages on this forum, but everybody seems to have a different variant of this problem.



uname -a reports 3.8.0-34-generic. The PC is an x86_64. The system has the linux-headers-3.8.0-34-generic package, according to dpkg -l.



Since you are using 12.04, it may be possible to use the command-line version of the 'Additional Drivers' tool, called jockey-text. To get started, log in at one of the virtual terminals (Ctrl+Alt+Fn where n is 1,2,..6) and then type



jockey-text --list 2>/dev/null



(the 2>/dev/null is optional - it just hides a bunch of error messages about other hardware / drivers). It will take some time since it searches online but you should eventually see a list like



xorg:nvidia_173 - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
xorg:nvidia_173_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Disabled, Not in use)
xorg:nvidia_304 - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
xorg:nvidia_304_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Enabled, In use)
xorg:nvidia_319 - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
xorg:nvidia_319_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Disabled, Not in use)



From here you can proceed in one of two ways (both equivalent, as far as I know):




  1. disable the current (troublesome) driver, so that the system falls back to the previous - hopefully good - driver e.g. if xorg:nvidia_304_updates is currently Enabled, In use then do



    sudo jockey-text --disable xorg:nvidia_304_updates

  2. explicitly enable a previous known good driver e.g.



    sudo jockey-text --enable xorg:nvidia_304




If you get a message about being unable to connect to the system bus, then try adding the --no-dbus switch e.g. sudo jockey-text --no-dbus --disable xorg:nvidia_304_updates


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...