Well, third time is the charm! I’ve managed to get EnvyControl working, running on X11 and Gnome 42 with GDM successfully. I did have optimus-manager installed prior to this third test/attempt. The last attempt I somehow ended up only being able to boot in Wayland, which was a deal-breaker. Now that I’m able to use Xorg and have my Nvidia GPU as the default, I’ll be sticking with EnvyControl. One reason being it’s simpler, doesn’t require a daemon running in the background, and most importantly it doesn’t require me to use patched versions of GDM, which unfortunately are often outdated in the AUR.
Here’s their Github page for reference: https://github.com/geminis3/envycontrol
I’ve been wanting this to work since I first heard about EnvyControl thanks to the Arch subreddit a few months ago, so this small victory was long overdue! I’ve enabled notifications for any new EnvyControl release, so I’ll be sure to test any new versions, but for what it does, it works and feels just like optimus-manager, just with a lot less overheard to worry about.
In case anyone wants to know the final successful process or for future me to come back here and re-read this thread, I’ll leave my process below. FYI, I am one happy camper!
Make sure MODULES is empty in mkinitcpio, usually there’s nvidia stuff here, e.g. MODULES=“nvidia=x”
sudo nano /etc/mkinitcpio.conf
Remove from MODULES=“nvidia nvidia_modeset nvidia_uvm nvidia_drm” leaving only MODULES=""
Save the file and rebuild mkinitcpio
sudo mkinitcpio -P
Might have to add these values back in if anything fails and you want to revert the whole process, so worth noting.
Check Xorg configs, remove (rm [remove] or mv [move] command) them if need be, note these are values BEFORE optimus-manager is removed. Once optimus-manager is removed, /etc/X11/xorg.conf.d/ will only have the keyboard.conf. It may or may not be the same for you:
ls /etc/X11/xorg.conf.d/
reported output: 00-keyboard.conf 10-optimus-manager.conf
ls /etc/X11/xorg.conf
reported output: ls: cannot access ‘/etc/X11/xorg.conf’: No such file or directory
If it’s not already enabled, make sure grub has nvidia modeset=1. When setting up optimus-manager, this value was already added, so feel free to ignore this step if this applies to you.
sudo nano /etc/default/grub
Make sure “nvidia-drm.modeset=1” is in the GRUB_CMDLINE_LINUX_DEFAULT="" like so:
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 nowatchdog nvme_load=YES nvidia-drm.modeset=1"
IF you have “quiet” might want to remove it from the GRUB_CMDLINE, so any text errors will show at boot. This is helpful for debugging any issues. If things are successful, feel free to add “quiet” back in and don’t forget any grub edit needs a rebuild, so after these changes.
Rebuild grub:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Reboot.
Next is to install gdm
and libgdm
and get rid of the patched AUR versions, pacman will take care of the conflicts, just say yes to the removal of gdm-prime and libgdm-prime:
sudo pacman -S gdm libgdm
Now to uninstall optimus-manager and optimus-manager-qt if you had the GUI app as well:
sudo pacman -R optimus-manager optimus-manager-qt
After this I did a reboot so my system was back to using GDM and the default drivers. Now to install EnvyControl to get access to the Nvidia power again.
yay -S envycontrol
EnvyControl has 3 supported modes: integrated, nvidia, hybrid. I want only the Nvidia option. Once you run the command, you’ll have to reboot for changed to take effect. So for Nvidia run:
sudo envycontrol -s nvidia
And then reboot. If you removed “quiet” from your Grub line earlier, you will see a bunch of next on next boot, this is only just to see if any errors show up. If everything just works, then you’ll be booted into GDM running on X11, so feel free to add “quiet” back in if you don’t need to see all the text scrolling by on boot.
Other than that, if anyone follows this (or future me), hopefully you too have EnvyControl working great on your system! Any issues, do feel free to please let the devs know, they are active over at: https://github.com/geminis3/envycontrol/issues