Compiling the nvidia 340xx drivers

Hi,

this maybe a beginner question so please excuse the circumstances. I try to follow phillims suggestion of compiling the 340xx drivers on my own. I downloaded the three compressed folders and unpacked them to home/ak/Schreibtisch/Treiber.

sudo pacman -S git base-devel

and

sudo pacman -S $(mhwd-kernel -li | grep '*' | cut -d ' ' -f5 | awk '{print $0,"-headers"}' | sed s'/ //'g)

was successful. But

[ak@Elitebook ~]$ makepkg
==> FEHLER: PKGBUILD existiert nicht.
[ak@Elitebook ~]$  cd nvidia-340xx-utils && makepkg -si
bash: cd: nvidia-340xx-utils: not found
[ak@Elitebook ~]$ makepkg
==> FEHLER: PKGBUILD doesnt exist.

What did I do wrong?

You didn’t clone the PKGBUILD … read again :wink:

I didn´t know how to clone, thats why I unnecessary downloaded the zip. Know I have learned to insert

bash$ clone git <URL> 


That had worked, but now I got puzzled:

[ak@Elitebook ~]$ git clone https://github.com/philmmanjaro/nvidia-340xx-dkms.git
fatal: path 'nvidia-340xx-dkms' already exists and is not an empty folder.
[ak@Elitebook ~]$ cd ../nvidia-340xx-dkms && makepkg -si
bash: cd: ../nvidia-340xx-dkms: data or folder not found.


Why is that?

PS.: I translate some parts of the console output myselv from german to english. Just in case you wonder about the spelling.
PPS.: I think I slowly learn how to do the citing right. :innocent:

Then compile all packages with makepkg :


    cd nvidia-340xx-utils && makepkg -si
    cd ../lib32-nvidia-340xx-utils && makepkg -si
    cd ../nvidia-340xx-dkms && makepkg -si

What does the folder structure need to look like? Is nvidia-30xx-utils the parent folder and the other two are subfolders?

It maybe that I am writing for my own here, but who knows? Maybe someone out there is able and wants to help me. :persevere:
After installing

`cd nvidia-340xx-dkms && makepkg -si

I got this

==> Installiere Paketgruppe nvidia-340xx mit pacman -U...
Lade Pakete...
Löse Abhängigkeiten auf...
Suche nach in Konflikt stehenden Paketen...

Pakete (2) dkms-2.8.4-1  nvidia-340xx-dkms-340.108-1

Gesamtgröße des Downloads:            0,05 MiB
Gesamtgröße der installierten Pakete:  14,81 MiB

:: Installation fortsetzen? [J/n] J
:: Empfange Pakete...
dkms-2.8.4-1-any       54,5 KiB  85,7 KiB/s 00:01 [##################] 100%
(2/2) Prüfe Schlüssel im Schlüsselring             [##################] 100%
(1/2) Überprüfe Paket-Integrität                   [##################] 100%
(1/2) Lade Paket-Dateien                           [##################] 100%
(2/2) Prüfe auf Dateikonflikte                     [##################] 100%
(2/2) Überprüfe verfügbaren Festplattenspeicher    [##################] 100%
:: Verarbeite Paketänderungen...
(1/2) Installiere dkms                             [##################] 100%
Optionale Abhängigkeiten für dkms
linux-headers: build modules against the Arch kernel [Installiert]
linux-lts-headers: build modules against the LTS kernel
linux-zen-headers: build modules against the ZEN kernel
linux-hardened-headers: build modules against the HARDENED kernel
(2/2) Installiere nvidia-340xx-dkms                [##################] 100%
Optionale Abhängigkeiten für nvidia-340xx-dkms
linux-headers: Build the module for Manjaro kernel [Installiert]
:: Starte post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Install DKMS modules
==> dkms install --no-depmod -m nvidia -v 340.108 -k 5.4.85-1-MANJARO
==> dkms install --no-depmod -m nvidia -v 340.108 -k 5.9.16-1-MANJARO
==> dkms install --no-depmod -m nvidia -v 340.108 -k 4.19.163-1-MANJARO
Error! Bad return status for module build on kernel: 4.19.163-1-MANJARO (x86_64)
Consult /var/lib/dkms/nvidia/340.108/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m nvidia -v 340.108 -k 4.19.163-1-MANJARO' returned 10
==> depmod 5.9.16-1-MANJARO
==> depmod 4.19.163-1-MANJARO
==> depmod 5.4.85-1-MANJARO

I did `cd /var/lib/dkms/nvidia/340.108/build/make.log´
but all I got was […].log is no directory.

Now I know how to get to the log. The command is not “cd” but “less”. So I entered

less /var/lib/dkms/nvidia/340.108/build/make.log



solved a similar problem with reinstalling the dkms modules. What I don´t understand is, how that need to be done, when I just installed those modules. :thinking:

They aren’t appropriate here; what you need to do is install the kernel headers:

sudo apt install linux-headers-$(uname -r)

To ensure they are installed with future kernel updates, install the meta-package too:

sudo apt install linux-headers-generic

Another possible solution. I am not quite sure if I want to tinker with the kernel.