Bug 433714 - Set "DRI_PRIME=1" if .desktop file contains `PrefersNonDefaultGPU=true`
Summary: Set "DRI_PRIME=1" if .desktop file contains `PrefersNonDefaultGPU=true`
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kservice
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.74.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-27 19:15 UTC by Unknown
Modified: 2021-08-27 12:35 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.86
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2021-02-27 19:15:25 UTC
SUMMARY


STEPS TO REPRODUCE
1. Try to run .desktop file with `PrefersNonDefaultGPU=true`
2. "DRI_PRIME=1" is not set
3. 

OBSERVED RESULT
"DRI_PRIME=1" is not set

EXPECTED RESULT
"DRI_PRIME=1" is set

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 20.10
(available in About System)
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Related pr:
https://invent.kde.org/frameworks/kservice/-/merge_requests/24

Gnome does this:
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1804
https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/39a840e2c3da5dc55059e25ccf8d80f2240c66cc#2465e2a3c5eae7616f025bcbb167e92602dac64f_1230_1233
Comment 1 Ahmad Samir 2021-08-25 18:46:32 UTC
This should be fixed by https://invent.kde.org/frameworks/kservice/-/merge_requests/24
Comment 2 Unknown 2021-08-25 18:49:55 UTC
(In reply to Ahmad Samir from comment #1)
> This should be fixed by
> https://invent.kde.org/frameworks/kservice/-/merge_requests/24

Thanks you!
Comment 3 Ahmad Samir 2021-08-27 12:35:07 UTC
Git commit 85c5815e10a3b448583817de98486d14ebcba3fc by Ahmad Samir.
Committed on 25/08/2021 at 19:18.
Pushed by ahmadsamir into branch 'master'.

Check for "PrefersNonDefaultGPU" desktop entry

And keep the check for X-KDE-RunOnDiscreteGpu for backwards compatibility.
This will be in KF version 5.86.

See:
https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/6eb7cfc0586d4eec3b856799007bf82aca6989a1
https://invent.kde.org/frameworks/kservice/-/commit/e548a548534a8a6aa094afcd7062dbf56cddc559

M  +12   -2    src/widgets/kpropertiesdialog.cpp

https://invent.kde.org/frameworks/kio/commit/85c5815e10a3b448583817de98486d14ebcba3fc