API mismatch means Ubuntu can't boot & I can't fix i - PLEASE HELP!

Apologies for the desperation in the title. I’ve been trying to sort this all day.
Problem workthough thusfar here: [url]boots to command line, startx fail, nvidia xconf & recovery boot problems

In brief: an update seems to have misaligned the kernel module version (310.14) with the driver component version (304.43) of my GeForce 8800 GT card. Subsequently I can’t boot. The system freezes when attempting to boot to safe mode so I can’t sort out the drivers there either. I’ve been trying to update the drivers and sort out xconf but nvidia-xconfig didn’t help (after hours getting it to work).
Fallback driver doesn’t help, and nvidia-xconfig, now working, overwrites the old backup of xorg.conf with the previous (failing) xorg.conf, so the backup won’t work either.
I’m dimly under the impression that manually editing xorg.conf might work, but no promises.
Please please please help.

of interest: i dual boot to windows XP. i don’t know how helpful that is, but you never know.
THANKS!!!

logfile: all it says it the core of what i’ve said above: using either /usr/share/X11/xorg.conf.d or /etc/X11/xorg.conf:
NVIDIA: API mismatch: the nvidia kernel module has version 310.14, but this nvidia driver component has version 304.43. Please make sure that the kernel module and all nvidia driver components have the same version.

Fatal server error:
no screens found

Believe it or not, this is supposed to be a relatively trivial problem to fix.

Did you install the new driver from an Ubuntu repo or from the NVIDIA installer downloaded from the NVIDIA site?

You shouldn’t have to make any changes to your xorg.conf… that should be completely unrelated to the problem. If you can, revert to the version that you know was working before you updated the video driver.

Second, if I understand correctly, if you attempt a “normal boot” it boots but X doesn’t start, and you have access to a command line / terminal? Do you have network access? What happens if you try to boot to a previous kernel version (listed in GRUB)?

What version of Ubuntu are you running?

i only assume a new driver was installed - there was a package update last night and it didn’t work this morning.

I can boot to root which gives me command line.
I can get network access through a circuitous, sketchy, process (most of the end of P1 & P2 of: boots to command line, startx fail, nvidia xconf & recovery boot problems - Page 2).
In the meantime i’ve followed instructions here: [SOLVED] Nvidia Nightmare after software update (sep 25th 2012) up to post 20, which has given me back boot access to ubuntu current (12.05, build…35) but no mouse or keyboard input recognised.
Good idea to boot into a previous version! I’m in now, but the same problem with no mouse & keyboard.

Any tips gratefully received.
Thanks

Simon

It sounds like you are using either Ubuntu 12.04 or 12.10 and had previously installed the experimental 310.14 nvidia driver in the System Settings → Additional Drivers program, and then a subsequent system update attempted to re-install an older driver version (304.43). Or something similar to that happened, or perhaps vice versa (304.43 → 310.14).

If you can get to a command line on boot (preferably through a normal boot) and then type:

dpkg -l nvidia-current nvidia-current-updates nvidia-experimental-304 nvidia-experimental-310

Can you post the two-character prefix for each of those packages (like ii, etc.)?

Also, can you do a “grep nvidia /var/log/dpkg.log” and for the date that your system update was applied (last night), can you see if there was an nvidia package update and if so, the package name and the package version?

And can you do the same for “grep linux- /var/log/dpkg.log”?

wow. that is exactly the case, including the numbers!

ii nvidia-current 304.64-0ubuntu NVIDIA binary Xorg driver, kernel module and
ii nvidia-experim 310.14-0ubuntu Experimental NVIDIA binary xorg driver, kern
No packagfes found matching nvidia-current-updates or nvidia-experimental-304

I’ve been doing some purging based on advice here, to be aware: [SOLVED] Nvidia Nightmare after software update (sep 25th 2012) - Page 3

um for the second one, is there something you’re looking for specifically? I’m running as root on the ubuntu machine and typing on a windows laptop so it’s all manual typing AND i can only see the final screen’s worth…
if there’s a way to break the output up so i can see screen by screen (searching for a specific line/lines) please let me know.

Thanks for this

sorry, “the second one” above is the third one, “grep linux- /var/log/dpkg.log”, i missed the “grep nvidia /var/log/dpkg.log” bit.
So:

Also, can you do a “grep nvidia /var/log/dpkg.log”
and for the date that your system update was applied (last night)
can you see if there was an nvidia package update
and if so, the package name and the package version?

