jump to navigation

Compiling and Using Newest Nvidia drivers in Ubuntu – It’s easier than you think April 10, 2007

Posted by amazingrando in Linux Tips.

Nvidia control panel (pic thanks to jdk)
Nvidia control panel (pic thanks to jdk)

There are many ways to use open and proprietary graphics drivers for your Nvidia card in Ubuntu, as can be found at the Ubuntu Guide. But, if you want the latest drivers from Nvidia complete with all of their optimizations you’ll need compile and install it. Happily, it’s not too hard.

The following should work equally well on Edgy and Feisty. I’ve tried it on both and it worked for me, but your mileage may vary. Also, remember to back up your files, such as etc/X11/xorg.conf before you embark on this – just in case. Much of this is inspired by RYX’s Compiz install guide, so many thanks go to him. Finally, you might want to print this out to guide you through the process.

Step 1 – Getting the drivers from Nvidia

You can get them from their website. For most people, choose Linux IA32 latest version.

Step 2 – Compilation dependencies

The Nvidia drivers have a shell script to install and compile, but they’ll need some dependencies, which can done by typing the following in the terminal.

sudo apt-get install linux-headers-`uname -r` build-essential gcc gcc-3.4 xserver-xorg-dev

Step 3 – Clean out the old Nvidia drivers

First, you’ll need to purge the nvidia-glx driver

sudo apt-get remove --purge nvidia-glx

Second, you should make sure that the linux-restricted-modules for nvidia are disabled (blacklisted).

sudo gedit /etc/default/linux-restricted-modules-common

Note that it may be linux-restricted-modules on pre-Feisty systems.  You’ll know if it’s not the right one if the file you open is blank.

There, put in the following code, and save.


Step 4 – Reboot

This isn’t probably necessary, but good to make sure the purged stuff isn’t still loaded

Step 5 – Stop the X server (i.e. Gnome) and go to a command line interface. Note that this is/was a bug in the Feisty beta that may prevent you from doing this command.

sudo /etc/init.d/gdm stop

Step 6 – Run the installation script

sudo sh NVIDIA-Linux-x86-1.0-*-pkg1.run

Follow prompts to accept the license, and look for a pre-compiled kernel. Eventually it will ask you to compile a custom one, which is what you want.

After it finishes it will ask you to modify the xorg.conf file. Choose yes.

Step 7 – Finishing up

Hopefully the compile went fine and you’re back at the command line. If so, now we want to add a couple of optimizations to the xorg.conf file, by running the following commands.

sudo nvidia-xconfig --composite
sudo nvidia-xconfig --render-accel
sudo nvidia-xconfig --allow-glx-with-composite
sudo nvidia-xconfig --add-argb-glx-visuals

Step 8 – Reboot and cross your fingers!

If all went well, when you reboot you should see a gray Nvidia logo as Ubuntu finishes loading up. If you see that, give yourself a pat on the back – you did it!


Restoring Windows MBR – fixmbr is your friend April 5, 2007

Posted by amazingrando in Windows-Linux Transition.

(pic thanks to articnomad)
(pic thanks to articnomad)

Update: These are instructions if you’re restoring under Windows XP.  If you want to restore with Windows Vista, then see my new post.

I’m going to be setting up a new computer with Ubuntu on it, so I want to take Ubuntu off a machine that’s dual boot with Windows and leave that system to just run Windows. Removing Ubuntu is as easy as deleting its partitions (/, swap, etc.). But then you’re left with GRUB. If you want to uninstall GRUB and have it boot into Windows normally, then you need to do the following:

  1. Boot from the Windows CD
  2. Select R for Recovery Console
  3. Type the number of your Windows install (usually 1) and hit enter
  4. Type in the administrator password
  5. Type fixmbr and hit enter
  6. Answer yes when it asks you to overwrite the MBR
  7. Type exit, which will then reboot the system and everything should work
  8. Enjoy!

Just a reminder of the obvious in light of cronek’s experience – make sure you backup before you do this!  Also, if you have anything more complicated than a dual-boot (XP/Linux) setup, you may want to consider something like Acronis Disk Director.

Changing Permissions of a Partition — it’s easy! April 5, 2007

Posted by amazingrando in Windows-Linux Transition.
1 comment so far

(pic thanks to articnomad)
(pic thanks to articnomad)

I ran into the issue of a partition that was read-only, and it was the classic issue of permissions. In this case, I wanted to change the permissions to make it consistent with the rest of my partitions. There are a lot of complex ways of doing this, but this is just for everyday Ubuntu use. Thanks to taurus for the tip.

First, check to see what the ownership is by going to /media and doing a ls -la

Second, do the following, replacing “yourPartition” with the name of the partition (e.g. /sdb1).

sudo chown -R username:username /yourPartition
sudo chmod -R 755 /yourPartition

Finally, check to see if it worked by doing another ls -la

From Recovery Mode to Normal — without rebooting April 5, 2007

Posted by amazingrando in Windows-Linux Transition.
add a comment

