no prime-run or optimus? cannot get laptop to switch to dGPU

I just installed bazzite on my laptop (lenovo Yoga 730-15ikb) it has a GTX1050 other distros i was able to run something like 'prime-run ./xxxxx' to use the gpu. i cannot seem to find a way on the forms or on here to do that? Also the supergfxctrl widget is broken in plasma 6 so i cannot use that either.
28 Replies
wolfyreload
wolfyreload8mo ago
you can use switcherooctl list for me it gives me
Device: 0
Name: Intel® UHD Graphics 620
Default: yes
Discrete: no
Environment: DRI_PRIME=pci-0000_00_02_0

Device: 1
Name: NVIDIA Corporation GM108M [GeForce 930MX]
Default: no
Discrete: yes
Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only
Device: 0
Name: Intel® UHD Graphics 620
Default: yes
Discrete: no
Environment: DRI_PRIME=pci-0000_00_02_0

Device: 1
Name: NVIDIA Corporation GM108M [GeForce 930MX]
Default: no
Discrete: yes
Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only
Then I can force steam to use GPU like follows switcherooctl launch --gpu=1 steam I haven't needed to do that since Bazzite seems to detect when to use the GPU automagically
paklie
paklie8mo ago
Are you using kde version? I have the same problem with prime too.. But when i change to gnome it working... I dont know what happen but nvidia prime work on gnome but not in latest kde
phoenixfire425
phoenixfire425OP8mo ago
This is exactly what I needed. Running with that command did the trick
phoenixfire425
phoenixfire425OP8mo ago
much better
No description
wolfyreload
wolfyreload8mo ago
Great news! Can you mark that as the answer for anyone else looking this up?
phoenixfire425
phoenixfire425OP8mo ago
should be marked correctly now
phoenixfire425
phoenixfire425OP8mo ago
Followup question.. how would i do this with a flatpak? Trying to run CURA and cannot seem to get it to run correctly. When i launch it with a shortcut. the application loads but the main viewport never loads correctly. just stays grey
No description
phoenixfire425
phoenixfire425OP8mo ago
No description
Kyle Gospo
Kyle Gospo8mo ago
This is patched to always use dedicated So switcherooctl launch app is enough Also, any .desktop with UseAlternativeGPU specified (such as steam and lutris by default) will launch with switcheroo automatically In both KDE and GNOME
vagifabdulla
vagifabdulla7mo ago
steam does not launch with switcheroo automatically in my case
Kyle Gospo
Kyle Gospo7mo ago
Run switcheroo and give me the output
vagifabdulla
vagifabdulla7mo ago
Device: 0 Name: Advanced Micro Devices, Inc. [AMD®/ATI] Phoenix1 Default: yes Discrete: no Environment: DRI_PRIME=pci-0000_06_00_0 Device: 1 Name: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] Default: no Discrete: yes Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only
Kyle Gospo
Kyle Gospo7mo ago
Looks like your 4060 is properly marked discrete So switcherooctl launch bazzite-steam would work What's your steam .desktop file look like?
vagifabdulla
vagifabdulla7mo ago
where do I find that file? 😅
Kyle Gospo
Kyle Gospo7mo ago
If you changed anything at all, .local
vagifabdulla
vagifabdulla7mo ago
I don't seem to have it Also discovered something interesting, running switcherooctl launch steam launches steam on the 4060, but running switcherooctl launch bazzite-steam launches on the integrated GPU
Kyle Gospo
Kyle Gospo7mo ago
Steam might run on one of the other, but how about the games? That's the important part
vagifabdulla
vagifabdulla7mo ago
Games do seem to be running on nvidia regardless of how I start steam. What is annoying is that when steam launches on the 780M it's quite laggy (not as bad as big picture mode but still)
Kyle Gospo
Kyle Gospo7mo ago
This may be fixed next update
vagifabdulla
vagifabdulla7mo ago
Relatedly, when I launch steam on nvidia and then go to big picture mode manually, it performs well without lag. Some artifacts are present with UI elements (e.g., steam button), but other than that very smooth Is there way to make it so when I click on the steam shortcut in my taskbar it launches on nvidia? by default it is iGPU
Kyle Gospo
Kyle Gospo7mo ago
The slowness is a workaround for a dual GPU bug, not the GPU it's on Next update will fix what you're reporting Worked around a different way
vagifabdulla
vagifabdulla7mo ago
Another optimus related question: on arch+kde when I run cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status, it would report suspended for the gpu status indicating that it is turned off as intended (if i am running on battery, or doing nothing). That does not seem to happen ever on bazzite. I thought it is reporting incorrectly but my battery life estimates are way worse
Kyle Gospo
Kyle Gospo7mo ago
What laptop you on? May require setting up an extra kernel argument or using some GPU switching software
vagifabdulla
vagifabdulla7mo ago
Legion Slim 5 14
Kyle Gospo
Kyle Gospo7mo ago
Let me do a little research I'll get back to you
vagifabdulla
vagifabdulla7mo ago
Optimus did get nuked at some point with an nvidia driver and/or linux kernel update while I was on arch, but was later fixed. Maybe it is the current driver shipped with bazzite? Normally for optimus to work all I had to do was to install nvidia and nvidia-prime
Kyle Gospo
Kyle Gospo7mo ago
It's possible, we're trying to ship 555 asap
vagifabdulla
vagifabdulla7mo ago
Oh, for the legion laptops there is also a couple bios settings that can be enabled so that the dGPU becomes available with the full powered charger connected, otherwise iGPU is used on battery or on non-standard charger I doubt it is that though, because I had that enabled and optimus on arch was fine This seems to have been fixed today with the update
Want results from more Discord servers?
Add your server