Load nouveau at boot for secondary gpu
tl;dr
How do I load a kernel module at boot? Preferably after the Nvidia modules so that they are still used correctly.
I have a 2080ti as my primary gpu, working correctly with bazzite-nvidia-open. I also have a 1070 installed that is not compatible with the nvidia driver version used by bazzite-nvidia-open.
When I 'sudo modprobe nouveau' the 1070 springs to life and I am able to use the monitors attached to it. lspci -v reports the 2080ti using the nvidia driver and the 1070 using the nouveau driver. Perfect!
I've tried creating nouveau.conf in /etc/modules-load.d/ , but I suspect this didn't work because of the read-only nature of bazzite's root fs (somehow).
What is the correct way to load the nouveau module at boot?
EDIT: A similar question was asked earlier this month, I'll keep an eye on that one as well. https://discordapp.com/channels/1072614816579063828/1377988986009817148
12 Replies
add
nouveau
to a .conf file: /etc/modules-load.d/*.conf
this will cause nouveau to load at boot
it doesn't handle PCI binding though, but since you told me that it automatically works after you modprobe nouveau, then it should do the trick
if the folder doesn't exist, you can create it, its a part of systemdGood morning. I have created nouveau.conf in /etc/modules-load.d and so far nouveau doesn't load at boot
The contents of nouveau.conf is simply 'nouveau'. I tried nouveau.ko also
Try making a systemd service
[Unit]
Description=Load nouveau driver
After=graphical.target
[Service]
Type=oneshot
ExecStart=/sbin/modprobe nouveau
this for example
I have what might be a stupid question
no such thing as stupid questions
I thought about just creating a cron job to run modprobe nouveau for me. Is creating a systemd service a less jankey way to do basically the same thing?
Or is it more involved than that?
It seems like the systemd service specifically calls out WHEN to load the module, which seems better than just whenever cron runs, which maybe is after boot is complete?
Creating nouveau.service and running 'systemctl start nouveau.service' does load the module correctly, but this doesn't happen on it's own at boot. systemctl enable nouveau.service compalins that the service doesn't have any installation config and thus isn't meat to be enabled or disabled with systemctl. I'll keep working on how to correct that.
Adding an [Install] section to nouveau.service that contains WantedBy=multi-user.target allowed me to run systemctl enable nouveau.conf, but the module still isn't being loaded at boot. I'll keep working on it
Changing WantedBy to default.target and re-enabling (and deleting the old symlink from multi-user.target.wants) and now the module is loaded at boot. BUT there is a lot of instability now that I don't believe was present when I ran the command manually. I'm going to keep testing to confirm.
Confirmed. I'm going to look into a way to run nouveau.service after login.
Solution
You can't do this
They will conflict
The other card would also be locked at 2D clock speeds even with nouveau present
So it's worthless to you
Ahh ok, so even though it 'looks' like it's working there's something very wrong about it that I can't see
Maybe consider a pass through GPU VM instead
Really the only way this could be anything more than a brick
Understood. I'm going to stress test how I'm doing it now out of curiosity to see how it breaks, but ultimately I'll plan on either passing the second GPU to a VM or just buying another non-nvidia card
Figured out that having two active NVIDIA gpu's can cause org.mozilla.firefox to not launch with the following error: [GFX1-]: More than 1 GPU from same vendor detected via PCI, cannot deduce device
I imagine this is just one of the many problems this cofig would cause.
Thank you CheckYourFax and Kyle for your help!