i’ve got the output but i’ve only got the last screen, which is updates as of half an hour ago… any thoughts?

if of interest:
dpkg -l | grep -i nvidia
gives:

rc nvidia-173 173.14.30-0ubuntu8.1
NVIDIA binary Xorg driver, kernel module and VDPAU library
ii nvidia-common 1:0.2.44.2
Find obsolete NVIDIA drivers
ii nvidia -current 304.64-oubuntu1~precise~xup1
Nvidia binary Xorg driver, kernel module and VDPAU library
ii nvidia-experimental-310 310.14-0ubuntu0.1
Experiemental NVIDIA binary Xorg driver, kernel module and VDPAU library

and
grep -R nvidia /etc/modprobe.d/
gives

/etc/modprobe.d/nvidia-graphics-drivers.conf:blacklist nvidia-173
/etc/modprobe.d/nvidia-graphics-drivers.conf:blacklist nvidia-96
/etc/modprobe.d/nvidia-graphics-drivers.conf:blacklist nvidia-current
/etc/modprobe.d/nvidia-graphics-drivers.conf:blacklist nvidia-current-updates
/etc/modprobe.d/nvidia-graphics-drivers.conf:blacklist nvidia-173-updates
/etc/modprobe.d/nvidia-graphics-drivers.conf:blacklist nvidia-96-updates
/etc/modprobe.d/nvidia-graphics-drivers.conf:alias nvidia nvidia_experimental_310

ahh, i forgot that you’ve been making a lot of package changes trying to fix the problem… i was hoping i could find what package it tried to install last night so we could determine the source of the problem.

i would just suggest trying to install and / or reconfigure the experimental 310 package:

sudo apt-get install nvidia-experimental-310

See what error you get, if any.

And then optionally:

sudo dpkg-reconfigure nvidia-experimental-310

Looking at the modprobe it appears that 310.14 is the intended driver, so we’ll try to get that working.

sudo apt-get install nvidia-experimental-310
…is already the newest version

sudo dpkg-reconfigure nvidia-experimental-310
…boots, looks fine (was already doing this though, however it may well be more stable or better performing underneath). Keyboard & mouse support still absent (but i’m painfully aware that my successful efforts to get the system to boot to GUI have invariably caused that).

Any thoughts? I can boot back to root command line to give outputs?

ubuntu version is 3.2.0-35-generic, btw

Ohh… so your drivers are ok now?

I feel the keyboard and mouse problem was likely caused by some of the xorg.conf changes that you tried. If you can get back into a command line terminal, then if you could make sure you’re using a previously-working xorg.conf then you might be ok. If you don’t have one, then edit the one you’re currently using and comment out all “InputDevice” sections, and then all “InputDevice” lines that appear later in the file, e.g. in the “ServerLayout” section.

yep, i’m getting visuals in ubuntu now. but like i say, not sure how stable. hopefully the new experimental reconfigure will toughen things up.

Thanks a load for your help - i really appreciate it & will post this thread as a better solution on the other threads that i’ve started elsewhere.

p.s. if you happen to know how to edit xorg.conf in the boot root (since gedit doesn’t seem to work), please let me know!

Cheers

simon

You can just use nano to edit the xorg.conf in a terminal.

I believe it’s Control-O to save the file then Control-X to exit.

strange. felt like that would do it, but no dice. i did /usr/share/X11, i’ll try doing /etc/X11 as well.

frustrating! still no. if i comment out the whole inputdevice section, it says it’s missing them. if i add back the title only, it says it’s missing the driver…

Unfortunately I don’t know anything about this one. It seems there were a lot of similar problems relating to keyboard / mouse breakage when people updated to 12.04 since they made some changes in that area. If you unplug and re-plug your keyboard at the login screen / desktop, will it start working?

Perhaps the udev or xorg-server packages need to be reconfigured?

hmm. looking into it, prognosis doesn’t look good. thing is, i’ve been on 12.04 for a while and all’s been fine. this recent update killed my video driver / kernel alignment and the fixes seem to have killed the mouse & keyboard. Playing with xorg.conf didn’t really help much, though someone found that making a section to disable automatically identifying devices strangely makes the mouse work. No joy for the keyboard though.
Will try reconfiguring those packages just in case; if not it feels like i’ll have to work out how to upgrade to 12.10 from the root command line. Eurgh…

Thanks for all your help man, I appreciate it.