New NVIDIA driver automation

This past weekend, I started fresh and captured the list of files before and after the proprietary driver installation. Also, I looked deeper into why the swupd tool was breaking the NVIDIA installation from updating 36780 to 36800. An issue request was posted on GitHub.

It turns out that there are files installed to /usr even though specified /opt for the NVIDIA installer. Moreover, the nvidia-settings app (went through all the menu items) still looks for things under /usr/share/ even though specified /etc/ argument to the NVIDIA installer.

So I captured all the commands for prepping the Clear Linux OS. This includes a list of files for swupd to ignore (placed in /etc/swupd/config) to not break the NVIDIA installation. But that isnā€™t enough. Calling depmod -A is needed as mentioned in the issue request. I witnessed also Firefox suddenly breaking because unable to find libGL due to swupd restoring mesa libGL files. It turns out that calling ldconfig is needed too inside the trigger script.

Well, I created a repo for installing the NVIDIA driver accommodating these findings.

2 Likes

Does it work with most drivers in the list ?

Thus far, 470 and later versions work including hardware acceleration. I tested 470.129.06 (VP9), 510.73.05 (VP9, AV1), and 515.57 (VP9, AV1). 390 fails to install due to modules build failure.

Note: VP9 hardware acceleration requires minimally 470.57 using nv-codec-headers 11.1.5.1. AV1 is supported (Firefox only at this time) starting with 510 for NVIDIA 3000 series graphics.

Another edge case presented itself today when updating CL from 36700 to 36710. See issue 2694. I added check-kernel-dkms to double-check dkms modules. Also, the pre and installer scripts were enhanced to accommodate all kernels installed on the system.

The stars have aligned today. :slight_smile:

  • Clear Linux 36720 provides lts2021 (default for kernel-lts).
    • 5.15.58-1.lts2021
  • NVIDIA adds new {470, 510, 515} entries at download site.
    • 470.141.03
    • 510.85.02
    • 515.65.01
  • Project installing NVIDIA driver, accommodating various edge cases, is completed.

Thank you, dev-team for addressing edge cases regarding swupd.

I have lost count on the number of times installing Clear Linux OS solely for testing NVIDIA graphics. At last, Iā€™m finished with testing. Thank you dev-team for clarification on the remaining issue.

1 Like

Tonight, I completed a new HWAccel addition to the nvidia-driver-on-clear-linux repo, without the FFmpeg bits. Just a handful of scripts to build NV codec headers, NVDEC, VDPAU, and vdpauinfo.

./HWAccel:
README.md	brave		build-all	firefox		scripts

./HWAccel/brave:
brave-browser.desktop	run-brave-stable

./HWAccel/firefox:
firefox.conf

./HWAccel/scripts:
000-install-dependencies	120-build-libvdpau
100-build-nv-codec-headers	130-build-vdpauinfo
110-build-vaapi-nvidia		140-build-vdpau-va-driver-v9

Not shown above is new entry added to the swupd ignore list.

/usr/lib64/dri/(nvdec|nvidia|vdpau)_drv_video.so
1 Like

To be sure, I installed CL 36740 from scratch to an external drive using the text installer (nomodeset, passed to the kernel). Booting into the GUI is preferably okay if nouveau works for you.

I hadnā€™t realized that I was missing one dependency, fixed in the latest commit.

Install CL 36740 or newer.

git clone https://github.com/marioroy/nvidia-driver-on-clear-linux
cd nvidia-driver-on-clear-linux
git pull # In the event not latest

bash pre-install-driver
reboot

cd nvidia-driver-on-clear-linux
bash install-driver 515
reboot

Enable hardware acceleration (note: this has sudo in the command).

cd nvidia-driver-on-clear-linux/HWAccel
sudo bash build-all

cp firefox/firefox.conf ~/.config/.
review Firefox settings as described in the documentation
restart Firefox

VP9 (media.av1.enabled: false) and AV1 (media.av1.enabled: true) content are decoded using the video engine.

