Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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

share|improve this answer
    
I saw 3 drivers, one was Enabled, so I disabled it, then "sudo startx" worked. When I reboot, I get the graphical login, but when I log in, I get an empty text mode screen, then I'm immediately returned to the login screen. I was using XFCE before this began. Maybe my previous configuration is interfering with something. Logging in with "Guest Session" logs me in successfully in a GNOME 3 desktop. Is there something I could delete in my home directory to reset my desktop configuration? Or should I look elsewhere for the cause? Thanks again. –  sarrazip Dec 28 '13 at 2:15
    
Doing "sudo rm .Xauthority" in my home directory resolved this last issue. –  sarrazip Dec 28 '13 at 2:19
    
Yes I was about to suggest that - for the record, that's caused by using sudo with startx (it causes the user's .Xauthority to become owned by root) - always run startx as a regular user. BTW if the issue is solved please consider marking the answer as 'Accepted' - that makes it easier for others with the same problem to find a solution. –  steeldriver Dec 28 '13 at 2:22
    
Update: The above procedure restored 1024x768 graphics. I was only able to get 1280x1024 again by installing NVIDIA-Linux-x86_64-331.38.run myself, not by using Ubuntu's NVidia driver package (which failed to offer more than 1024). My graphics card is a GeForce GT 630 Rev. 2 on a 64-bit PC purchased in Fall 2013. –  sarrazip Jan 19 at 4:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.