- Ubuntu Wiki
- Rationale
- Use Cases
- Scope
- Design
- Implementation
- NvidiaManual
- Complete Manual Install
- Obtaining Needed Software
- Disable Conflicting Software
- Prepare Configuration Files
- Install the Driver
- Configure
- Load driver on boot
- Kernel and Mesa Updates
- Uninstalling the Driver
- It didn’t work! (Troubleshooting)
- Installation with Envy/EnvyNG
- Uninstalling the Driver
- Free alternative
- See Also
Ubuntu Wiki
We want to make it easy for users to become aware of the possibilty of enabling additional restricted drivers and provide support for more drivers.
Rationale
Feisty’s restricted-manager is limited to configuring drivers which are directly mapped to an already existing available kernel module; there are situations where this is not the case.
We also do not enable all drivers by default. If the set of unused drivers changes (or, as a special case, when we boot the system the first time), we want to notify the user about the possibility of installing additional drivers.
Use Cases
- Pitti has a Broadcom WiFi card in his laptop. The driver loads automatically, but it does not work at all by default. r-m points out that this driver needs non-free firmware. Pitti agrees to enable it, then he is asked for a source of the firmware (Windows installation, CD, or URL). bcm43xx-fwcutter extracts and installs the firmware and reloads the driver.
- Jani installs a new Ubuntu box which has an ATI card. r-m tells him that he can install a restricted driver for his hardware. He clicks on the notification, sees that he can enable the ATI driver and does so.
- Scott installs Gutsy in VMWare. r-m tells him that he can install the ‘VMWare tools’ for improving the work with the guest system and sets them up if Scott agrees.
Scope
These changes apply to a standard Ubuntu installation and the Ubuntu live system. Once we get a KDE frontend of restricted-manager, it will apply to Kubuntu as well.
Design
- Keep track of the list of available, but unused modules. Whenever there are changes, r-m displays a notification: In order to use your hardware more efficiently, you can enable drivers which are not free software. When the user clicks on the tray applet, r-m opens.
- Provide support for additional device handlers which are not related to a kernel module (vmware) or need non-free firmware (bcm43xx).
- Provide a way how to group a set of modules into one handler, since e. g. the 25 non-free OSS modules or the 5 VMWare modules are not enabled independently from each other.
Implementation
- r-m already has code to handle the caching of the «used» lists. This will be generalized and reused to manage the list of unused modules. The check will be done along with the updating of used modules in restricted-manager --check.
-
- RestrictedManager.core.get_handlers() currently only considers handlers which have a matching kernel module. This will be extended to always try to add instances of a new subclass NonModuleHandler of DefaultHandler. Their constructors need to check the current system state and should just fail if they are not applicable.
- These additional handlers can be shipped either in the restricted-manager package itself, or in linux-restricted-modules-common, depending on where it is easier to maintain. The latter package only contains infrastructure for restricted kernel modules and only contains free software, so it will always be installed by default.
- Device handlers can ship a list of kernel module names or a regular expression over module paths if they want to care about an entire set of drivers.
- r-m currently contains a code of xorgconfig.py, stolen from displayconfig-gtk, which in turn stole it from KDE guidance. This module should be provided in a python-xorg-config package. The xorg.conf spacing fixes which are applied to r-m’s version should be incorporated in that.
RestrictedManagerImprovements (последним исправлял пользователь localhost 2008-08-06 16:40:20)
The material on this wiki is available under a free license, see Copyright / License for details.
NvidiaManual
This is not the recommended way to install the NVIDIA drivers — please see BinaryDriverHowto/Nvidia for the supported method. Any problems that occur after using the following instructions should not be reported to the launchpad bug area. If the drivers were downloaded from the NVIDIA web site then the NVIDIA Linux web forum is an appropriate place to report issues. Other places for binary driver manual installation support can be found on the Community Support page.
Sometimes using the drivers in the Ubuntu repositories is not the best option. Here are some reasons to install the NVIDIA restricted drivers manually:
- your card is too new, and is not supported by the Ubuntu provided binary packages.
- bugs are present in provided packages that are fixed in later drivers not yet distributed by Ubuntu.
- newer drivers provide a new feature not yet available in the Ubuntu packages.
The purpose of this page is to detail the necessary work to install the official NVIDIA Linux driver from www.nvidia.com. Note that this will not fix resolution problems, for that you need to see the FixVideoResolutionHowto.
Complete Manual Install
Obtaining Needed Software
First, make sure that your /etc/X11/xorg.conf is backed up.
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
Next, download the right drivers for your platform from the driver download page or the NVIDIA Unix Driver portal and save them to your home directory.
Open a terminal, and run the following command:
sudo apt-get install build-essential linux-headers-`uname -r`
If you receive the «Unable to locate package» error, run the command:
and insert the output into the «uname -r» portion of the former command.
It should then look something like this:
sudo apt-get install build-essential linux-headers-2.6.35-22-generic
Or you can use simply run this:
sudo apt-get install build-essential linux-headers-"$(uname -r)"
sudo apt-get install linux-source-`uname -r` cd /usr/src sudo tar xvjf linux-source-`uname -r` sudo ln -s linux-source-`uname -r` /usr/src/linux
The above command might print an error similar to the following:
E: Couldn't find package linux-source-2.6.20-16-386
In such case you could try following
sudo apt-get install linux-source
The following command will then probably need adjustment also.
Disable Conflicting Software
Using Synaptic or apt-get, uninstall nvidia-glx, nvidia-glx-legacy, nvidia-glx-new and nvidia-settings if they are installed.
Open or create the /etc/default/linux-restricted-modules-common file with an editor, in Ubuntu use
gksudo gedit /etc/default/linux-restricted-modules-common
kdesu kate /etc/default/linux-restricted-modules-common
DISABLED_MODULES="nv nvidia_new"
Note: In Ubuntu 7.04 the nvidia_new is explicitly required in addition to nv on the DISABLED_MODULES line. See this launchpad bug about lrm-manager failing to disable the nvidia_new module when nv is specified alone. Additionally you may need to manually remove the hidden /lib/linux-restricted-modules/.nvidia_new_installed file.
Prepare Configuration Files
The next step is to edit your xorg.conf file. This may not be needed in Hardy Heron and newer, but check anyway, esp. if you have upgraded from older versions of Ubuntu.
gksudo gedit /etc/X11/xorg.conf
kdesu kate /etc/X11/xorg.conf
Find the section Module and comment out DRI using the # symbol, such as in the following example.
Section "Module" Load "bitmap" Load "dbe" Load "ddc" # Load "dri" Load "extmod" Load "freetype" Load "glx" Load "int10" Load "record" Load "type1" Load "vbe" EndSection
Now find the section Device, and change the Driver from nv (or vesa, fb, etc) to nvidia, as in the following example, and then save it.
Section "Device" Identifier "Card0" Driver "nvidia" #This is where you change it EndSection
Now that your Xorg.conf is saved, we need to shutdown the X11 server so that we can install the new drivers. To do this, save your work and press ctrl-alt-f1, and log in. Then run the following command to shutdown X11. Make sure your work is saved, Gnome/KDE is going to shutdown too.
For Ubuntu 11.10 or higher:
sudo /etc/init.d/lightdm stop
Install the Driver
Useful tip, typing the first few letters and hitting the Tab key will auto-complete the name, saving you from using wildcards like *
First navigate from the tty to the directory where you saved the install file (I will use /path/to/installer), then set executable permissions on it:
cd /path/to/installer sudo chmod +x NVIDIA*
You can start the install script with the following command:
The installer will now walk you through the steps required. Assuming success, you can now restart your X11 server using:
For Ubuntu 11.10 or higher:
sudo /etc/init.d/lightdm start
Configure
You can now change settings for your video setup. In Ubuntu, go to Applications->System Tools->NVIDIA X Server Settings (or sometimes System->Administration->NVIDIA X Server Settings depending on the driver and/or install method). Alternatively, use the terminal:
For setting up dual head, see NvidiaMultiMonitors.
Load driver on boot
The X server will start in low-resolution if the nvidia driver is not loaded on boot, so
$ sudo gedit /etc/modules and add a line containing nvidia
Kernel and Mesa Updates
Every time a new kernel comes out you will probably have to manually rebuild the NVIDIA binary driver kernel module. This can be done by booting to the new kernel and then running:
on the previously downloaded NVIDIA installer file.
Additionally, any time that the mesa packages are updated you will have to reinstall the NVIDIA .pkg again.
Uninstalling the Driver
Sometimes it is necessary to uninstall the driver, like before a version upgrade of Ubuntu or if the installation fails or is no longer needed. For a manual install, you can remove the driver using the installer file:
You will probably be asked to reboot the computer.
It didn’t work! (Troubleshooting)
- Was Xorg already properly configured for the nv driver?
- Did you disable the loading of Ubuntu provided NVIDIA drivers using DISABLED_MODULES="nv nvidia_new" in /etc/default/linux-restricted-modules-common ? This is a common cause of driver mismatch errors on manual installations due to conflicts with the Ubuntu provided NVIDIA binary driver.
- You may need to remove the file /lib/linux-restricted-modules/.nvidia_new_installed
- Did you remove the nvidia-glx/nvidia-glx-legacy/nvidia-glx-new and nvidia-settings packages?
- Did you read the log found in /var/log/nvidia-installer-log for errors that can guide you?
- Did you check the output of dmesg ?
- Did you install the kernel headers (and possibly source package)?
- Did you check the NVIDIA readme found on their site to make sure your card is supported with that version of driver?
- Did you check the NVIDIA Linux Forums for any current ‘known issues’ with the latest drivers?
- Did you ask in #ubuntu on irc.freenode.net or any of the other places mentioned on http://www.ubuntu.com/support/communitysupport ?
Installation with Envy/EnvyNG
- directions are provided on that site for installing the correct version of Envy, as well as some general troubleshooting tips.
EnvyNG is available in the Universe repository in Hardy Heron and later. Older versions of Ubuntu using Envy Legacy can download the .deb file from Envy’s website.
After installing, EnvyNG can be found from Applications->System Tools->EnvyNG in Ubuntu. You will want make sure you select NVIDIA drivers, not ATI:
Navigate there and click Apply, and the program will do the rest. You can then configure your card as described under the complete manual install section above.
Uninstalling the Driver
Sometimes it is necessary to uninstall the driver, like before a version upgrade of Ubuntu or if the installation fails or is no longer needed. With Envy/EnvyNG, you can uninstall the driver directory from the program, see the above screenshot — it is the third choice. You will probably be asked to reboot the computer.
Free alternative
There is Nouveau: an open source driver with acceleration for NVIDIA cards. Currently (2008), there is 2D-support, and a very limited 3D support for extremely lucky developers. See http://nouveau.freedesktop.org/wiki/. Users that have installed the proprietary driver can help the development of Nouveau by sending information about their cards, see http://nouveau.freedesktop.org/wiki/REnouveauDumps.
See Also
Here are some other resources of interest:
- BinaryDriverHowto/Nvidia
- NvidiaMultiMonitors
- Envy and EnvyNG — Automated script to build and install the latest official NVIDIA binary driver.
- http://wiki.debian.org/NvidiaGraphicsDrivers
- NVIDIA web forum Ubuntu installation notes — NVIDIA’s guide to installing their binary driver .pkg on Ubuntu.
NvidiaManual (последним исправлял пользователь c-98-224-250-75 2015-05-30 01:32:49)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details