image

2 Likes

Thank you for all your work on the NVIDIA install - I know itā€™s much appreciated by the NVIDIA users here.

5 Likes

My pleasure! The GitHub repository reached maintenance status. It includes install-cuda for installing the NVIDIA CUDA Toolkit.

I removed 495 from the list of valid display drivers, as it fails with DKMS signing. Working are 470, 510, and 515 with the suitable CUDA Toolkit versions. The pre-install-driver accepts the update argument, previously reset. So able to update the relevant configuration files from upstream without switching the boot target.

1 Like

@marioroy thanks a lot for doing this - helped me a great deal - so far!
Everything worked out, I just get stuck at the driver installation - thereā€™s a message (in german, but Iā€™ll roughly translate) upon bash install-driver <\Downloads NVIDIA-Linux-x86_64-515.76.run>

-bash: syntax error at unexpected symbol >>newline<<

Then a slew of messages comes up about a task timeout. Tainted: G S 6.0.2-1201.native #1 etc etc etc

Iā€™m obviously not versed in Linux (just some Ubuntu experience), so please treat me like a little kid :smiley:

Thank you for the report. Enter the path as shown e.g. forward slashes.

bash install-driver ~/Downloads/NVIDIA-Linux-x86_64-515.76.run

Running Linux Kernel 6.0.x? Can you try NVIDIA driver 520.

bash install-driver 520

Thanks, that was more a fail report from my side :slight_smile:

Now the file/folder canā€™t be found, although the file is physically there.

Are there spaces in the path to your home directory?

Unfortunately, I canā€™t check right now but tomorrow morning. But I canā€™t imagine. I didnā€™t alter any of the native paths, I just modified things copying and pasting your commands and replacing the file names. Though, thinking about it, I copied and executed 2 lines from a command separately, since I thought it was 2 commands instead of 1 spread over 2 linesā€¦ I canā€™t find that here, so probably I took that from another Thread around here before I found yours. So maybe I should completely reinstall, what do you think?

OK, I completely reinstalled, left the folder paths in english while setting up german language.

I tried a couple of things, maybe this can give you some insight (aside from me forgetting a slash once). The ā€œ7eā€ was just me trying to find if there was another character for tilde, which I learned points to home directory, thus I tried $home instead, to no avail.


Sorry for the ā€œawesomeā€ image quality.

I ran a bunch of repairs as specified by @ruether - this fixed errors and missing files, but still I canā€™t get the driver install to run. Iā€™m running native, I THINK, I just installed from a flash drive and had no option for LTS, Iā€™d probably need a different ISO, correct? Iā€™ll happily invest the minutes to reinstall, if necessary

Hi Markus,

I cannot reproduce the issue that you are having. You can try the ls command to see if it errors. Maybe there is a keyboard mapping issue. Iā€™m not sure. The home environment variable is all uppercase.

ls $HOME/Downloads/NVIDIA-Linux-x86_64-515.76.run
ls ~/Downloads/NVIDIA-Linux-x86_64-515.76.run

A workaround is to copy the NVIDIA run file to the ā€˜nvidia-driver-on-clear-linuxā€™ folder. And then, run the following command.

bash install-driver NVIDIA-Linux-x86_64-515.76.run

Best of luck.

Are you going too fast? :blush: If you can, take your time and look at the screen. The kernel selection for the LTS kernel is under the (A)dvanced tab.

Blessings and Grace!

Maybe I am - I only saw the partitioning options there, Iā€™ll try again!

After consideration, Iā€™m deciding to change OS to another distribution. Therefore, I archived the nvidia-driver-on-clear-linux project. The main reason is that QEMU in Clear Linux lacks support for AArch64, RISC-V, and s390x emulation.

Peace and blessings :potted_plant:

Edit: I removed all my repos that involved NVIDIA graphics. The issue was not the repo themselves but the amount of time helping folks.