To check which NVIDIA drivers are installed on your Ubuntu system, you can use several methods. Here are some of the most common ways to do that:
Method 1: Using nvidia-smi
The nvidia-smi command is a tool provided by NVIDIA that allows you to monitor GPU usage and details about the installed drivers.
Open a terminal.
Type the following command and press Enter:
bash
nvidia-smi
If the command runs successfully and you see a table with GPU information, it means the NVIDIA driver is installed. The version of the driver will be displayed at the top of the output.
Method 2: Using ubuntu-drivers
You can also use the ubuntu-drivers command to get information about the installed drivers.
Open a terminal.
Type the following command and press Enter:
bash
ubuntu-drivers devices
This command will list all available drivers for your hardware and indicate which ones are currently being used.
Method 3: Checking the installed package
You can check for the installed NVIDIA driver package directly with dpkg.
Open a terminal.
Type the following command:
bash
dpkg -l | grep nvidia
This command will list all installed packages related to NVIDIA drivers, including the version.
Method 4: Using the NVIDIA X Server Settings
If you have the NVIDIA graphical driver installed, you can also check the version via the NVIDIA X Server Settings application.
Search for "NVIDIA X Server Settings" in your application menu and open it.
The version number will often be displayed in the application window.
Method 5: Checking modinfo
You can also check the kernel module for NVIDIA to determine the version of the driver.
Open a terminal.
Run the command:
bash
modinfo nvidia | grep version
This will provide you the version information of the loaded NVIDIA driver module.
Conclusion
Any of these methods will help you determine which NVIDIA drivers are currently installed on your Ubuntu system. If you need to install or update the drivers, you can use the Additional Drivers GUI application or the command line.
User
using "dpkg -l | grep nvidia i", i can see i have installed 550 and 390 drivers, how can i leave just 390 one installed and delete or remove 550 one?
Assistant
To remove the NVIDIA driver version 550 while keeping version 390 installed, you can follow these steps:
Step 1: Identify the Driver Package Name
First, identify the exact package name(s) for the NVIDIA 550 driver. You can do this by running:
bash
dpkg -l | grep nvidia
Look for entries that include "550". Common package names for NVIDIA drivers include nvidia-driver-550, nvidia-utils-550, and others that might start with nvidia.
Step 2: Remove the 550 Driver
Once you have identified the package names, you can remove them using the apt command. Replace <package_name> with the actual package name you found, such as nvidia-driver-550, nvidia-utils-550, etc.
Open a terminal.
Run the following command to remove the package:
bash
sudo apt remove --purge <package_name>
For example:
bash
sudo apt remove --purge nvidia-driver-550
You may want to include all relevant packages as well:
After removing the driver, it’s a good idea to clean up any unnecessary packages that were installed as dependencies:
bash
sudo apt autoremove
Then, reboot your system for the changes to take effect:
bash
sudo reboot
Step 4: Verify Installation
After rebooting, you can check again for the installed NVIDIA drivers to confirm that version 550 has been removed. Run:
bash
dpkg -l | grep nvidia
You should only see the entries for version 390.
Important Notes
Make sure that version 390 is properly configured and working before you remove version 550. You can run the nvidia-smi command to check that the correct driver is loaded and the GPU is recognized after reboot.
If you face any issues with the graphics after removing drivers, you can revert to using the default Nouveau driver, or troubleshoot the installation of the remaining NVIDIA driver. If necessary, you can reinstall the desired NVIDIA driver version (390) using the following command:
bash
sudo apt install nvidia-driver-390
This process should help you keep only the driver version 390 installed on your Ubuntu system.
User
do you see more 550 drivers here to remove?
ii libnvidia-cfg1-550:amd64 550.144.03-0ubuntu0gpu22.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-550 550.144.03-0ubuntu0gpu22.04.1 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-390:amd64 390.157-0ubuntu0.22.04.2 amd64 NVIDIA libcompute package
rc libnvidia-compute-390:i386 390.157-0ubuntu0.22.04.2 i386 NVIDIA libcompute package
rc libnvidia-compute-535:amd64 535.183.01-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-550:amd64 550.144.03-0ubuntu0gpu22.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-550:i386 550.144.03-0ubuntu0gpu22.04.1 i386 NVIDIA libcompute package
ii libnvidia-decode-550:amd64 550.144.03-0ubuntu0gpu22.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-550:i386 550.144.03-0ubuntu0gpu22.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-egl-wayland1:amd64 1:1.1.17-0ubuntu0gpu22.04.1 amd64 Wayland EGL External Platform library -- shared library
ii libnvidia-egl-wayland1:i386 1:1.1.17-0ubuntu0gpu22.04.1 i386 Wayland EGL External Platform library -- shared library
ii libnvidia-encode-550:amd64 550.144.03-0ubuntu0gpu22.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-550:i386 550.144.03-0ubuntu0gpu22.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-550:amd64 550.144.03-0ubuntu0gpu22.04.1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-550:amd64 550.144.03-0ubuntu0gpu22.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-550:i386 550.144.03-0ubuntu0gpu22.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-550:amd64 550.144.03-0ubuntu0gpu22.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-550:i386 550.144.03-0ubuntu0gpu22.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
rc nvidia-compute-utils-390 390.157-0ubuntu0.22.04.2 amd64 NVIDIA compute utilities
ii nvidia-compute-utils-550 550.144.03-0ubuntu0gpu22.04.1 amd64 NVIDIA compute utilities
rc nvidia-dkms-390 390.157-0ubuntu0.22.04.2 amd64 NVIDIA DKMS package
ii nvidia-dkms-550 550.144.03-0ubuntu0gpu22.04.1 amd64 Firmware files used by the kernel module
rc nvidia-kernel-common-390 390.157-0ubuntu0.22.04.2 amd64 Shared files used with the kernel module
ii nvidia-kernel-common-550 550.144.03-0ubuntu0gpu22.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.17.1 all Tools to enable NVIDIA's Prime
ii nvidia-settings 510.47.03-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii screen-resolution-extra 0.18.2 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-550 550.144.03-0ubuntu0~gpu22.04.1 amd64 NVIDIA binary Xorg driver
Assistant
Based on the output you've provided, it looks like you have several NVIDIA packages installed that are associated with the 550 driver. If you want to remove all of the NVIDIA 550 packages while keeping the 390 driver, you should consider uninstalling all packages prefixed with nvidia-550. Below are the packages you should remove:
List of NVIDIA 550 Packages to Remove
libnvidia-cfg1-550
libnvidia-common-550
libnvidia-compute-550:amd64
libnvidia-compute-550:i386
libnvidia-decode-550:amd64
libnvidia-decode-550:i386
libnvidia-encode-550:amd64
libnvidia-encode-550:i386
libnvidia-extra-550
libnvidia-fbc1-550:amd64
libnvidia-fbc1-550:i386
libnvidia-gl-550:amd64
libnvidia-gl-550:i386
nvidia-compute-utils-550
nvidia-dkms-550
nvidia-firmware-550-550.144.03
nvidia-kernel-common-550
nvidia-kernel-source-550
xserver-xorg-video-nvidia-550
Command to Remove NVIDIA 550 Packages
To remove all these packages at once, you can use the following command. Open a terminal and run:
After executing the command, clean up any unused packages and dependencies:
bash
sudo apt autoremove
Then, reboot your system to apply the changes:
bash
sudo reboot
Verification
After rebooting, you can verify again using:
bash
dpkg -l | grep nvidia
This command should show only the packages related to the 390 driver, confirming the 550 driver has been successfully removed. If you encounter any issues after rebooting, ensure that the 390 driver is functioning correctly by running:
bash
nvidia-smi
Make sure it runs without errors and your GPU is recognized.
User
Now help me removing drivers which are not 390 version:
rc libnvidia-compute-390:amd64 390.157-0ubuntu0.22.04.2 amd64 NVIDIA libcompute package
rc libnvidia-compute-390:i386 390.157-0ubuntu0.22.04.2 i386 NVIDIA libcompute package
rc libnvidia-compute-535:amd64 535.183.01-0ubuntu0.22.04.1 amd64 NVIDIA libcompute package
ii libnvidia-egl-wayland1:amd64 1:1.1.17-0ubuntu0gpu22.04.1 amd64 Wayland EGL External Platform library -- shared library
ii libnvidia-egl-wayland1:i386 1:1.1.17-0ubuntu0gpu22.04.1 i386 Wayland EGL External Platform library -- shared library
rc nvidia-compute-utils-390 390.157-0ubuntu0.22.04.2 amd64 NVIDIA compute utilities
rc nvidia-dkms-390 390.157-0ubuntu0.22.04.2 amd64 NVIDIA DKMS package
rc nvidia-kernel-common-390 390.157-0ubuntu0.22.04.2 amd64 Shared files used with the kernel module
ii nvidia-prime 0.8.17.1 all Tools to enable NVIDIA's Prime
ii nvidia-settings 510.47.03-0ubuntu1 amd64 Tool for configuring the NVIDIA graphics driver
ii screen-resolution-extra 0.18.2 all Extension for the nvidia-settings control panel
Assistant
To remove NVIDIA driver packages that are not version 390, you need to identify which packages to uninstall based on the list you provided.
The package versions that are not part of version 390 are related to version 535 (and any other versions if present).
Packages to Remove
Based on your output, the following packages are the ones you would typically want to remove:
libnvidia-compute-535:amd64 (version 535)
The rc (removed configuration) entries mean those packages are already removed but still have configuration files present. You may wish to clean those up as well.
After running these commands, you should also clean up any unused packages:
bash
sudo apt autoremove
Finally, reboot your system to finalize the changes:
bash
sudo reboot
Verification
After rebooting, run the following command to verify that only the desired 390 packages are installed and no unwanted versions remain:
bash
dpkg -l | grep nvidia
This should show you only the relevant NVIDIA packages pertaining to version 390 (and any other specifically desired packages). You can further verify that your NVIDIA driver is functioning by running:
bash
nvidia-smi
Make sure it returns the correct information without errors. If everything works as expected, you've successfully removed the unwanted NVIDIA drivers!
User
great! now i would like to install all necessary drivers for 390 version, how can i do it?
Assistant
To install the necessary NVIDIA 390 drivers on your Ubuntu system, you can follow these steps. The process involves using the command line but can also be done using the GUI (Graphical User Interface) if you prefer. Below, I'll outline both methods.
Method 1: Using the Command Line
Update Package List: First, ensure your package list is up to date:
bash
sudo apt update
Install NVIDIA Driver Version 390: You can install the NVIDIA driver and its associated components using the following command:
bash
sudo apt install nvidia-driver-390
This command should install the core NVIDIA driver along with necessary dependencies.
Install Additional Packages (if required): Depending on your specific needs, you may want to install additional utilities for the NVIDIA driver. This includes packages like nvidia-settings, nvidia-prime, or various libraries.
bash
sudo apt install nvidia-settings nvidia-prime
You may also want to install specific libraries if needed:
Replace the package names with the specific libraries that are relevant to your use case.
Reboot Your System: After the installation is complete, reboot your system for the changes to take effect:
bash
sudo reboot
Verify Installation: After rebooting, verify that the NVIDIA driver is running properly by executing:
bash
nvidia-smi
This command should display information about your GPU and the installed driver version.
Method 2: Using the GUI (Additional Drivers)
If you prefer to use a graphical interface:
Open Software & Updates:
Search for "Software & Updates" in your application menu and open it.
User
what does this mean?
Errors were encountered while processing:
nvidia-dkms-390
nvidia-driver-390
E: Sub-process /usr/bin/dpkg returned an error code (1)
Assistant
The error message you're encountering indicates that there was a problem during the installation or configuration of the nvidia-dkms-390 and nvidia-driver-390 packages. The specific message E: Sub-process /usr/bin/dpkg returned an error code (1) means that the package manager (dpkg) encountered an error while trying to process these packages.
Here are some steps you can take to diagnose and resolve this issue:
Step 1: Check for Detailed Error Messages
Attempt to Configure the Packages Again:
You can try reconfiguring the packages to see if it provides more detailed output regarding what went wrong. Run:
bash
sudo dpkg --configure -a
Look for Log Files:
Check for error messages in the logs. They can often provide additional context on what went wrong. Review:
bash
less /var/log/dpkg.log
You can also look at the kernel logs:
bash
dmesg | grep nvidia
Step 2: Remove Problematic Packages
If you still cannot resolve the error, you may want to remove the problematic packages and then attempt a fresh installation:
Remove the Problematic Packages:
Run the following commands to remove the problematic packages:
If the above steps fail, you might need to install or reinstall dependencies manually that the NVIDIA driver relies on:
User
is this newer than 390?
ii nvidia-settings 510.47.03-0ubuntu1 amd64
if so, can i remove it and install 390 version?
Assistant
Yes, the nvidia-settings version you provided (510.47.03-0ubuntu1) is indeed newer than the 390 driver version. The versioning suggests that 510 is from the 510 release series, whereas 390 is from the 390 release series, indicating that the 510 version is more recent and includes features and bug fixes that the 390 version may not have.
Can You Remove It?
Yes, you can remove the current version of nvidia-settings if you want to install a version specifically linked to the 390 driver series. However, note that the NVIDIA settings utility (nvidia-settings) is not tied directly to the driver version, meaning that you can technically use the newer nvidia-settings with the 390 driver.
Steps to Remove and Install
If you still wish to proceed with removing the newer version of nvidia-settings and installing the older version that corresponds with the 390 driver, here’s how you can do it:
Remove the Current nvidia-settings:
bash
sudo apt remove --purge nvidia-settings
Install the nvidia-settings for the 390 Version:
After removing the current version, you can try installing the nvidia-settings version that corresponds with the 390 driver. However, in Ubuntu, the nvidia-settings package itself is often tied to the installed driver version.
You can install it like this:
bash
sudo apt install nvidia-settings
When you install the nvidia-driver-390, it should pull in the compatible nvidia-settings for version 390 automatically.
Verify Installation
After installation, verify the installed version of nvidia-settings:
bash
dpkg -l | grep nvidia-settings
This will show you the version of the nvidia-settings utility currently installed on your system.
Conclusion
In summary, you can remove the newer nvidia-settings, but it may not be necessary unless you specifically want to match everything to the 390 version. Keep in mind that using a newer settings utility often provides better functionality and enhanced features, so it might be beneficial to keep it even if you are using older driver versions. If everything works fine after installing the 390 driver and the latest nvidia-settings, you can leave it as is.
Not yet included in a published release.
gpu22.04.1 amd64 NVIDIA DKMS package
ii nvidia-firmware-550-550.144.03 550.144.03-0ubuntu0
gpu22.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-550 550.144.03-0ubuntu0
Navigate to the Additional Drivers Tab:
Click on the "Additional Drivers" tab.
The system will search for available drivers.
Select NVIDIA Driver:
You should see multiple options listed. Select the NVIDIA driver version 390.
Click "Apply Changes" or "Install" to start the driver installation.
Reboot Your System:
After the installation completes, reboot your system.
Verify Installation:
After the reboot, run nvidia-smi in the terminal to check that the driver is functioning correctly.
Conclusion
Either of these methods will effectively install the NVIDIA 390 drivers on your Ubuntu system along with any related utilities you may need. If you encounter any issues during installation, check the system logs or consult the NVIDIA documentation specific to your GPU model.
After ensuring you have the correct headers and build tools, try the installation again.
Step 5: Check DKMS Status
Since DKMS (Dynamic Kernel Module Support) is involved with building kernel modules for the drivers, you should also check the DKMS status:
bash
dkms status
If you see any error messages or failed builds, you can try to remove those specific DKMS modules using:
bash
sudo dkms remove <module-name> --all
Replace <module-name> with the name of the module that failed (e.g., nvidia/390).
Step 6: Reboot and Verify
Once the installation process is complete (whether fresh or cleaned up), reboot your system and check:
bash
nvidia-smi
This should now work without errors if the installation was successful.
Conclusion
These steps should help you diagnose and resolve the error related to the nvidia-dkms-390 and nvidia-driver-390 packages. If you continue to experience issues, consider checking online forums or the official NVIDIA documentation for further troubleshooting related to your specific hardware and driver version.