Greetings all. For context, I recently disabled my laptop’s GPU & Nvidia drivers so that it now only uses the Intel iGPU. The reason why is because when trying to install Fedora 40, something seemed to be wrong with the Nouveau drivers, and the OS would be unbootable if not run in safe-graphics mode. I don’t want to use Nvidia’s proprietary drivers to replace Nouveau, so my only option was to disable the Nvidia GPU and all of its drivers outright, and I figured out how to by using these two posts/guides as a reference:
Okay, so if I already solved the problem, why am I posting? Because I have no idea if I did this the right way or not. I’m fairly new to Linux and I’ve never touched the kernel, modules, etc. before, nor do I know how they work. I don’t know if the way I configured things is going to cause problems for my system down the road.
Adding to the concern, I’ve seen at least one other person mention problems reported with a setup like mine (an Optimus laptop with all Nvidia drivers disabled). I couldn’t find any of these reports myself on the forums, and he didn’t care to elaborate or tell me where he heard about these reported problems. There was also another person suggesting a different method to disabling drivers, since acc. to him, using “blacklist” in /etc/modprobe.d/ablacklistfile.conf (Which is what I did) doesn’t do any actual black-listing and that the GPU drivers can be re-enabled at any point by the system (If true, this is a big problem. Can’t the OS just suddenly brick itself one day if it decides to re-enable the GPU drivers as part of some automatic system maintenance, update, etc.?)
It’d be a great help if anyone who’s more familiar with the kernel/drivers could chime in.
This is the process I followed:
- Boot into installer in safe-graphics mode and go through installation
- After Fedora 40 is installed, reboot
- Connect to internet and “sudo dnf update”
- Reboot
- Remove “nomodeset” from the GRUB_CMDLINE_LINUX variable in /etc/default/grub
- Add “rd.driver.blacklist=nouveau modprobe.blacklist=nouveau” to GRUB_CMDLINE_LINUX instead
- Save that file and run “sudo grub2-mkconfig -o /boot/grub2/grub.cfg”
- Create the file /etc/modprobe.d/nvidiablacklist.conf with these lines:
blacklist nvidia
blacklist nouveau
- Save the file & reboot
- Make the file /etc/udev/rules.d/00-remove-nvidia.rules and copy all these lines into it:
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION==“add”, SUBSYSTEM==“pci”, ATTR{vendor}==“0x10de”, ATTR{class}==“0x0c0330”, ATTR{power/control}=“auto”, ATTR{remove}=“1”# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION==“add”, SUBSYSTEM==“pci”, ATTR{vendor}==“0x10de”, ATTR{class}==“0x0c8000”, ATTR{power/control}=“auto”, ATTR{remove}=“1”# Remove NVIDIA Audio devices, if present
ACTION==“add”, SUBSYSTEM==“pci”, ATTR{vendor}==“0x10de”, ATTR{class}==“0x040300”, ATTR{power/control}=“auto”, ATTR{remove}=“1”# Remove NVIDIA VGA/3D controller devices
ACTION==“add”, SUBSYSTEM==“pci”, ATTR{vendor}==“0x10de”, ATTR{class}==“0x03[0-9]*”, ATTR{power/control}=“auto”, ATTR{remove}=“1”
-
Reboot again
-
Fedora appears to work well now without needing safe-graphics mode or proprietary GPU drivers, with the added benefit of longer battery life.
If you need this info too, I tried out several suggested ways to check if the Nvidia drivers & GPU are still running, such as:
- Running “cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status”, as per the Arch Wiki. The output is “No such file or directory” instead of “active”
- NVIDIA is no longer seen in “lspci” output
- Nouveau is no longer seen in “lsmod” output