This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[PowerDevil on XFCE] Problem with Standby

Tags: None
(comma "," separated)
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Hi,

I managed to use powerdevil under XFCE now for setting my notebook into sleep mode. It works quite well, except one thing: when closing the lid, the notebook goes into standby (ok). When re-opening it, it wakes up (ok), and then goes into standby again (?). Only when re-opening the lid another time, it wakes up. This also happens under KDE.

For me this looks like the suspend command being called twice (maybe by two different daemons/apps/whatever), any ideas how i could prevent this?

Best regards,

Sven


I'm working on the KDevelop IDE.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Are you using any other Power Managers other than Powerdevil? Such as powersaved, etc.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Hi,

Thanks for your answer.

I don't think i'm using any other such applications, I tried to uninstall everything that could have to do with it (like kpowersave from kde3 or the gnome power manager) in order to be sure.

The services I think could have to do with power management are these:
Code: Select all
top -b -d 1 |egrep '(power|kde|acpi)'
kacpid, kacpi_notify, ktpacpid, hald-addon-acpi, kdeinit4, kded4


After a reboot, I got another problem now, like before - powerDevil is running (at least the controlCenter -> services tells me this), but when closing the lid, the standby LED just keeps blinking, and I can't wake up the notebook again. On closing the lid, the screen goes off, on re-opening it goes on again. Under KDE, it still works (?). The problem I described above sees to be fixed after reboot, it probably was caused by me manually starting/stopping different services and daemons.

For the above command, there's no difference between kde and xfce, except kde gives me "startkde" also (which should be irrelevant).

Best regards,
Sven

/e: running "startkde" when the xfce desktop environment is running successfully starts up kde, but suspend still does *not* work. I don't know what this means exactly, probably it means that an extra service is preventing powerdevil from working correctly, and this extra-service isn't started with kde but with xfce.

Last edited by scummos on Mon Jun 22, 2009 7:58 am, edited 1 time in total.


I'm working on the KDevelop IDE.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It appears that Powerdevil is not initiating the suspend procedures for a unknown reason outside a KDE session. I suspect for some reason it cannot contact KSMServer, which is responsible for managing the KDE session.

However it is the responsibility of startkde to initiate KSMServer ( which in turn starts kdeinit, plasma, etc ) so that should not be a problem. Try setting the variable "KDE_FULL_SESSION" to true as part of your Xfce login procedure ( before Powerdevil is started )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Thats a great tip, thanks!
Indeed, kdeinit has problems starting ksmserver (a corresponding error message appears on startup). I ignored it until now, because I was thinking this is only responsible for restoring my previous kde session... :)

Thus, I'll try to fix this now, and write again then. Thanks!

/edit: running "ksmserver" from shell gives me: "Could not register with D-Bus. Aborting.". No ideas.
I checked permissons in my home directory -- ok.
I installed all updates available (now have 4.2.4) -- nothing changed.

Best Regards,
Sven

Last edited by scummos on Mon Jun 22, 2009 10:30 am, edited 1 time in total.


I'm working on the KDevelop IDE.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Ok, I now tested the following things:

» I may stop any service in KDE except powerdevil, and suspend works
» Starting just the powerdevil service in any other desktop environment works (before start: screen blanking, after: "standby"), but is not sufficient: standby does not work correctly, as described before.

Thus, there must be a KDE service powerdevil needs in order to work correctly. Just, which one? :)
I don't think it is ksmserver, because I now succeeded starting it under XFCE (the "ksmserver" command just returns a warning about the window manager), and still can't start it under KDE, and under KDE this works, under XFCE it doesnt.

Maybe also a logfile would be useful. Does such a file exist?

Best regards, Sven


I'm working on the KDevelop IDE.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Do you have a DBus session bus running? That is required for KSMServer and Powerdevil to communicate, and is started by KDE automatically on startup. It usually runs under the user you logged in as, not root ( that is the System bus )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Hi,

top tells me, yes:
Code: Select all
 » sven@linux-notebook ~ » top -b -n 1 |grep dbus
 5989 messageb  20   0  2524 1108  696 S  0.0  0.1   0:00.46 dbus-daemon       
 6813 root      20   0  3004  784  528 S  0.0  0.1   0:00.00 dbus-launch       
 6821 root      20   0  2244  648  508 S  0.0  0.1   0:00.00 dbus-daemon       
 7135 sven      20   0  3004  764  508 S  0.0  0.1   0:00.00 dbus-launch       
 7136 sven      20   0  2376  876  584 S  0.0  0.1   0:01.03 dbus-daemon


I'm working on the KDevelop IDE.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Hi,

top tells me, yes:
Code: Select all
 » sven@linux-notebook ~ » top -b -n 1 |grep dbus
 5989 messageb  20   0  2524 1164  696 S  0.0  0.1   0:00.78 dbus-daemon       
 7368 root      20   0  2244  648  508 S  0.0  0.1   0:00.00 dbus-daemon       
 7369 root      20   0  3004  780  528 S  0.0  0.1   0:00.00 dbus-launch       
 7391 sven      20   0  3004  764  508 S  0.0  0.1   0:00.00 dbus-launch       
 7392 sven      20   0  2508  956  584 S  0.0  0.1   0:00.40 dbus-daemon


ksmserver is not running until I start it, but if I start it, plasma is starting up... furthermode, even after invoking the "ksmserver" command and thereby loading a complete kde desktop environment (?) standby does not work.

Sorry - silly question, but which commands should I best use to start a kde environment? Currently, I'm doing
Code: Select all
KDE_FULL_SESSION=1 kdeinit4; kded4

Is this correct?

Another thing (just to have it mentioned), on starting up a KDE session with plasma usw. I find the following error message in .xsession-errors:
Code: Select all
** (nm-applet:7603): WARNING **:   applet_dbus_manager_start_service(): Could not acquire the NetworkManagerUserSettings service as it is already taken.  Return: 3

Doesn't matter, does it? :)
I just mentioned it 'cause it seems to be related to dbus.

Thanks,
Sven

Last edited by scummos on Tue Jun 23, 2009 7:43 am, edited 1 time in total.


I'm working on the KDevelop IDE.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Apparently according to Dario Freddi ( author of Powerdevil ) it should be fine to use Powerdevil in Xfce..

Does running "qdbus" output a list of services?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Hi,

this seems to be a non-powerdevil related problem. I think I found out that powerdevil is calling the pm-suspend command; I tried to call this command manually while disabling powerdevil, it worked under KDE, but failed under XFCE (same problem as described above). Thus, this is apparently not a problem of powerdevil. Strange, even from console (without X running) it works...
Maybe XFCE is setting some strange environment variables...? ^^

/e: no, seems to be other way round. it doesn't work with any other desktop environment either. =/
And yes, qdbus works, i can even call powerdevil to do suspend, but it fails as described (under xfce) and succeeds on kde.

/e2: I give up. I will simply use KDE. ^^
This isn't solved, but it doesnt matter any more.

/edit 3: Years later, I now know the solution for this: The lm_lid script is run when the lid is opened *and* when it's closed. You can work around this by using a lockfile, for example.

Best regards,
Sven

Last edited by scummos on Thu Jun 25, 2009 9:49 am, edited 1 time in total.


I'm working on the KDevelop IDE.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]