Posts Tagged ‘kubuntu’

Kubuntu 9.10 Upgrade: Karmic nVidia Failure

Monday, November 16th, 2009

Did they name Ubunu 9.10 Karmic on purpose, and then had it ruin the lives of the wicked people? My upgrade was an absolute train wreck. I spent my whole afternoon, and evening fixing it, and managed to accidentally delete few moths of email. Yay me!

The upgrade went smoothly up until I rebooted the machine and noticed that I’m running 800×600 and my dual head setup was broken. This was very noticeable on a 23 inch monitor, and running the new KDE version which super-large windows decorations. So I decided to fix it.

Quick note on KDE 4.3:

WHAT THE FUCK?

It seems that the design goal of this release was to “make it as shitty as Vista”. Can we please stop doing that? Seriously, I don’t even recognize this environment anymore. It was working fine before – there was no need to change the Kmenu, the panel or the fucking desktop.

Granted, the desktop effects are actually very nice, and the plasma widgets are cool. Still, I wasn’t very happy viewing it in 800×600 resolution on a 23″ monitor. Try that yourself and you will see why I was angry. Without the bells and whistles the desktop was just ugly and barely functional. I’m slowly getting used to it now and I think I will be fine but the first impression was horrible.

So I did the exact same thing that worked for me last time. I pulled up the KDE Hardware app and told it to activate proprietary nVidia driver. It didn’t work. I tried couple more times, and then restarted the machine thinking that maybe the damn thing is just not registering the change. That’s how I hosed my X. Kubuntu came back in text only mode and I had to hack the xorg.conf and switch it back to the generic driver.

After this I tried following some online troubleshooting steps trying to install, re-install the drivers, hack the xorg.conf and each thing I did made my system more broken than it was. Eventually I managed to delete my .kde folder with several moths of emails (ie. my last backup was few months ago, and I have no one to blame for this but my own stupidity).

PROTIP:

Do not do mv -i as root. Ever!

In fact, every time you do any moving or deleting from the command line you should back up the folders in question just in case. The beauty of working from the shell is that it does not try to hold your hand or second guess your choices. Linux will do precisely what you ask it to do – whether it is good or bad for the system. This gives you great deal of power and flexibility but comes at a price – a typo, or badly formatted command may actually damage the system or wipe your files.

This is what happened to my email folder. At one point during the troubleshooting I got it in my head that something went wrong in my KDE setup. At that point I got my machine to display the log in screen, but X would crash when trying to actually load the environment. So I decided rename my .kde directory and let the system generate a clean one to see if this helps. It did not, so I renamed it back. About 2 hours later I realized that I must have made a typo of some sort. When I finally got KDE to load it completely forgot all my settings. I went searching for the .kde-bak directory I created earlier, but it was nowhere to be found. It just went *poof*.

It wouldn’t be that bad if it wasn’t for the fact that Kontact keeps it’s email diles in there. Oops… I had backups, of course, but unfortunately I have been rather lax about them in the last few… um… months. So yeah – you get the idea. I was not a happy camper and there was no one I could blame for this but myself. First for being reckless with my commands. Second for not making a copy prior to fucking with such a crucial directory. Third for getting complacent and not running the backup script in god knows how long.

To make a long story short, half the solutions posted in the Ubuntu forums are total crap. It became painfully obvious that my problem ran much deeper. Reinstalling the drivers and re-creating the x config just wouldn’t cut it.

For reference my machine is a Latitude D820 with nVidia Quadro NVS 140m board. I was starting to think that there is just no working driver for this card that is compatible with the 2.6.31-14-generic kernel. Finally, after several hours I found the solution.

Alexander V. Røyne-Helgesen deserves one free internet for figuring this out. His fix is the only thing that worked for me. In case you are to lazy to click on the link, here is the solution:

First, open up your /etc/modprobe.d/lrm-video file and comment out every single entry that references nvidia. Your file should look something like this:

 # Make nvidia/nvidia_legacy and fglrx use /sbin/lrm-video to load  
install fglrx /sbin/lrm-video fglrx $CMDLINE_OPTS  
#install nvidia /sbin/lrm-video nvidia $CMDLINE_OPTS  
#install nvidia_legacy /sbin/lrm-video nvidia_legacy $CMDLINE_OPTS  
#install nvidia_new /sbin/lrm-video nvidia_new $CMDLINE_OPTS'

Once this is done, go to your /etc/modules file and add this at the end:

nvidia

Finally, go to your xorg.conf, find the entry that describes your video card and change the driver to nvidia. It should look something like this:

Section "Device"
   Identifier      "NVIDIA Corporation NV40m [Quadro NVS 140m]"
   Driver          "nvidia"
   # more lines here...

Now restart thy X server and… Boom! Back in business.

I should probably mention that I uninstalled and reinstalled the nVidia drivers about 10 times during the whole ordeal. I used various sources. The last thing I tried was the EnvyNG script (the package name is envyng – it’s in the repos). So I can confirm that this method above works with Quadro NVS 140m with a driver installed by EnvyNG. May not work after a straight upgrade.

Did I mention that the upgrade also broke my VirtualBox installation? Yeah, it did, but that’s a topic for a whole other post. Needless to say, I am never doing this sort of thing again on a weekday.