- Nvidia driver installs but does not load on ubuntu 18.04
- Installing nvidia drivers on 18.04
- 6 Answers 6
- Run this first,
- this worked for me on Ubuntu 18.04 LTS
- Nvidia Driver won’t install on Ubuntu 20.04
- 4 Answers 4
- 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
Nvidia driver installs but does not load on ubuntu 18.04
Nvidia driver 384 ran well on Ubuntu 17.04 and 17.10. I switched to Ubuntu 18.04 (clean fresh install) and installed nvidia-driver-396 following this great answer
Then I installed cuda toolkit 9.2 using .run file. It failed to install with and without choosing to install nvidia driver along with it. Rebooted and tried again, then cuda was installed succesfully. But nvidia isn’t running.
What I have tried so far:
Uninstalled nvidia ( nvidia-uninstall ) Successful but with warning: «Some symlinks could not be removed. The I removed cuda with rm -rf /usr/local/cuda* and installed nvidia-driver-396 but still the same error
Removed nvidia-396, installed 396 from nvidia’s website (.run file). It started with a warning «Distribution provided pre-script failed». I proceeded and installation was successful. It also added nouveau to blacklist automatically. Still same result as 1.
Uninstalled previous one, removed blacklist entry, installed nvidia-390 Still same result
Uninstalled previous one, installed it from «Additional drivers» from GUI. No change.
Went to console mode. Stopped gdm. Then installed 396. No change. Installed 390 likewise. No change.
Tried using xorg-edgers ppa (Yes its is said they are same as graphics-drivers ppa but I am desperate now) Unmet dependency problems. So reverted to removed everything.
Uninstalled everything, went to recovery mode then installed nvidia-driver-390. No luck.
I felt nvidia driver from official website made some irrevesible changes. So tried installing it again so that I can uninstall it properly from recovery mode as suggested in the great answer using —unistall option. But now it fails to install. Error message says nouveau is running despite being blacklisted. I removed the blacklist entry later
I have Intel i5 with Intel HD graphics along with Nvidia GeForce 940M. Yes nvidia-prime was installed. Dual booted with Windows 10, Secure Boot is disabled
During all these steps, once I was able to start the nvidia x server app, though the nvidia-smi gave the same error. Once there was a resolution issue when cuda ran nvidia-xconfig. I removed the xorg.conf to fix it. Right now my pc has nouveau running, no other drivers installed, no blacklisting nvidia, no xorg.conf.
Can someone help. I don’t see any reason why it should not work. nvidia driver 390.12 is reported to work well with kernel 4.15 but still it is not working on mine.
Installing nvidia drivers on 18.04
all. I’m trying to fix my system so I can install the nvidia drivers but it seems to get stuck for some reason. I have tried manually removing the downloaded files from
. in order to let them download again but to no avail. Have anyone tried installing those drivers on 18.04 lately?
6 Answers 6
Found this command on ubuntu forums, worked very well with me:
The first command will remove all the diverted packages from nvidia-340 . If you have other nvidia version «diverting» change it; read the error code to know which version is diverting.
The basic premise of the answer is:
- you have old dependencies you want to remove
- you want to clean mess
- you want to install new driver
I assume you have cr*p from the 340 driver installed — which was my problem
remove old dependencies
clean mess — depended on mess you have installed find it out if not work out of the box 😉
install new recommended drivers
My advice is:
do not play with settings in this cr*ppy drivers just for checking if installed 🙂
I solved the problem by removing nvidia-340’s divert. hopefully I don’t need to use nvidia-340 . Following is an example:
You can keep on removing whenever you have a conflict.
Run this first,
Solution #for FILE in $(dpkg-divert —list | grep nvidia-340 | awk ‘
Then install it from ppa,
this worked for me on Ubuntu 18.04 LTS
I would run apt auto-clean and see if its what I think it is, a messed up package.
edit: to answer your other question, when I installed 18.04 the other day 390 worked fine, but going to 396 was a bit «fun». This fixed it for me.
$ sudo apt upgrade Reading package lists. Done Building dependency tree Reading state information. Done You might want to run ‘apt —fix-broken install’ to correct these. The following packages have unmet dependencies. libnvidia-ifr1-390 : Depends: libnvidia-gl-390 but it is not installed libnvidia-ifr1-390:i386 : Depends: libnvidia-gl-390:i386 but it is not installed nvidia-driver-390 : Depends: libnvidia-gl-390 (= 390.48-0ubuntu3) but it is not installed .
Nvidia Driver won’t install on Ubuntu 20.04
Installed driver with this command:
but when i want to check Nvidia driver, I’m getting this error:
If I look at Nvidia-settings, the window will show up, but all i can see is: Select GPU you would like to use and 3 options below, and nothing else. Here’s the output:
in Software & Updates > Additional Drivers, I chose: Using NVIDIA driver metapackage from nvidia-driver-440 (proprietary, tested)
In Settings > About, Graphics: displays integrated Intel, instead of Nvidia 1050TI
Did everything as in This comment, :
It says nvidia, but still nothing’s working
FIXED: I managed to fix it by disabling secure boot in BIOS
4 Answers 4
You have the correct Nvidia 440 proprietary graphics packages from the default Ubuntu 20.04 repositories installed, but the integrated Intel graphics processor is being used instead of Nvidia graphics. Disable Secure Boot in BIOS/UEFI.
I also came across this problem with ubuntu 20.04 and nvidia driver installation. I could not do a secure boot disable as the system would not allow it. However, another solution worked for me. Given below are the steps:
- Restart the machine and click F2 or Del to enter the Boot Set up Menu
- In the bottom right click advanced Menu
- Scroll down and click on Secure Boot
- In the UEFI dropdown, change the Windows UEFI mode to other OS and leave the enhanced disabled. Restart the machine and try nvidia-smi and the driver should be installed and working..
I had this problem as well and tried several installations with apt-get of different nvidia packages without success. Finally I did go into the drivers management of Ubuntu and did an install from there. Whatever Ubuntu is doing there different, it worked for me afterwards.
Side note: After Kernel upgrade the system gets broken again, because the triggers of drivers/modules do not work well. So I first have to chose a different driver and doing its install and select the wished package again, very annoying.
The command to get this dialog is software-properties-gtk:
I had the same Graphics and issues with install via Software Updater. Solution was fresh new install and thick box » Instal third party software». Now I am running through Mesa Intel® HD Graphics 630 (KBL GT2) driver.
If you just install restricted-extras without full purge, it won’t work.
Let me know if you installed already » Third party software ? I am kind of sure, it wasn’t done 😉 Just let system choose the right driver.
After that, you don’t need to install any other graphics driver. For addition after successful install, you can change your mode to «Powersafe » for better energy management. You should also ensure, your Bios setup has dislable » Secure boot «. Hope it’ll works.
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