Grub-Nvidia-Entry
If you installed Nvidia drivers through Negativo17 or RPMfusion, the Nvidia card would always be on by default. As the dedicated GPU consumes a lot of power, it is a significant problem to those using laptops.
grub-nvidia-entry.sh
makes Grub load Nouveau instead of Nvidia drivers on normal basis and creates a new entry which loads Nvidia drivers.
Advantages
Why is this method preferred over Bumblebee?
Prerequisites
- UEFI
- Nvidia drivers from Negativo17 or RPMfusion
Supported Operating Systems
- Fedora 26 ~ 28
Easy Setup
To make the script do everything automatically, run make enable && make
. And to completely remove everything, run make uninstall
.
Usage
make
ormake run
: Runsgrub-nvidia-entry.sh
. Changes take effect on the next boot.- Current session:
make
/make run
- Next boot: changes should take effect
- Current session:
make force
: Same as runningmake
, but without checking the Linux kernel version and the presence of Nvidia modules.make enable
: Registersgrub-nvidia-entry
as a service and enables it. It will update all configurations on the next boot of a kernel update. However, you'll have to reboot again to see the changes.- Current session:
make enable
/ Kernel update - Next boot:
grub-nvidia-entry.sh
executes - Second boot: changes should take effect
- Current session:
make disable
: Disablesgrub-nvidia-entry
.make install
: Registersgrub-nvidia-entry
as a service.make uninstall
: Disablesgrub-nvidia-entry
and deregisters it.make sign
: Signs Nvidia modules for Secure Boot withSignNvidia.sh
. Note that this NOT included inmake enable
and should be re-run MANUALLY on every kernel update.
GPU Verification
Intel/Nouveau
iGPU: glxgears -info | grep GL_VENDOR
dGPU(Nouveau): DRI_PRIME=1 glxgears -info | grep GL_VENDOR
Intel/Nvidia
glxgears -info | grep GL_VENDOR
Caution
The script overwrites /usr/lib/systemd/system/switcheroo-control.service
and /etc/grub.d/40_custom
.
Issues
- There's an upstream bug that prevents Gnome from detecting dedicated GPU when Secure Boot is on.
DRI_PRIME=1
works fine though. A workaround is to disable Secure Boot for now.