Plasma does not recognize dual gpu setups

$ qdbus org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement hasDualGpu
false
$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GA104 [Geforce RTX 3070 Ti Laptop GPU] (rev a1)
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] (rev c7)

This is a problem because KDE has a few system functions like in the applications menu to configure an application to run with the dGPU, or in KDE context menu to launch something with the dGPU.

Those options do not show up while this flag is false. I also don’t know how to fix it. This has been an issue since I set up manjaro kde a while back.

Edit: The function to run on the discrete gpu in kde relies on the DRI_PRIME variable, it wouldn’t actually work even if the option was visible I believe. Think maybe the issue is just KDE being outdated

If that is true and you installed the proprietary nvidia driver, then you need prime-run and not DRI_PRIME. The variables are different there.

Even if it is true, I wouldn’t benefit regardless because the detection mechanism is broken.

If that is your idea, then it is clearly KDE Plasma Problem and not a Manjaro one in general. Please report it upstream: https://bugs.kde.org/

Now that u mention it seems like it already exists 449372 – Option to run on secondary GPU isn't present and even 461665 – Using a second GPU (the latter one is wrongfully marked as a duplicate, when it’s really just a user that thought the feature didn’t exist because it’s not functional)

And kde devs simply don’t care. They added this feature as an afterthought and haven’t bothered to maintain it at all it seems.

I created my own solution.

in /usr/share/kio/servicemenus/primerun.desktop:

[Desktop Entry]
Actions=primeRun;
Type=Service
MimeType=application/ogg;application/x-ogg;application/mxf;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;video/mpeg;video/x-mpeg2;video/x-mpeg3;video/mp4v-es;video/mp4;video/x-m4v;application/x-extension-mp4;video/divx;video/vnd.divx;video/msvideo;video/x-msvideo;video/ogg;video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;application/vnd.ms-asf;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/mp2t;video/x-avi;video/avi;video/x-flic;video/fli;video/x-flc;video/flv;video/x-flv;video/x-theora;video/x-theora+ogg;video/x-matroska;video/mkv;application/x-matroska;video/webm;video/x-ogm;video/x-ogm+ogg;application/x-ogm;application/x-ogm-video;application/x-shorten;application/x-mpegurl;video/vnd.mpegurl;application/vnd.apple.mpegurl;video/3gp;video/3gpp;video/3gpp2;video/dv;application/x-cue;application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;application/x-nintendo-3ds-executable;application/x-executable;application/x-shellscript;

[Desktop Action primeRun]
Name=Run on Nvidia GPU
Comment=Run the file or application on the Nvidia GPU.
Icon=nvidia-settings
TryExec=prime-run
Exec=prime-run mimeopen -n %U || prime-run %U
Terminal=false

this should provide an option to run any video file or executable on the dgpu (first tries to open with file association and if that fails it tries to execute the file). you can remove the || prime-run %U bit if you do not want to use this to execute linux native executables.

Used mimeopen instead of xdg-open or kde-open because the latter two gave me odd errors on wine-executables

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.