- Ubuntu Documentation
- NVIDIA drivers provided by the Ubuntu repositories
- Removing Nouveau (advanced/expert users)
- Installation without X / from the console
- Installation Fails
- Driver Not Active
- Boot Splash Screen Issues
- Can’t Save Settings
- Some text (for example in menu) is rendered incorrect
- Onboard Graphics Chipset
- Low/Missing Screen Resolutions
- Low Resolution Icons and OS Features
- Screen Blanks/Monitor Turns Off
- Problems with Video Playback
- Creating Application Profiles
- NVIDIA Optimus
- Using prime-select method
- Using NVIDIA PRIME render offload method
- SLI / Multi-GPU
- SLI Application Profiles for ID Tech 4 Engine Games
- Filing bug reports
- NVIDIA driver from the Ubuntu repositories
- Reporting an upstream bug
- See Also
By default Ubuntu will use the open source video driver Nouveau for your NVIDIA graphics card. This driver lacks support for 3D acceleration and may not work with the very latest video cards or technologies from NVIDIA.
An alternative to Nouveau are the closed source NVIDIA drivers, which are developed by NVIDIA. This driver provides excellent 3D acceleration and video card support.
NVIDIA drivers provided by the Ubuntu repositories
What package one would use depends on the version of Ubuntu one is using, and what graphics card one has installed.
Usually you will see a notification and/or an icon in the top panel, reminding you that restricted drivers are available.
By clicking the icon you will be taken to a dialog where you can choose which version you want to install, choose the recommended driver.
If you are using an older version of Ubuntu, or if you aren’t notified about additional drivers, you can launch the installation yourself.
Go to Software & Updates -> Additional Drivers
Removing Nouveau (advanced/expert users)
Nouveau is installed by default. It’s possible to remove it completely, but it is not necessary and therefore not recommended.
If you still desire to remove it, you can do so by entering the following command in a terminal:
Installation without X / from the console
The jockey-text command was removed with the release of Ubuntu 14.04. You can now use ubuntu-drivers to get the list of packages for each driver, and then install the packages using apt-get. For example:
If the restricted driver remains unactivated after attempting to activate it in the Additional Drivers dialog, you may not have the appropriate linux headers installed to compile the driver. Ensure that the linux-headers-XXX and linux-restricted-modules-XXX packages are installed, where XXX matches the version of the kernel you are using.
If the activation hangs on download/install dialog, you can install the driver using System -> Administration -> Synaptic Package Manager, make sure you pick the latest driver version recommended by the Additional Drivers tool and all its dependencies. Then go to the Additional Drivers tool and activate the driver you just installed.
Driver Not Active
X has not been configured to use the new driver. Open a terminal, run sudo nvidia-xconfig, and restart X (reboot works).
If you have full disk encryption enabled you have to run the command
Boot Splash Screen Issues
Open up a Terminal and install the Startup-Manager:
Launch the Startup Manager from System -> Administration -> Startup-Manager.
In the Boot options tab, change the resolution to something your monitor can handle (1024×768 is usually enough for the boot screen to look nice).
Change the color depth to 24 bits and press the Close button, reboot your system.
Can’t Save Settings
nvidia-settings can’t write to xorg.conf if it hasn’t been started with administration privileges. Make sure you start nvidia-settings with the following command:
Some text (for example in menu) is rendered incorrect
With a Ge Force 7600, after installation of the nvidia driver in Ubuntu 14.04 some text and icons are rendered incorrectly, sometimes content is displayed distorted in a triangle instead of a rectanglar window, and X resets intermittently.
Using nouveau the XGA resolution 1024×768 is configured and works. However, manually changing to a different resolution with xrandr, etc. fails.
In order to address these issues, install nvidia-304-updates driver, and change the resolution from auto to something different in nvidia X server settings.
If you use an old NVIDIA driver, hibernation and/or suspend may not work. Here is a potential work around:
We need to edit xorg.conf, open a terminal and enter the following command:
In the section called Section "Device" add Option "NvAGP" "1", you should end up with something like this:
Blacklist the intel_agp module from being loaded by the kernel. This is done by editing blacklist.conf, open a terminal and type:
Then add the following line: Reboot your system.
Onboard Graphics Chipset
Low/Missing Screen Resolutions
Often screen resolutions on offer are far lower than those offered with the open source driver. The NVIDIA binary driver seems to be very weak at reliably probing this information from the monitor and relies on additional information in xorg.conf.
To fix this you can add more resolutions by entering the following in a terminal:
Replace the dots with the desired resolution. For further details and potential workarounds see X config resolutions.
Low Resolution Icons and OS Features
If you have problems with low resolution icons, shortcuts and menus placed strangely, and especially desktop size not matching your monitor, this may be due to a bug with multiple monitor setup. If you’ve previously setup a second monitor and have it plugged in but not turned on, Ubuntu/Xubuntu may be counfounded by this. The simplest method to resolve this is to remove the redundant cable from your machine and reboot. Additionally, install arandr (GUI for xrandr editing) and setup two profiles, one with the secondary monitor and one without. Removal of redundant cable when not in use is nonetheless still recommended. This problem was experienced in Ubuntu and Xubuntu.
Screen Blanks/Monitor Turns Off
Using a laptop with a GeForce Go card, or connecting the sole display via DVI on a dual-head system sometimes results in the screen not receiving a picture. This is caused by the driver outputting video to the VGA port on the graphics card, instead of DVI.
The usual hint that you have this problem is when you hear the startup sound but nothing appears on the screen. If you do not hear any sound, you are more than likely experiencing unrelated problems.
This is a bug about displays on digital outputs being blank when using NVIDIA driver, and can be resolved by editing your /etc/X11/xorg.conf file:
Switch to the console by using ctrl+alt+F1, or reboot and select recovery mode from the GRUB menu.
Open and edit xorg.conf like this: sudo nano /etc/X11/xorg.conf.
Find the line that says: Section "Screen"
Insert a new line that says Option "UseDisplayDevice" "DFP".
Save the file. If you had to restart into recovery mode, type reboot, otherwise restart your display using sudo /etc/init.d/gdm restart.
Problems with Video Playback
If you have problems with video playback in e.g. mplayer, gxine, or mythtv frontend with a legacy card, it may be due to too high a color depth (e.g. using NT6 Vanta/Vanta LT «nvidia» driver, I experienced flickering vertical bars & blue screen flashing). To fix this, manually edit /etc/X11/xorg.conf and change DefaultDepth to 16.
Creating Application Profiles
nVidia X Server Settings has an application profiles editor much like the Windows counterpart (nVidia Control Pannel) that allows you to set special parameters per-application. For manual text file editing read the Application Profiles ReadMe included in the nVidia for Linux Driver ReadMe. It is quite detailed on where the file locations are, how to enable or disable application profiles completely and what arguments you can use.
For using the nVidia X Server Settings? Follow this basic guide (I’ll use Quake 4 as an example)
- Open up nVidia X Server Settings
- Go to «Application Profiles»
- Make sure the check box is selected for «Enable Application Profiles» otherwise the Application Profiles won’t work.
- Click the Add (+) Button for detection rules to «Add a Rule»
- Make sure for «Rule Pattern» the feature will be used if «Process Name (procname)» is selected
- For «Matches this string» put in the application name (in this example, quake4)
- For «Rule Profile» click on «New Profile»
- In the new popup window, change the profile name to something easy to reference to (in this example I’ll name it the same as quake4app)
Now, enter any profile settings. You can find the full list in the Application Profiles ReadMe. (in this example, we would select «GLDoom3» from the drop-down menu list to create an SLI Profile for ID Tech 4 Engine-based games)
We’ve now created an application profile. One of these days I will list the different process names for ID Tech 4 engine-based games for Linux and their procname’s so anyone could easily create working SLI Profiles for these games. I’ve attempted to use GLDoom3 on other game engines such as the Spark Engine used by Natural Selection 2. sadly it only made the game run at the speed of one GPU, still not enabling the second one to work in SLI outside the ID Tech 4 Engine.
For which application profile variables one can use please refer to OpenGL Environment Variables in the nVidia for Linux driver’s ReadMe (link current to 343.22)
NOTE: The OpenGL Environment Variables are not all listed in the ReadMe. GLDoom3 for example is only discussed in the SLI portion of the driver’s ReadMe.
Nvidia Optimus is a computer GPU switching technology created by Nvidia which, depending on the resource load generated by client software applications, will seamlessly switch between two graphics adapters within a computer system in order to provide either maximum performance or minimum power draw from the system’s graphics rendering hardware.
A typical platform includes both a lower-performance integrated graphics processor by Intel and a high-performance one by Nvidia. Optimus saves battery life by automatically switching the power of the discrete graphics processing unit (GPU) off when it is not needed and switching it on when needed again. Unfortunately, automatic switching between integrated GPU and discrete GPU is not fully supported in Linux.
There are several options available in Ubuntu:
Using prime-select method (nvidia-graphics-drivers-435 or older)
Using NVIDIA PRIME render offload method (nvidia-graphics-drivers-435 or newer)
Using prime-select method
You can use either integrated Intel GPU or discrete NVIDIA GPU with this method. After installing proprietary NVIDIA Driver, to switch integrated Intel GPU, simply run this command:
To switch NVIDIA GPU, run this command:
NOTE: After running the commands above you have to reset your computer or logout then login to your session.
To determine which GPU is being used, run this command:
If you don’t prefer using terminal, you can switch between cards with NVIDIA X Server Settings:
Using NVIDIA PRIME render offload method
This method is available since NVIDIA Driver 435.17. After installing proprietary NVIDIA Driver, X Server should automatically configure NVIDIA PRIME render offload, but for some reason if you need to configure this explicitly, for example if you have a dual screen setup, create a new configuration:
Fill the configuration with the following content:
After rebooting your system PRIME render offload should be available for your system. Make sure that you’ve selected this option in NVIDIA X Server Settings:
To run the graphical application with discrete GPU, use this command:
Or you can install prime-run package from Launchpad PPA, which is a packaged version of the command above.
Alternatively, if you are using GNOME Desktop Environment 3.36 and newer, you can right click to applications in application dock and select Launch using Dedicated Graphics Card option.
NOTE: NVIDIA Pascal and lower architecture graphics cards does not fully power off with this method for the time being.
SLI / Multi-GPU
NOTE: This was last tested with nVidia 343.13 drivers. Despite these drivers adding support for the GTX Titan Z, a Multi-GPU videocard it still does not support SLI. So, the GTX Titan Z is reduced to a single GTX Titan in Linux. The same goes for other nVidia Multi-GPU cards such as the GTX 690. sad
Current limitations (last tested on 343.22) on nVidia’s drivers are as follows:
Linux only support SLI & Multi-GPU (Two-GPUs-on-one cards such as the GTX 690) can be enabled, but only via command prompts in the Terminal.
TwinView is also not supported with SLI or Multi-GPU. Only one display can be used when SLI or Multi-GPU is enabled, with the exception of Mosaic.
Alternate Frame Rendering (AFR) is supported. This SLI mode uses each card to render one frame then the next card renders the following. For example, in two-way AFR, GPU1 renders frames 1, 3, 5, etc. and GPU2 renders 2, 4, 6, etc. Outside of the ID Tech 4 engine Alternate Frame Rendering does not work on any card other than the first which causes framerates to drop by 50%. This is a known bug and nVidia are currently working on this issue.
SLI Profiles are NOT included with the drivers unlike the Windows version of the nVidia drivers. They must be manually created for ID Tech 4 Engine-based games. To learn how to make them yourself, please read the Creating Application Profiles section of this wiki page.
Split Frame Rendering (SFR) is also supported. This mode uses the first GPU to render the top half of the screen, and the second GPU to render the bottom half. This mode also does not function correctly outside of ID Tech 4. It will still render the full screen, but only at the speed of a single GPU.
Alternate Frame Rendering mode 2 (AFR2) is NOT supported in Linux. This mode is opposite of Alternate Frame rendering by instead using the last GPU as the primary, and every GPU above it as the next in line. For example, in three-way AFR2? GPU3 renders frames 1, 4, 7, etc. GPU2 renders frames 2, 5, 8, etc. and GPU1 renders frames 3, 6, 9, etc. In Windows, AFR2 is the preferred SLI mode as it tends to yeild higher performance over AFR. My theory is because GPU1 is the primary card for video out, it uses a different GPU for the primary calculations it better balances the work load. I have not seen any documentation as to the specific reason AFR2 performs better.
Despite what was mentioned above, if you wish to try SLI here’s how to enable it via the terminal:
- Open up Terminal.
- Use the following command of your choice: sli=on (enables SLI) sli=auto (Allows nvidia-xconfig to automatically enable SLI if it detects an SLI-ready setup) sli=afr (enables SLI in AFR mode) sli=sfr (enables SLI in SFR mode).
- Put in your password
- Reboot Ubuntu (sudo reboot via terminal or via the GUI)
- Open up the «nVidia X Server Settings» program
- Select any GPU in the list, and look for the screen output. If SLI is indeed enabled? It will say «(SLI)» at the end of the detected screen output.
The Only difference is if you have a Multi-GPU (such as the GTX 690) you change the argument of sli to multigpu. Terminal commands:
If you have Multi-GPU cards in your system in SLI (such as two GTX 690’s with the appropriate SLI bridge) you just have to mix the commands together. Terminal commands:
SLI Application Profiles for ID Tech 4 Engine Games
The Application profile examples I have below are for:
Enemy Territory: Quake Wars (etqw-rthread.x86 & etqw.86)
Doom III (doom.x86)
Quake IV (quake4smp.x86 & quake4)
NOTE: This list was compiled with NVIDIA 343 drivers.
Essentially, just enable «GLDoom3» and also «GLThreadedOptimizations». One may also setup an «AlwaysOn» profile setting for «GLThreadedOptimizations» as an example of settings you can always have activated. It’s up to you to leave it on or disable it since there’s the chance it can affect your OpenGL performance negatively.
To use these application profiles, one way is via the file manager.
- Open your File Manager.
- go to your «Home» folder.
- Tap «CTRL» and «H» to toggle hidden folders and files.
- Go into the «.nv» folder.
- Open the file «nvidia-application-profiles-rc» in a text editor (or if it doesn’t exist, create the text file).
Copy and paste the following into the file and save (the last part with «alwaysapplied» is optional but is recommended for enabling Threaded Optimizations on all OpenGL apps). Some older apps might have compatibility issues but you can always make a custom application profile with the «GLThreadedOptimizations» set to «false»):
Filing bug reports
NVIDIA driver from the Ubuntu repositories
If one is using a NVIDIA driver package from a supported Ubuntu repository (not downloaded from NVIDIA’s website directly), then one is welcome to file a new report via a terminal:
Please ensure you have xdiagnose installed, and that you click the Yes button for attaching additional debugging information.
As well, please ensure all of the below are tested and provided:
- Did this happen with a prior version of the NVIDIA driver?
- Did this issue happen in a prior release of Ubuntu?
- Does this still occur with a later version of the NVIDIA driver provided by the Ubuntu repositories?
- Is this an issue with the latest version downloaded directly from NVIDIA’s website?
If the issue is not reproducible in the version from NVIDIA’s website, then the issue would be a downstream (Ubuntu) issue.
If the issue is reproducible in the version from NVIDIA’s website, the next step is to report a bug upstream as per below.
Reporting an upstream bug
If either your downstream bug report is marked Triaged, or you are using the drivers from NVIDIA’s website directly, one will want to file a bug report via the NVIDIA Bug Submissions website.
- Choose OS — Linux/Other Unix
Product Name — This may be gathered by executing at a terminal
Driver Version — This may be gathered by executing at a terminal:
Question — This is where one would describe the problem, put click-for-click steps on how to reproduce the problem verbatim, and provide operating system information gathered from a terminal:
Next, one would want to contact NVIDIA customer care via Live Chat in order to identify a WORKAROUND, and generate a trackable case number regarding your problem.
NvidiaManual — Guide to installing the official NVIDIA driver from the NVIDIA website on Ubuntu. Explains the drawbacks and benefits of manual installation and how to safely avoid conflicts with the Ubuntu provided NVIDIA binary drivers.
https://www.nvidia.com NVIDIA’s homepage for driver downloads, submit support cases, and post on their forums.
BinaryDriverHowto/Nvidia (последним исправлял пользователь bw3u 2021-08-06 11:33:13)
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