https://bugs.kde.org/show_bug.cgi?id=481538
Bug ID: 481538 Summary: Discrete GPU dialog sets the legacy X-KDE-RunOnDiscreteGpu desktop key as overlooked backwards compatibility instead of upstream PrefersNonDefaultGPU Classification: Frameworks and Libraries Product: frameworks-kio Version: git master Platform: Compiled Sources OS: Linux Status: REPORTED Severity: minor Priority: NOR Component: Properties dialog Assignee: kio-bugs-n...@kde.org Reporter: bery...@sayafe.org CC: kdelibs-b...@kde.org Target Milestone: --- SUMMARY If a desktop file doesn't already have PrefersNonDefaultGPU, the dialog sets the legacy X-KDE-RunOnDiscreteGpu key due to an overlooked conditional order in the name of backwards compatibility. STEPS TO REPRODUCE 0. Use 2 GPUs/Hybrid laptop 1. Find an app that doesn't already have PrefersNonDefaultGPU key (almost all regular apps) 2. Mark "Use discrete GPU" in advanced launch settings 3. It writes X-KDE-RunOnDiscreteGpu instead 4. Find an app that does have PrefersNonDefaultGPU key (i.e. switcheroo-control-test-app) 5. (Un)mark "Use discrete GPU" in advanced settings 6. Correctly (un)sets the key OBSERVED RESULT (Un)sets PrefersNonDefaultGPU if the key already exists, but writes X-KDE-RunOnDiscreteGpu on new entries. KIO checks for PrefersNonDefaultGPU and falls back to X-KDE-RunOnDiscreteGpu but in the wrong conditional order Kservice part is correct (but backwards compatibility part can still be dropped) EXPECTED RESULT (Un)set X-KDE-RunOnDiscreteGpu if the key already exists, but write PrefersNonDefaultGPU for new entries. OR Only take PrefersNonDefaultGPU into account since the legacy one should be deprecated since 2020 and Plasma 6 can break backwards compatibility. SOFTWARE/OS VERSIONS KDE Plasma Version: Broken since bundled, Plasma 5.23 KDE Frameworks Version: Broken since added, KF 5.86. ADDITIONAL INFORMATION Seems to be added with https://invent.kde.org/frameworks/kio/-/commit/85c5815e10a3b448583817de98486d14ebcba3fc The current file is in https://invent.kde.org/frameworks/kio/-/blob/master/src/widgets/kpropertiesdialogbuiltin_p.cpp?ref_type=heads#L2829 (moved since the mentioned commit) Should either drop X-KDE-RunOnDiscreteGpu entirely, or swap the two conditionals (and backport to 5.27 as well?) Or drop in 5.27 as well since apps can't set X-KDE-RunOnDiscreteGpu as they should follow the upstream spec anyway. It's tiny, so can I take it as a good first fix/contribution if you can guide the decision? Thanks xP -- You are receiving this mail because: You are watching all bug changes.