https://bugs.kde.org/show_bug.cgi?id=494524

            Bug ID: 494524
           Summary: Very inconsistent environment variable handling for
                    .desktop files
    Classification: Plasma
           Product: kde-cli-tools
           Version: 6.2.0
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 174685
  --> https://bugs.kde.org/attachment.cgi?id=174685&action=edit
Example showing what I've set enviroment variables to in graphical editor

SUMMARY
KDE Plasma seems to have inconsistent behavior when setting environment
variables for .desktop files (by right clicking entry in app menu and editing
variables).

If I set DRI_PRIME=1! to run firefox on my iGPU, the following happens:

- Firefox launched through app menu or pinned icon works fine, shows it running
on iGPU
- Firefox's other actions as defined in .desktop file such as new private
window, new window, etc do not respect this environment variable, thus firefox
launched this way runs on my dGPU
- Most frustrating of all, if firefox is not open and I click on a link in some
other application which launches firefox, then firefox is launched with dGPU
(the DRI_PRIME environment variable is not passed). The same happens when using
xdg-open http://somelink or kde-open http://somelink

It would be greatly appreciated if modifying desktop properties such as
enviroment variables applied to all ways the application can be launched and
also applied to xdg-open (currently I have no idea how to modify behavior for
xdg-open, so if I don't have firefox open and I open a link it runs on my dGPU
thus causing high CPU usage when watching video)

STEPS TO REPRODUCE
1. Modify .desktop file from GUI
2. Try launching app using other options, for example Firefox has actions to
launch a new window 
3. Verify enviroment variables somehow, with firefox this can be checked using
about:support page with DRI_PRIME to see which GPU is being used

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Kernel Version: 6.11.2-cb1.0.lto.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 30.5 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series


ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to