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