Fixing NVIDIA Drivers Under Secure Boot and Preventing Windows from Breaking EFI Boot Order
Running Linux with Secure Boot in a multi-boot machine often turns into a struggle. In my case the system is set up with KDE Neon as the primary OS, Kubuntu for testing, and Windows as the third option. Windows assumes it should control the EFI boot order and sometimes even clears MOK keys when it writes to firmware. At the same time, NVIDIA drivers do not always cooperate with Secure Boot because the modules are unsigned. The result is that Linux may fail to load the GPU driver after every reboot into Windows, and boot order often shifts away from Neon. This tutorial explains the full process I followed to solve these issues in a reliable way. 1. Identify the correct NVIDIA driver and install a DKMS build. The first requirement is to get the correct NVIDIA driver installed. Using a DKMS package is important because DKMS automatically rebuilds the modules whenever the kernel changes. Without DKMS, every kernel upgrade would break the driver until you reinstall it. Installin...