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

            Bug ID: 456956
           Summary: Power script settings, perhaps other settings, from
                    $XDG_CONFIG_DIRS are discarded when user clicks on
                    Defaults
           Product: systemsettings
           Version: 5.24.6
          Platform: Kubuntu Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: kcm_powerdevil
          Assignee: plasma-b...@kde.org
          Reporter: eeickme...@ubuntu.com
                CC: k...@privat.broulik.de
  Target Milestone: ---

SUMMARY

If a distribution or OEM places a powermanaagementprofilesrc file in the path
defined in $XDG_CONFIG_DIRS, whether that's in /etc/xdg or otherwise, the
settings fail to propogate but get superseded by some kind of built-in
hardcoded mechanism as opposed to those that were defined by the distribution
or OEM. These settings should simply get written based on whatever the
hardcoded defaults are *unless* a default has been defined somewhere in the
$XDG_CONFIG_DIRS path (in this case,
~/.config/kdedefaults:/etc/xdg/xdg-plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings).

Additionally, a few GUI glitches occur, such as the checkbox getting rechecked
without anything in the script box, as well as a few other items that don't
make logical sense. You'll probably have to see for yourself as you work in the
steps to reproduce below.

STEPS TO REPRODUCE
1. Create a script in /usr/local/bin. I made one called
/usr/local/bin/HelloPopup with the following contents:

#! /bin/bash

kdialog --msgbox 'Hello World'

2. Add the following to /etc/xdg/powermanagement

[AC][RunScript]
idleTime=600000
scriptCommand=/usr/local/bin/HelloPopup
scriptPhase=0

[Battery][RunScript]
idleTime=600000
scriptCommand=/usr/local/bin/HelloPopup
scriptPhase=0

[LowBattery][RunScript]
idleTime=600000
scriptCommand=/usr/local/bin/HelloPopup
scriptPhase=0

3. Create a new user.

4. Open System Settings > Power Management > Energy Saving

Notice all fields are correct, including script field.

5. Uncheck script field, click apply.

6. Switch to a different System Settings module and come back to Energy Saving.

7. Click "Defaults", click "Yes".

OBSERVED RESULT

Script field does not result in original default being applied.

EXPECTED RESULT

Script field goes back to original default.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.04
(available in About System)
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.95.0
Qt Version: 5.13.3

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

Reply via email to