Install NVIDIA Display Drivers: Ubuntu 10.04, Sony VAIO F Series

I recently bought a Sony VAIO F Series laptop (VPCF11Z1E, to be precise). It has a GeForce GT 330M installed and I decided I wanted to dual boot with Ubuntu 10.04. I thought that enabling the 3D acceleration would be as simple as turning on the restricted driver, but I was sadly mistaken. Here’s how to get it working.

Head over to the download section on NVIDIA's web site and obtain the appropriate driver. Place it somewhere you can easily find it; the Downloads folder in my home area worked fine for me. The way I got the driver installed was to (broadly speaking) following the instructions found in a post on the Ubuntu Forums, specifically TheRawGod's post (thanks :) ).

First I blacklisted some drivers. To do this open a terminal and use the following commands. Note that I like to use vim (Vi–IMproved) but you will need to install this (sudo aptitude install vim). If you want something really straightforward, just use nano. I also tend to kick off with a sudo su so I can just do everything as root.


sudo su
cd /etc/modprobe.d/
vim blacklist.conf

Add the following to the end of the file:


blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv

Drivers to blacklist

Drivers to blacklist

Once completed, save the file. The next step is to update GRUB so it will prevent the nouveau driver from loading automatically at startup. To do this, perform the following:


cd /etc/default
vim grub

Now add GRUB_CMDLINE_LINUX=”nouveau.modeset=0″ at the bottom of the file.

Disable nouveau driver

Disable nouveau driver

Save the file and invoke update-grub. Reboot and you should be presented with a horrible looking low-res login (which is good, for now!).

Next you will need to install the NVIDIA driver you downloaded earlier. Press Ctrl-Alt-F1 to bring up a Teletype terminal and login. Then run the following commands (replace the location for that of your download) to get the driver installed.


sudo su
service gdm stop
cd /home/mike/Downloads
sh NVIDIA-Linux-{driver version}.run

Follow the on–screen prompts to install the NVIDIA driver (just accept the defaults and always choose to continue). If you are told that you have an X server running and have definitely stopped gdm, try the following:


rm /tmp/.X0-lock

Once the driver is installed, there is a final step to make sure the Sony display panel is properly recognised by NVIDIA's driver. Run the following commands:


cd /etc/X11
vim xorg.conf

Add the following lines to the bottom of the file, immediately before the “Display” SubSection:


Option "ConnectedMonitor" "DFP-0"
Option "CustomEDID" "DFP-0: /proc/acpi/video/NGFX/LCD/EDID"

Note that I originally added this to the end of the “Device” Section, but a subsequent reinstall of the NVIDIA driver after a kernel update caused it to be placed in the section referenced above.

Edited Screen Section

Edited Screen Section

Please remember that you will need to be root or use sudo to execute most of the above commands. I also found that after a kernel update, it is necessary to repeat the driver install from the point where I stop the Gnome Display Manager (run Ubuntu in low–graphics mode one time only, switch to a Teletype terminal, stop the Display Manager and reinstall the driver).

About Mike