With the recent 364.x releases of the NVIDIA binary drivers, KMS (Kernel-Mode-Setting) support for Linux was added. Although this doesn’t mean you get a nice high resolution console (yet), it allows you to see a graphical boot screen now. Let’s see what has to be done to make it work so the office machines show something more exciting during boot…
In order for Plymouth to work though, we need DRM/KMS. The NVIDIA documentation notes that it can be enabled using the “modeset” option of the nvidia-drm kernel module.
To do that we add a modprobe configuration file like this:
/etc/modprobe.d/nvidia.conf: options nvidia_drm modeset=1
Now we need this to work in the earliest stage of the boot process. Let’s add a dracut file so the NVIDIA drivers are packed into the “initramfs” like this:
/etc/dracut.conf.d/nvidia.conf: add_drivers+="nvidia nvidia_modeset nvidia_uvm nvidia_drm" install_items+="/etc/modprobe.d/nvidia.conf"
As you might have noticed, this also tells dracut to add the modprobe configuration file. Of course we assume that you have already installed the NVIDIA binary drivers 364.12 or later and your distribution uses Plymouth. As root user run:
# dracut -f
If all worked well, you can now reboot and enjoy a graphical bootsplash:
Nice! We tested it to work with: openSUSE 13.2+, Plymouth 0.9.0+, NVIDIA 364.12+ and kernel versions 4.5.x+.
Now, naturally the next question is “customization” as the above bootsplash is a custom one we created for openSUSE Tumbleweed. While that should not be the scope of this post and there is plenty of information around Plymouth themes on the Internet, still at least a few hints on how to switch themes for a start:
# plymouth-set-default-theme -l details fade-in openSUSE solar spinfinity spinner text tribar # plymouth-set-default-theme -R spinner ...
The first command lists the themes that are available and the second set’s the active one and runs dracut to rebuild the initramfs. You can also test a bootsplash without the need to reboot under X11. For this you need to install Plymouth’s X11 renderer:
# zypper in plymouth-x11-renderer
After installing it you can run the following to test the bootsplash without rebooting:
# plymouthd; plymouth --show-splash; for ((i=0; i<10; i++)); do plymouth --update=test$i; sleep 1; done; plymouth quit