Kubuntu 9.10 Upgrade: Karmic nVidia Failure

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.

This entry was posted in sysadmin notes and tagged , . Bookmark the permalink.



14 Responses to Kubuntu 9.10 Upgrade: Karmic nVidia Failure

  1. Steve CANADA Mozilla Firefox Windows Terminalist says:

    Reason #23 why I ran screaming from the previous version of Ubuntu. I am computer-savvy, but the hoops I had to jump through to change something or…heaven forbid…remove something (like Bluetooth…don’t need it on the laptop…wanted to remove it…couldn’t). And like you noticed, the forums were absolutely NO help whatsoever.

    I had a bug, something about not being able to log in (I don’t remember the error). I search the forums and for every post, found totally different answers for the exact same error message.

    Reply  |  Quote
  2. If “Ubuntu” is an ancient African word meaning “couldn’t configure Debian”, then what’s the word for “couldn’t configure Ubuntu”?

    I kid! I kid! :-)

    “Quick note on KDE 4.3: WHAT THE FUCK?”

    Heh, I gave up on KDE and Gnome a long time ago when they started needing 512MB of memory just to run smoothly. At first I switched to xfce, then that got bloated too. So the last couple years I’ve been using IceWM. It’s definitely not perfect, but it manages to always stay out of my way.

    IceWM isn’t fancy, so if you still want to impress those shoulder surfers you have to do it the old fashioned way: a couple xterms with compilation spilling out at high speed.

    “Eventually I managed to delete my .kde folder with several moths of emails”

    Why would anyone, especially the KDE people, think it’s a good idea to store e-mail in the .kde directory? That’s just madness. A few other programs like to do this too, putting stuff like torrented files or VM disk images in their dot directories. Those directories are for configuration, not data, people!

    “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.”

    Oftentimes when deleting directory hierarchies, to be on the safe side, instead of “rm -rf” I’ll just move it to /tmp and forget about it. It’ll stay there until the next boot (just be careful of sensitive files). In your case, since you knew you were rebooting a lot, throwing stuff in ~/trash/ might have been more useful. If there is a filename collision, throw in a $$.

    Reply  |  Quote
  3. Sorry you had so much trouble. My upgrade was pretty painless.

    I was able to fix the NVidia by backing up my original xorg.conf, reinstalling the latest Nvidia driver, and replacing the xorg.conf with my original. No other magic required.

    Fixing VirtualBox has been the same whenever a new kernel comes out, I just reapply the package which recompiles the kernel modules. I had a lot of issues using the VirtualBox binaries in the debian repositories, so I always download the one I need directly from Sun. I have not had an issue since.

    The only other things to break were things that you would expect, like anything you compiled under 9.04. I had to jump some hoops to get my vmware-view-open-client to recompile, but got there none the less. It also broke my SheepShaver, but some supporting libraries have changed (I had grabbed an RPM and converted with alien, so I expected this error to happen).

    Now, our systems differ in that mine is Ubuntu, not Kbuntu. Not sure if that had anything to do with it, but I doubt it.

    Reply  |  Quote
  4. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

    @ Steve:

    It’s funny but the previous upgrade gave me absolutely no trouble. It was quick, easy and painless. This one was a train wreck and it should not have been. My video card was fully supported via the proprietary drivers in the last 4 releases. I did not expect it to break this time.

    On the upside, I was pleasantly surprised that my sound card worked right out of the box. I had to jimmy it after every upgrade so far. This time it just worked.

    Chris Wellons wrote:

    If “Ubuntu” is an ancient African word meaning “couldn’t configure Debian”, then what’s the word for “couldn’t configure Ubuntu”?

    Obviously the word is OSX – which is ancient African for “I can’t figure out Linux for the life of me, but I’m sure as hell not running Vista”.

    Chris Wellons wrote:

    Why would anyone, especially the KDE people, think it’s a good idea to store e-mail in the .kde directory?

    I know, it’s ridiculous but I guess this is sort of a tradition for email clients. Thunderbird does the same fucking thing, hiding your email archives in the .mozilla folder.

    Craig A. Betts wrote:

    I was able to fix the NVidia by backing up my original xorg.conf, reinstalling the latest Nvidia driver, and replacing the xorg.conf with my original. No other magic required.

    Yep, that was my plan too but as it can be see above, it did not work. No clue why, because every single previous upgrade went smoothly and them most I had to do is to click a GUI button to install the proprietary nVidia drivers.

    Craig A. Betts wrote:

    Fixing VirtualBox has been the same whenever a new kernel comes out, I just reapply the package which recompiles the kernel modules. I had a lot of issues using the VirtualBox binaries in the debian repositories, so I always download the one I need directly from Sun.

    Same here. The package maintainers for VirtualBox do not keep up with the kernel updates so if you update your system regularly, the app will break every time there is a kernel upgrade and you have to wait for them to repackage.

    I found that most of the time all I had to do to make it work again was running:

    sudo /etc/init.d/vboxdrv setup

    This always re-compiled the kernel module and applied it for me. Only this time it didn’t work giving me some cryptic error messages. Eventually I resolved it by downloading the newest release from Sun and re-installing it manually via dpkg.

    Reply  |  Quote
  5. Alphast NETHERLANDS Mozilla Firefox Windows Terminalist says:

    You know guys, this is the main number 2 reason why Linux won’t be adopted any time soon by the larger public (the number 1 is called video games, but you all knew that). It rarely works fine out of the box (if I may use such a weird expression for online repositories) and practically never upgrade easily. Windows sucks (we all agree here, I suppose), especially Vista. But it works on most hardware. And yes, I know there are hoops of exceptions, fancy hardware and stuff. But it won’t hose your ATI or Nvidia display. At least not on a standard install…

    Reply  |  Quote
  6. Stefanie BELGIUM Mozilla Firefox Ubuntu Linux says:

    To be honest, I’ve always had more trouble with drivers under Windows than under Linux. Of course it all depends on the hardware but for me 9.10 felt like a big leap forward. For the first time my eee pc was working out of the box, function keys, suspend and webcam included. Everything just feels much smoother. It’s surprising that there is still trouble with nVidia card, but I guess a clean install would have avoided the problem? Maybe I’m just lucky but upgrading has alwasy been a painless experience for me.

    Reply  |  Quote
  7. copperfish Mozilla Firefox Ubuntu Linux Terminalist says:

    Absolutely no Nvidia issues with a clean install of Ubuntu Karmic on a T61 ThinkPad with exactly the same Quadro 140M hardware. Nvidia mobile hardware drivers suck on Windows and Linux so @Alphast it isn’t purely a Lunix thing. I have far fewer driver issues with a clean Ubuntu install vs. Windows 7.

    That said I broke the Ubuntu rule:

    “Never, ever, ever install .10 releases. They always suck. Only ever install .04 releases.”

    On a clean install on hardware that worked perfectly in Jaunty:

    Nautilus hangs regularly (thumbnail related).
    Suspend works, but power manager ignores battery vs. plugged in profiles.
    Sound was fine in Jaunty, but there are issues with Karmic.

    And on and on….when I get the chance it’s a backup and downgrade for me.

    Reply  |  Quote
  8. Ahmad Yasser Mozilla Firefox Windows says:

    The main reason you had this much trouble is because you’re using Kubuntu.
    The ONLY, and I mean ONLY usable one out of the three is Ubuntu. The other 2 are jokes IMO, just like Kubuntu and their KDE implementation.
    If you really want to try out KDE 4.3, use a REAL KDE distro like Mandriva or OpenSUSE.

    Reply  |  Quote
  9. Luke Maciak UNITED STATES Mozilla Firefox Linux Terminalist says:

    @ Alphast:

    To be fair, Windows doesn’t work out of the box either. Let me bring up my experience with old Inspiron 600m laptop here. When I installed Windows XP on the thing it booted in 800×600 resolution with:

    - broken video drivers
    - no audio
    - no ethernet
    - no wifi

    I tried Ubuntu with the same machine and everything other than wifi worked out of the box, So it really depends.

    And this is the first in 4 consecutive upgrades that ended up in such a spectacular fail. Yeah, this system started off as hoary or dapper or something like that – I don’t even remember anymore. :P

    @ Stefanie:

    I will attest to that. On linux there is usually a way to get a piece of hardware working. In worst case scenario you’ll have to compile something. On windows the drivers are usually there, provided by manufacturer until they are not.

    For example, I have a Vista 64 bit box at home that refuses to work with an older Epson scanner. Epson released Vista 32 drivers for this model like a year ago, but they won’t work with the 64 bit version. And no one at Epson cares because it is an old piece of hardware.

    Oh, and that one time I had a lovely HP all-in-one-printer driver that decided to take up 100% of CPU time, and refused to let it go until you killed it’s resident process.

    copperfish wrote:

    “Never, ever, ever install .10 releases. They always suck. Only ever install .04 releases.”

    Seriously, I think I should frame this and hang it above my desk so I don’t forget. All the other upgrades were to non .10 versions. :P

    @ Ahmad Yasser:

    Yeah, we Kubuntu users are second class citizens in Ubuntuland. :P I’m so used to the ‘buntu way of doing things though that I’m not sure I’d be happy on an RPM based system like Mandriva or OpenSUSE. I might just switch to Gnome one day.

    Reply  |  Quote
  10. Ahmad Yasser Mozilla Firefox Windows says:

    I actually went the GNOME -> KDE 4 route, but I will definitely check out whatever GNOME 3 has in store :P

    Reply  |  Quote
  11. MrJones2015 GERMANY Mozilla Firefox Linux says:

    “make it as shitty as Vista” well its KDE, what did you expect?

    Reply  |  Quote
  12. ST/op DENMARK Mozilla Firefox Windows Terminalist says:

    Ahmad Yasser wrote:

    I will definitely check out whatever GNOME 3 has in store

    MrJones2015 wrote:

    “make it as shitty as Vista” well its KDE, what did you expect?

    OMG! GNOME 3 is going to look like Vista too!
    http://www.omgubuntu.co.uk/2009/09/gnome-3-quick-visual-tour.html

    Reply  |  Quote
  13. Thanks for mentioning me in this post! I’ve just started to write again, so stay tuned for more ;)

    Reply  |  Quote
  14. Andrew Zimmerman UNITED STATES Google Chrome Windows Terminalist says:

    I find the fact that UNIX variants lacking a Rename function is an inherent dis-functionality. I know Why it doesn’t. And that’s fine. But it’s STUPID!
    Who, in 2009/2010/2011 Doesn’t have Rename? Linux. UNIX. BSD. (I think, on the bsd, not sure.. :/

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>