So you’ve booted into Ubuntu using recovery mode (command line) because you had some issue. Now that it’s fixed (unless it explicitly requires a reboot), then why reboot? All you need to do is change the runlevel from runlevel 1 to runlevel 3:

telinit 3

VMware Server 1.0.2 Problems in Feisty – solution April 5, 2007

Posted by amazingrando in Linux Tips, Windows-Linux Transition.
add a comment

(pic thanks to shaymus022)
(pic thanks to shaymus022)

Installing VMware server means that you need to get your hands dirty in the command line, but it’s not too bad. No need to worry about permissions, dependencies, or kernel compiling.

That being said, VMware server doesn’t want to install without problems on Feisty. The easiest solution (and one that worked for me) is to incorporate the 1.0.8 patch. handband2 nicely outlines the steps in his post. Solution. But, keep in mind that it’s ok for the install to abort. That’s when you apply the patch and the install is restarted. From there on, it’s just as normal.

Running Windows in Ubuntu April 4, 2007

Posted by amazingrando in Windows-Linux Transition.
1 comment so far

As try to make Ubuntu my main OS, I have found a few cases where I haven’t yet found a suitable Linux alternative to a Windows app. In this case, it’s EndNote, which I use for my research. Part of the reason I use it is because it integrates well with library and article databases. But, to use the cite-as-you-write functionality, it needs to integrate with Microsoft Word.

Option 1: Wine
Wine lets you run certain Windows apps directly in Ubuntu by using alternative versions of Windows dll’s. There’s also a commercial version called CrossOver. Both are notoriously finicky. I did manage to get Word and Endnote running, but they can’t integrate.

Option 2: KVM
New in Ubuntu Feisty 7.04 is Kernel Virtualization, called KVM. Given that Feisty is still in beta, it’s no wonder that it seems a bit flaky. There’s serious potential with this solution. It’s open source and uses the hardware virtualization technology built into most dual and quad core processors. But a quick attempt at getting it running didn’t work – the installer dies when it tries to boot windows. Hopefully soon this will work. Any ideas – let me know.

Option 3: VMware Server
VMware is proprietary and can be a resource hog, but it is a very solid product. It has never let me down. And, it’s free! Until KVM is more mature (or I know what the heck I’m doing with it), I’ll be sticking with VMware.

Starting and Stopping Gnome — You don’t need to reboot! April 4, 2007

Posted by amazingrando in Linux Tips.
add a comment

Everyone tells me that Ubuntu, like other *NIX operating systems are great because you rarely need to reboot. Today I figured out just how true that is. I was updating the Nvidia driver and I needed to stop the X server, in this case Ubuntu’s Gnome Desktop (GDM). By doing this the whole system is still running, but the window manager is shutdown and you’re just in a command line. After saving any open files, you can do this as easily as running the following command:

sudo /etc/init.d/gdm stop

Once you’re done you can start it back up again by doing almost the same command:

sudo /etc/init.d/gdm start

Doing the latter will bring up Ubuntu’s window environment, the Gnome desktop, and you’ll be back to where you were. All of this without having to reboot!

The Little Things – unclutter April 4, 2007

Posted by amazingrando in Linux Tips.
add a comment

One thing that bugs me in Windows or in Ubuntu is when the cursor (pointer, I bar, etc.) is in the way of what I’m looking at on the screen. When I’m not moving the mouse, it should disappear until the mouse is moved again.

The Debian (on which Ubuntu is based) Package of the Day posted a great little app for just this called unclutter. Check out the details, or if you’re lazy, just do the following from the terminal:

sudo apt-get install unclutter

unclutter &

You should also add this to your startup. In Ubuntu (which uses Gnome), go:

System -> Preferences -> Sessions

Click New and then give it a name like Unclutter and put unclutter & in the command box, then click Ok. That’s it. It’ll load the next time Ubuntu starts.


The Penguin Trail Starts Here… April 4, 2007

Posted by amazingrando in General, Windows-Linux Transition.
add a comment

Welcome to The Penguin Trail, my little blog to share some of the insights of moving from Windows XP to Ubuntu Linux, and other geeky tidbits.

Why am I making this move, you make ask. Well, here are some of the reasons:

  • Free/Open Source Software (FOSS) lowers the barriers to access to the latest technology for those of limited means, everywhere in the world. The more people who use FOSS, the better it gets.
  • Linux can be stupid simple to use, but also amazingly powerful and customizable. I like that mix
  • Windows can be really annoying. It’s bloated, not particularly stable, and most applications are commercial (which = expen$ive)
  • Linux is free and community support can be amazing. For example, I reported a bug in Ubuntu (see the Launchpad) and had developers asking for more information within a few hours. Another time I had a quick question about whether upgrading my CPU would be automatically detected by Ubuntu. I hopped on an IRC channel and had my answer within two minutes. Can you imagine that with Microsoft?
  • Because it’s cool

Taking the plunge

P.S. The Linux icon is a Penguin, in case you didn’t know