My Ubuntu Experience as a Noob - Part 2: nVidia Drivers
By: Quigley
on Tuesday, April 10th 2007 at 9:44pm
THE HELL: So, as I mentioned in the comments on my other article, I happened on an item in the documentation that said there is no native 3D support with my nVidia GeForce4 MX 440 due to the manufacturer being a dick about disclosure. So enter this command and blah blah blah, reboot and you'll be fine.
Wrong! Rebooted, and now Gnome won't load.
SIDE NOTE: To complicate matters further, I installed AVG Free for Linux with the same reboot, and it apparently stopped the console from loading properly also, so I was totally paralyzed. Once stuff got effed I systematically went about trying to undo what I'd just done. On a hunch I loaded the recovery mode and, after ages of trying to figure it out, found a way to get the damn thing to tell me what the AVG package was called, and removed it. Once AVG was gone I could use the console in regular mode again. I'm still not sure if I'm going to try and put it back now that my video issues are fixed.
THE METHOD: I read up for a while (hours) on the forums, which was not very helpful as it seems a lot of people have very similar issues to mine for myriad different reasons. One thing stuck in my mind - something a guy said about a PCI bus reference in a config file somewhere. His problem wasn't the same as mine, but I logged it in my memory anyway. To further confuse the issue, there were entries on forums from late last year, some time last week, and earlier today, which all mentioned problems with nVidia graphics cards that started with some kind of update released "today". I had to assume that maybe one of the 164 updates I installed already had something to do with destabilizing my system, but I wasn't sure. I read and read and read until my eyes were bulging out of my skull, to no avail. I got sick of it. I realized that I'd done very little to customize my system since I installed, and proceeded to start from scratch.
This time I decided to do things in reverse order, so as to see what actually caused the problem. I ignored the 164 updates, and went directly to downloading and installing the nVidia drivers. This time I took careful note of where the backup config file for X was stored, but I didn't figure I'd end up needing it. I already had an idea in my head (somehow - not sure when this happened, actually), but I figured I'd go through the motions anyway. I installed the drivers and rebooted. No problem. I ran "nvidia-glx-config enable", and before I even rebooted, I checked /etc/X11/xorg.conf. I'm not sure what made me do that. Call it intuition. Maybe I'm starting to pull my head out of my ass. If so, it's a very slow process, I assure you, so don't expect too much of me yet. Anyway, I scanned down until something caught my eye - BusID "PCI:0:5:0". I don't know what that means, but I know it doesn't seem right, and I remembered that guy on the forum with some other problem had said he found this in his xorg.conf file too, and it wasn't right.
I was hot on the trail! Exciting! I rebooted expecting failure, and sure enough, same as before, it failed. I read the debugging info when prompted to do so, and it said it was having trouble associating something-or-other for my video device, located at PCI:1:0:0. Bingo! I used pico to edit xorg.conf (I had to Google this; no idea about console text editors till this very day). I changed the values. Can't save the file. Dammit! Oh, I remember, I probably need to type "sudo " before that. I know roughly what that does, by now - just not sure why it's called that, and I never remember to use it till I'm told ACCESS DENIED. Sure enough, when I run pico in this fashion I can actually overwrite the config file. I replaced PCI:0:5:0 with PCI:1:0:0 and rebooted...
... and was greeted by a nice, pretty nVidia logo screen, followed by my normal startup.
THE CONCLUSION: I'm a dumbass noob, but I guess I'm not a total moron. ;)
This has been very satisfying if a little frustrating, but from this point on, I think I'd like things to just work henceforth. I'm a couple of days behind in my actual work...
Other Articles
Next: My Ubuntu Experience as a Noob - Part 3: Themes from Quigley
Previous: My Ubuntu Experience as a Noob from Quigley
Comments for My Ubuntu Experience as a Noob - Part 2: nVidia Drivers
prev . 1 . next
10 Comments
mike Wrote...
Tuesday, April 10th 2007 at 10:57pm
You really don't need the virus scanner... This isn't windows. Keep it off your systems. I'm of the opinion 90% of system slowdowns are from virus scanners checking every interrupt, file, api request. So, rather than having a virus hit your computer you have one installed full time slowing everything down.
The permission system in ubuntu also works. If you happen to get a virus (which there are few in the linux neighbourhood), it will not infect the whole system. If anything, you may get a zero day exploit or worm... which even the best virus scanner won't save you from. This is why Ubuntu's daily updates help you stay on top of things. Much better than Microsoft's monthly "Patch Tuesday" mentality.
Note:
You're most likely *not* using pico, but rather a GNU replacement named nano. Nano is a clone of pico, and my favourite editor for linux. If you want to use a non-command line editor, the default editor on ubuntu is "gedit" which you can also use via sudo. Gedit is also conveniently placed in the menu under "Applications->Accessories->Text Editor". Novel!
mike Wrote...
Tuesday, April 10th 2007 at 11:00pm
If your pc had onboard video, that may be the card it detected. Which is then why your nvidia drivers were blowing things up. I had a similar problem with my (onboard) sound card. Previously windows used to skip the onboard card and use my SB Live installed in a PCI slot. Linux, on the other hand (although logically), chose the first "card" it found, the onboard one. I had to manually turn the onboard sound off via the BIOS for the SB Live to be selected automatically.
SmrtySsa Wrote...
Tuesday, April 10th 2007 at 11:05pm
(this'll probably be a lot...)
Heh.. the one thing that drives me most nuts(!) about the ubuntu forums is that they're.. well, a mess. And the majority of the users writing how-to's come from windows. Believe it or not, a reboot wasn't actually necessary when enabling the "restricted" nVidia drivers.
I'm sure the steps were close, I'll summarize:
* Enable the universe and multiverse repositories
* install linux-restricted-modules
* install nvidia-glx
* run sudo nvidia-glx-config enable
* "Reboot"
Reboot loads the nvidia driver (sudo modprobe nvidia) would do the same, and logging out of the gnome desktop would restart the entire gui.
For the record, nVidia's restricted driver is enabled by default in 7.04 (which should officially be released this week.. maybe tomorrow even.)
There's very few things with linux that actually require a reboot, and they are:
1 - kernel update.
2 - mass module updates (they come with #1, usually)
3 - a complete fuckup (rare)
Every driver can typically be removed (sudo rmmod [module]) and installed (sudo modprobe [module]) at anytime. Any "service" that starts up on boot (including the GUI) can be restarted manually (sudo /etc/init.d/[serviceName] restart - where serviceName is whatever it is you want to restart. 'gdm' is the desktop manager/gui)
As for the pci, it looks like nvidia-glx-enable was drunk and just failed to detect the proper location of the card.
AVG runtime for linux is horseshit. If you want an AV, I'd actually recommend clamav. I have it, it scans all email on the server. On desktops I only ever use it to do manual scans.
To find out what drivers are installed: lsmod
To find out your USB devices: lsusb
To find out your PCI (and more) devices: lspci
(note the trend?)
To see a dump of system messages: dmesg
There's also a bunch of various logs in /var/log
No matter how often you see people mention 'setting a root password' ignore them. sudo is your friend. If you need a non-stop root command line, just use 'sudo su -' in a terminal or open a 'root terminal' from Applications->System Tools.
That's all I can think of for now.
SmrtySsa Wrote...
Tuesday, April 10th 2007 at 11:12pm
Mike, if you're using 'sudo' on a gui app, you should probably use 'gksudo' so that it sets the proper environment for the gui app. :P
And mikey's reason for the funny detection sounds accurate. Of course, feel free to prove it wrong by saying you don't have an onboard video ;)
Oh yeah, if your GUI happens to do a #3 of my list, ctrl-alt-backspace will attempt to kill it (and forcing it to restart). Failing that, ctrl-alt-f1 will give you a text console where you can kill stuff. Failing that, reboot :)
Feel free to use ctrl-alt-f1 (through 6) at anytime for your own 'top secret' console. ctrl-alt-f7 will bring you back to the gui.
SmrtySsa Wrote...
Tuesday, April 10th 2007 at 11:27pm
(now I'm just spewing stuff)
In gnome, some of the default hotkeys are fun:
alt-f1 (applications menu)
alt-f2 (run box)
alt-tab (window switcher)
ctrl-alt-left|right|up|down will switch desktops
ctrl-alt-d (hide everything, or show if it's already hidden)
you can view, and configure them all in System->Pref->Keyboard Shortcuts
in nautilus, ctrl-f, ctrl-s, ctrl-l (find, select pattern, location bar) are all handy.
that's about all i use on a regular basis, and I'm a keyboard jockey.
Quigley Wrote...
Wednesday, April 11th 2007 at 3:08pm
Wow hehe. Crazy lots to respond to. Okay, here goes:
1) D: nope, not 6.06LTS; it was 6.10. Not sure of the significance...
2) mike: I had heard of this nano thing, but long ago, and of course, not using the info, forgot about it. Interesting that you can run it by typing "pico"... that's a cute feature. Also, I knew about Gedit 'cause I've been religiously checking the names of default programs in Gnome as I view files or do various things - I just had no idea what to do once I got into a command-line environment. ;)
3) Bothaya: The onboard video thing sounds intuitively (not like I'd really know for sure heh) like a good explanation for the messed up PCI bus id. But, I'm afraid I am indeed going to have to pop and say I don't have one. ;)
4) D: I don't think I ever installed linux-restricted-modules - at least not deliberately. Was this a mistake? Did I miss a step somewhere?
Also, thanks for all the help. I'm proud to say I'd already started to pick up some of this stuff, but it's good to have a reference that I know is coming from people's actual experiences. I was definitely alarmed by the number of people giving advice on the forums who hadn't been using Linux much longer than I had ;)
I will heed your advice, and leave AVG off. I like the idea of being able to safely run a system without it.
Oh, and when I woke up this morning, I found I didn't mind the interface so much. I'd still like to get a theme installed though. I've tried four or five from Gnome-look that were actually labeled "themes" (and appeared to follow the correct format), but so far I get an error when I try to install any one of them.
Also good to know that rebooting can be considered a last resort. It's one of the few things that, in my case, Ubuntu doesn't seem to do a whole lot faster than Windows did. And of course, if I rarely have to do it, that's just fine.
Actually, after the fiasco with my video I did consider putting Windows back on. I didn't want to, but I have work to do, and I depend on my computer for it. The spare beside me isn't really sufficient. But then I realized that, with my continued unwillingness to install XP on a system of my own, ever, there are so many security updates (and hence, reboots) to be done that I'd be there all night just getting Windows back to where it was supposed to be. And then, of course, I'd have to go and install Firefox and OpenOffice, and all my communications/archiving/image editing stuff, etc., etc. And wait... Ubuntu already includes all of this. So, clearly faster to install it twice than to install Windows once.
Quigley Wrote...
Wednesday, April 11th 2007 at 3:53pm
Oh, and another comment I have to make here. I thought Windows Update had fairly decent download speeds at most times of day. Then I installed Ubuntu. 750kB/s??? What is this, Star Trek?
I'm curious to know, is Linux making better use of my bandwidth somehow? Do the software repositories just have ass kicking connections? Or, is it maybe some of both?
SmrtySsa Wrote...
Wednesday, April 11th 2007 at 4:22pm
Linux (unix) networking is typically better. Always has been. Wait til you try and copy large files from a windows box and it runs like shit. There's always this "strange" speed killer between windows and linux.
At work for example, I have my linux laptop, mac workstation, and windows workstation. It's not always super consistant; Here's a little speed chart of what I average:
linux <-> Mac = 8MB/s
linux <-> Win = 250KB/s
Mac <-> Win = 400KB/s
And yeah, 6.06LTS vs. 6.10 does make a difference, especially for a n00b. As ubuntu continues to evolve, they are releasing long term support (lts) versions every 3 years, which gets just that.. long term support. You'd definitely find more/easier support for it. The on the path to 6.10 they changed a _lot_ of underlying technical features, which can get confusing if you read help from 6.06 and try to apply it to 6.10...
But, if you're going to change anything at this point, I say go for 7.04 :)
prev . 1 . next
10 Comments
You must be Logged in to leave comments.
SmrtySsa Wrote...
Tuesday, April 10th 2007 at 10:36pm
I'm going to assume you installed 6.06 (LTS)...