I have one of these lovely hybrid laptops that has Ryzen/Nvidia combo. They can sometimes be a pain in the butt to get going graphically. Over on MJ @dglt wrote optimus switch for intel/nvidia. They were gracious enough to port it over to work with a ryzen/nvidia combo. I have done 3 full installs to test switch with lightdm, sddm, gdm. I had it work for all 3 by just simply cloning the git and running the install script. Originally you would need to download a few packages to get the switch function to work, but that is not the case over here on EOS. It looks as if EOS installs the video-vesa package and xf86-video-amdgpu driver. You should really only need the amdgpu, I haven’t run into anything with video-vesa being installed as well.
First step is to clone the repo using git(links posted at the bottom), and then open a terminal in the location or cd to the location. Once you have a terminal in the location you will run the following.
chmod +x install.sh
If you get a permissions error then run it with sudo. Once that has been done you will run
sudo ./install.sh
This will run through and install all the necessary stuff for this to work, and when it finishes it sets it nvidia only. To change between ryzen and nvidia you will simply run one of the following commands.
sudo set-nvidia.sh
sudo set-amd.sh
Then reboot your system and you should be good to go. One thing I recommend is that you go into the amd-xorg.conf located at /etc/switch/amd/amd-xorg.conf
and check that the BusID matches your amd card. It defaults to 5 but I added another ssd to my machine and it bumped mine to 6. To find the BusID of your amd card simply run lspci
in the terminal.
With nvidia set and running there is a chance your screen may display everything a bit smaller. To fix you need to uncomment the line in the nvidia-xorg.conf that list dpi 96x96. The location for that file should be /etc/switch/nvidia/nvidia-xorg.conf
In the location for all the conf files you will notice a few that may say mhwd, that is strictly a MJ thing and you can delete those and not experience an issues. I cannot speak on the switch methods used for intel/nvidia seeing as how I don’t own one of those laptops.