ublue-os / bluefin

The next generation Linux workstation, designed for reliability, performance, and sustainability.
https://projectbluefin.io
Apache License 2.0
1.21k stars 160 forks source link

Nouveau blacklist kargs removed after reboot, even after being added manually. #902

Closed kgadberry closed 6 months ago

kgadberry commented 8 months ago

Describe the bug

I manually added modprobe.blacklist=nouveau to my kargs to prevent my GPU from being used because I pass it to a Windows VM and use the integrated graphics for Linux; and both nouveau and the bundled proprietary drivers (445) don't support my GPU yet anyway (4070 Ti SUPER).

After rebooting (every other time maybe? could be after the automatic updater runs), I'm presented with the "updating kargs" message, and the machine reboots to a new image with updated kargs where only modprobe.blacklist=nouveau is removed. At that point, with my configuration, the login screen doesn't show up and all I get is a gray screen and a cursor.

What did you expect to happen?

I expect kargs that I've manually added using rpm-ostree kargs --append to not be automatically removed.

Output of rpm-ostree status

❯ rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:39
                   Digest: sha256:4e188ce8b80fec2148211128728962f986f6f9e3fb548a90600ec5e98bbd83fb
                  Version: 39.20240212.0 (2024-02-12T20:33:12Z)
                Initramfs: '"-I /etc/crypttab /usr/lib/modprobe.d/nvidia.conf"' 

● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:39
                   Digest: sha256:4e188ce8b80fec2148211128728962f986f6f9e3fb548a90600ec5e98bbd83fb
                  Version: 39.20240212.0 (2024-02-12T20:33:12Z)
                Initramfs: '"-I /etc/crypttab /usr/lib/modprobe.d/nvidia.conf"' 
                   Pinned: yes

  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:39
                   Digest: sha256:79c455c2ae91422fb38a563196400cad1a2c4dab0a270e9981672337a991a8d2
                  Version: 39.20240211.0 (2024-02-12T03:34:54Z)
                Initramfs: '"-I /etc/crypttab /usr/lib/modprobe.d/nvidia.conf"' 
                   Pinned: yes

Extra information or context

I recently rebased from bluefin-dx-nvidia to bluefin-dx because I don't need or want the nvidia drivers. I think this started happening before that, though. I remember this being an issue since around the 8th and I just used the previous deployment (from the 6th) to get around it. I only recently figured out what was causing the issue.

kgadberry commented 8 months ago

I just rebooted, verified in GRUB that the command included modprobe.blacklist=nouveau, and the same thing happened again. Once it got back to GRUB I selected the same deployment (not the one it just made), verified it was still there, ran rpm-ostree kargs immediately after logging in and noticed that it was missing.

kgadberry commented 8 months ago

Further testing confirms that this only happens if modprobe.blacklist=nouveau or rd.driver.blacklist=nouveau are in the kargs, so I'm assuming this is intended behavior to facilitate switching between images and there's probably no easy way around it without removing that functionality.

Rebasing to bluefin-dx-nvidia works if I set nvidia-drm.modeset=0 and add rd.driver.pre=vfio_pci and vfio-pci.ids={GPU device ID},{nvidia audio device ID}... so I'll just do that.

m2Giles commented 8 months ago

This happens here in our hardware setup script. The Nvidia image workaround would be fine for right now and gets the desired end state.

https://github.com/ublue-os/bluefin/blob/a7d993de8e61c4856ae90b94481145761e35e01b/usr/bin/ublue-system-setup#L62

If you are available for testing we could test some changes to avoid this behavior.

kgadberry commented 8 months ago

Sure, I can help with that. For whatever reason, I only get 30hz refresh rate on the integrated graphics output using the nvidia image, which wasn't happening with the non-nvidia image, so I'd like to be able to go back to that.

kgadberry commented 8 months ago

@m2Giles

Is there anything I can do? The nvidia image workaround has stopped working and now I have to use bluefin-dx and manually add modprobe.blacklist=nouveau to the kargs in GRUB.

m2Giles commented 8 months ago

Sorry. Have been a bit busy. As a temporary measure you can disable the service file that runs the ublue-system-setup script.

m2Giles commented 7 months ago

If you are okay with enabling local initramfs.

You can specify the karg instead via /etc/modprobe config file.

You can use rpm-ostree initramfs-etc to track the file.

m2Giles commented 6 months ago

@kgadberry

I've updated the hwsetup script to no longer add kargs depending on Image type. Instead we are building the initramfs as part of the build process. Instead we are using modprobe for setting the defaults.

See #1127