I am currently using EndeavourOS’s GRUB to boot into another partition, being a Gentoo install. I need to enable the kernel parameter nvidia_drm.modeset=1 in order to enable PRIME Synchronization on my monitor.
According to the article on the Arch wiki, I can do this by editing the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub, adding the nvidia_drm.modeset=1 to the string and re-generating the grub.cfg file.
However, when I boot into my Gentoo install and enable PRIME Synchronization with xrandr, it does not work (no error output, it simply doesn’t enable it), meaning the kernel parameter nvidia_drm.modeset=1 is not set properly.
If I were to set nvidia_drm.modeset=1 manually within grub, by pressing e and editing, it works properly. However I’d have to do this every single time I boot into Gentoo, which is not ideal.
It’s been a long day and I’m running out of ideas. Anyone know what I’m doing wrong? Help would be super appreciated!
@pebcak I’m not skilled enough to see where it goes wrong, but the effort is still appreciated!
@Svartis You were totally right in saying this, my bad. I’ll go ahead and correct my post.
So, I took a look inside grub.cfg and sure enough, the nvidia_drm.modeset=1 parameter was only being set for the two EndeavourOS entries (EndeavourOS and EndeavourOS fallback initramfs), but not the third Gentoo entry. So… I simply added the parameter there myself.
I’m not sure if this is something I should be doing but hey, it works. I’m convinced it’ll be overwritten next time I regenerate my grub.cfg, so I guess I’ll have to remember to re-add it manually.
I’m not sure if I just messed up my GRUB by doing this, or in case someone knows a better method, so I won’t mark this as the solution just yet. Cheers!
Another option which may work would be the following:
In Gentoo, set the kernel boot parameter and regenerate its grub.cfg.
Make Gentoo’s Grub bootloader primary , that is give it the first boot priority.
Make a custom.cfg in /boot/grub (or is it /boot/grub2 in Gentoo?) and copy over the two entries from EnOS’s grub.cfg with the right boot parameters.
This should give you boot entries for EnOS in Gentoo’s grub boot menu and won’t be overwritten by future updates to the Grub.
If yours is a UEFI system, changing bootorder is as easy as going into firmware/bios settings and set Gentoo’s bootloader first. This can be done from within Gentoo as well using the CLI tool efibootmgr.
If you are hesitant about anything or have further questions, feel free to post about it.