Bug 204561 - powerdevil does not restore default schemes after powerdevilrc was deleted
Summary: powerdevil does not restore default schemes after powerdevilrc was deleted
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement-daemon (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-20 20:09 UTC by S. Burmeister
Modified: 2010-10-02 12:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S. Burmeister 2009-08-20 20:09:02 UTC
Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    SuSE RPMs

Powerdevil's settings got messed-up, so I stopped plasma and deleted powerdevilrc and restarted plasma. Now I only have "performance" available in the scheme pane.

Expected behavior, create default schemes if there are none.
Comment 1 Dario Freddi 2009-12-01 18:48:37 UTC
It should already do, although the file for that is powerdevilprofilesrc. Can you please check it?
Comment 2 S. Burmeister 2009-12-01 19:02:38 UTC
With an almost KDE 4.3.2 I can still reproduce this.

1. kquitapp plasma-desktop
2. mv ~/.kde4/share/config/powerdevil* ~
3. plasma-desktop
4. Open systemsettings > power management: only performance is shown.

The battery plugin does show more profiles in the drop-down menu. Not sure if it still does after I restarted KDE.
Comment 3 Dario Freddi 2009-12-01 19:06:19 UTC
Ah, yeah: that's because powerdevil lives in KDED :) you would have to remove profiles and restart kded to see if that works (anyway, I've recently addressed and fixed a very similar bug for 4.4 that I couldn't backport)
Comment 4 S. Burmeister 2009-12-01 19:10:18 UTC
Adding to that:

Adding the battery plasmoid does not create anything, neither a powerdevilrc not a powerdevilprofilesrc, yet shows all the (not existing) profiles in the menu.

If one opens the power management kcm one cannot pick any profiles for "if the power cable is attached" etc. If one does not change anything but only goes back to the systemsettings main view, a powerdevilprofilesrc is genrated with the following content.

[Performance]
brightness=100
cpuPolicy=8
idleAction=0
idleTime=50
lidAction=0
turnOffIdle=false
turnOffIdleTime=120

A powerdevilrc is still not created.
Comment 5 Dario Freddi 2009-12-01 19:14:28 UTC
powerdevilrc is created if needed, systemsettings should reload defaults. Quite easy, I'll solve that quickly. For the applet, I strongly doubt it should attempt any reloading - the only case where I see configuration files deleted and plasma going nuts and not kded is manual user intervention, so I think this should not happen
Comment 6 S. Burmeister 2009-12-01 19:15:34 UTC
Restarting powerdevil crashes kded4 but after restarting it those two files are generated and contain all profiles.
Comment 7 Dario Freddi 2009-12-01 19:21:24 UTC
Yep, that crash is exactly what I fixed in 4.4 :)
Comment 8 Dario Freddi 2009-12-08 14:15:02 UTC
I forgot to close this bug :)