Ubuntu 19.04
After an installation of Ubuntu 19.04 all Nvidia drivers will be installed if you enabled the installation enable of 3rd party drivers.
Afterwards all graphics are installed. That is pretty easy in comparison to Ubuntu 18.04.
Ubuntu 18.04
How to use Nvidia Graphics Cards on Ubuntu 18.04 and switch between onboard Intel and Nvidia.
1. Check that your hardware is detected
Run the following command in your terminal.
1 |
lspci -nnk | grep -i "VGA\|'Kern'\|3D\|Display" -A2 |
Yes, I have a Nvidia Graphics card.
1 2 3 4 5 6 7 |
00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09) Subsystem: Lenovo Haswell-ULT Integrated Graphics Controller [17aa:3800] Kernel driver in use: i915 -- 09:00.0 3D controller [0302]: NVIDIA Corporation GK208M [GeForce GT 730M] [10de:1290] (rev a1) Subsystem: Lenovo GK208M [GeForce GT 730M] [17aa:3800] Kernel driver in use: nouveau |
2. Disable Secure Boot
Disable the secure boot in your BIOS or UEFI, otherwise the Nvidia Driver installation will fail. Here is a How-To link:https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/disabling-secure-boot
3. Install Nvidia drivers
Before we install any driver we check which driver is the recommended.
1 |
sudo ubuntu-drivers devices |
Output:
1 2 3 4 5 6 7 |
== /sys/devices/pci0000:00/0000:00:1c.4/0000:09:00.0 == modalias : pci:v000010DEd00001290sv000017AAsd00003800bc03sc02i00 vendor : NVIDIA Corporation model : GK208M [GeForce GT 730M] driver : nvidia-340 - distro non-free driver : nvidia-driver-390 - distro non-free recommended driver : xserver-xorg-video-nouveau - distro free builtin |
The recommended driver for me is nvidia-driver-390 because of that line:
driver : nvidia-driver-390 – distro non-free recommended. Now install the correct driver.
1 |
sudo apt-get install nvidia-driver-390 |
4. Change Graphics Driver
Open the Software & Updates menu.
1 |
software-properties-gtk |
Select Additional Driver Tab, select the installed driver, click Apply Changes.
After a restart your primary graphics card should be Nvidia. Open Settings -> Details
or run that to verify your primary card.
1 |
prime-select query |
5. Switch Graphic Cards
You change switch between your onboard Intel or your Nvidia Graphics Cards by opening the Nvidia Settings Menu.
1 |
nvidia-settings |
Enable your card.
or via command line.
1 2 |
sudo prime-select intel sudo prime-select nvidia |
Sources:
https://www.linuxbabe.com/desktop-linux/switch-intel-nvidia-graphics-card-ubuntu