ewagner12 / all-ways-egpu

Configure eGPU as primary under Linux Wayland desktops
MIT License
161 stars 11 forks source link

Unity engine games not using eGPU defaulting to iGPU #14

Closed videoman614 closed 5 months ago

videoman614 commented 5 months ago

Sorry, I didn't know where else to get some help troubleshooting.

I'm using a Framework 13 AMD Ryzen 7 7840U with a TH3P4G3 + RX 6600. Despite some issues since hotlugging doesn't work for me, I was able to get the RX 6600 recognized as the primary GPU, however 2 games I tried Little Witch Nobeta and Mega Man X DiVE always defaults to the iGPU instead of the RX 6600, other games and programs I've tested do default to the RX 6600 so I'm not sure what the issue is.

Nobeta is easily noticeable because on title screen and loading screen the wattage is 60-70 indicating the RX 6600 is being used but when a game is loaded it drops to 30 watts and less than 1000MHz indicating only the iGPU is being used with no way to switch but when I exit to the main menu the RX 6600 is being used again.

Method 1 setup with following Bus IDs
0000:c1:00.0 amdgpu
Method 2, 3 setup with following Bus IDs
0000:66:00.0 amdgpu
0000:66:00.0 eGPU currently active as primary with Method 2
Method 1 auto switch at startup service
○ all-ways-egpu.service - Configure eGPU as primary under Wayland desktops
     Loaded: loaded (/etc/systemd/system/all-ways-egpu.service; disabled; preset: disabled)
     Active: inactive (dead)
Method 2 auto switch at startup service
○ all-ways-egpu-boot-vga.service - Configure eGPU as primary using boot_vga under Wayland desktops
     Loaded: loaded (/etc/systemd/system/all-ways-egpu-boot-vga.service; enabled; preset: disabled)
     Active: inactive (dead)
Method 3 auto switch at startup service
○ all-ways-egpu-set-compositor.service - Configure eGPU as primary using compositor variables under Wayland desktops
     Loaded: loaded (/etc/systemd/system/all-ways-egpu-set-compositor.service; enabled; preset: disabled)
     Active: inactive (dead)
ewagner12 commented 5 months ago

Applications running on vulkan (or vulkan through VK-D3D) can make their own decisions about which gpu to use, regardless of which one is set as primary by the Wayland desktop. So controlling the GPU used in these games is outside the scope of this script since the script is only focused on setting the eGPU as the primary for the Wayland compositor. You might try using the variables MESA_VK_DEVICE_SELECT or MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE as described here

videoman614 commented 5 months ago

Unfortunately it didn't work but thanks so much for assisting even if it wasn't directly related to the script, it's hard to find good information for using eGPU on linux, all the guides and troubleshooting information I found was for windows and I prefer Linux after migrating to it two years ago.