gpu-drivers.md 2.96 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
---
title: 'Installing GPU Drivers'
taxonomy:
    category:
        - docs
visible: true
---

### _**Part 1: AMD Drivers**_
To install the AMD graphics driver open a terminal and type out the following:

12 13 14
```bash
sudo apt install xserver-xorg-video-amdgpu
```
15 16 17

To install AMD firmware type out: 

18 19 20
```bash
sudo apt install firmware-amd-graphics
```
21 22 23 24 25 26 27 28 29 30 31 32 33 34

For further reference see [AMD GPU drivers](https://linuxconfig.org/how-to-install-amdgpu-drivers-on-debian-9-stretch-linux)

## Nvidia and/or Nouveau
This tutorial is for those that have two GPUs (laptops primarily), which are an Intel integrated GPU (low-power consumption) and Nvidia GPU (high-power consumption). 

The first thing you want to do is to know whether you prefer to use the _Nouveau_ **open sourced** driver or the _Nvidia_ **proprietary** driver. Conduct your own research to figure out which will best suit your needs.  

For those that choose the _Nouveau driver_ follow the steps in **part 2**. For Nvidia start at **part 3**. 

### _**Part 2:  Nouveau**_

Since the Nouveau driver is already integrated to the kernel, there is only one thing to do: Install _bumblebee_ and _primus_:

35 36 37
```bash
sudo apt update && sudo apt install bumblebee primus
```
38 39 40

To start a program using the nvidia gpu do this:

41 42 43
```bash
optirun _yourprogram_
```
44 45 46 47

And you are done with the install!   
To test if the install is successful run this:

48 49 50
```bash
optirun glxgears
```
51 52 53 54 55 56 57 58 59
 
You might need to reboot to make it work. 

### **_Part 3: Nvidia-driver_**

For those that choose the proprietary Nvidia driver, two extra steps are needed. 

The first thing to do is blacklist the Nouveau driver, in order to do that, you have to create this file:

60 61 62
```bash
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
```
63 64

And write this in the file:
65
```bash
66 67 68 69 70 71 72 73 74 75
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off 
alias lbm-nouveau off
```
When you are done hit `Ctrl+X` and save the file.

Then run the following to make the changes:

76 77 78
```bash
sudo update-initramfs -u
```
79 80 81 82 83

Reboot.

Now you can install the Nvidia driver:

84 85 86
```bash
sudo apt update && sudo apt install nvidia-driver
```
87 88 89

You can install Bumblebee and Primus:

90 91 92
```bash
sudo apt install bumblebee-nvidia primus
```
93 94 95

To run a program using the Nvidia gpu, use optirun:

96 97 98
```bash
optirun _yourprogram_
```
99 100 101

To test your config, you can run this:

102 103 104
```bash
optirun glxgears
```
105 106 107

A reboot might be needed to make Bumblebee work as well as firejail adjustments.

108
Written by KileXt
109 110 111 112 113

For further information see [here](https://github.com/Bumblebee-Project/Bumblebee/wiki)
and [here](https://community.parrotsec.org/t/bumblebee-fails-to-run-optirun-xorg/5732/3)
If you run into any issues please post in [support](https://community.parrotsec.org/c/support) on the forum.

114 115
 

116
[Using Parrot](https://www.parrotsec.org/docs/info/start/) | [Troubleshooting](https://www.parrotsec.org/docs/trbl/start/) | [Linux Beginner Guide](https://www.parrotsec.org/docs/library/lbg-basics/) | [Home](https://www.parrotsec.org/docs/)