Bash scripts to automate installation of NVIDIA proprietary driver

Thank you for the fix. Worked like a charm.

1 Like

I already have CUDA set up, will using the new scripts for updating the drivers break it?

@doct0rHu did you (or anyone) manage to get the drivers working on Wayland?

I’m not an expert on this. But it seems that when you have proprietary driver installed, it forces GDM to start in Xorg (instead of Wayland).

Yeah, that’s what I think it happens: if you disable Wayland in /etc/gdm/conf my PC starts in ~1.5s, but if I don’t disable it, then it takes 3 minutes. So probably it tries to boot up with Wayland, failes miserably, possibly retries again a certain number of times, and finally sets for xorg only. I found also a line in /lib/udev/61-gdm-something that disables Wayland for Nvidia drivers, but commenting it didn’t change anything. Also some suggest to enable nvidia-drm.modeset=1, but adding it in the kernel launch parameters didn’t seem to change anything…
I mean, it’s not that I don’t like/have problems with Xorg, it’s just that on Ubuntu I think both work, so there should be no reason for it to not work in CL too.

I think you can open an issue on this. In particular, why disabling Wayland manually saves time to boot is an interesting question. On my system it just boots instantly.

I did open an issue on the long boot time, but after I found this solution and telling to the devs, the problem died there

Link?
Let me take a look.

Sure, there’s not much though…

I opened an issue on documentation repo. Though this is not a bug for Clear Linux, it might be nice to mention it in documentation.

Yeah that’d be helpful for other laptop users! Unfortunately it seems that Wayland compatibility is something Nvidia is tinkering around with not much actual effort, so this is on them and until they fix this there’s not much we can do…

Hey @doct0rHu, thanks man…works fine one Tuxedo Laptop in discrete graphics mode.

I’m a little new to Clear Linux, but a long time linux user. I’m having difficulty executing the bash script. I keep getting syntax errors like this:

./pre_install.bash: line 7: syntax error near unexpected token newline' ./pre_install.bash: line 7: ’

Not sure how to proceed. Any advice?

I cannot reproduce this error.
If you manually copied and pasted the contents of these scripts you may accidentally violate the syntax.

New update new bugs.
After upgrading today to the latest version, my PC is stuck (I upgrade versions almost every day, so the problem is really only in the very last update). Furthermore, compilation of the DKMS module in the automated scripts fails… I checked everything and I have no idea what’s wrong. I heard about some troubles with GCC 10.1 update, but I am not sure if this is connected (maybe the module compilation… Idk)

1 Like

I can confirm this problem still exists.

The workaround I am using is by forcing GCC-8 as the compiler, and if I remember I had to bypass DKMS (it is compiled with GCC-9, which is not available anymore, so you cannot use GCC-8 nor GCC-10 to compile the DKMS module, and setting environment variables didn’t seem to work… They just get ignored

1 Like

Last time I tried installing driver was about 1 week ago, and it says kernel was compiled with a different GCC version. I haven’t tried again yet.

Do you see any error message?

Looks like we’re at it again… New update new problems… But I have no idea how to install it now