Bug 282639 - Pressing the power button (Wetab) causes freeze for some minutes
Summary: Pressing the power button (Wetab) causes freeze for some minutes
Status: RESOLVED DUPLICATE of bug 265405
Alias: None
Product: Active
Classification: Plasma
Component: Plasma mobile shell (show other bugs)
Version: unspecified
Platform: unspecified Linux
: HI normal
Target Milestone: unscheduled
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-23 18:08 UTC by Thomas Pfeiffer
Modified: 2011-10-03 10:53 UTC (History)
5 users (show)

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 Thomas Pfeiffer 2011-09-23 18:08:47 UTC
Version:           unspecified
OS:                Linux

When I press the power button on the Wetab, the system freezes. After several minutes, it works again. If I press the power button again after that, it brings up the logout options.

Reproducible: Sometimes

Steps to Reproduce:
Press the power button

Actual Results:  
"Freeze" _(cannot do anything) for several seconds to minutes)

Expected Results:  
Pop up logout options

Image used: 2011-09-16-16-07-meego-plasma-contour-in-progress-usb-live with
packages updated today (2011-09-23).
Comment 1 Robert Riemann 2011-09-23 19:44:07 UTC
I can confirm this with
2011-09-08-17-25-meego-plasma-active-testing-USB-live.iso and packages updated today.
Comment 2 Aaron J. Seigo 2011-09-26 09:42:12 UTC
on press, it should sleep.
on long hold, it should do a forced-power-off.

in no circumstances should it bring up the log out options.

this sounds like a configuration issue with the PowerDevil profiles.
Comment 3 Sebastian Kügler 2011-09-26 10:12:01 UTC
No, the powerbutton plasmoid is meant to do this. Can be easily changed, of course.
Comment 4 Thomas Pfeiffer 2011-09-26 11:14:17 UTC
First of all, what really needs to be fixed is the freezing part ;)

I'll move the discussion about the expected results to a mailing list thread to avoid spamming the bug comments and then edit the bug as soon as we've reached a conclusion.
Comment 5 Aaron J. Seigo 2011-09-26 11:25:07 UTC
ah! the powerbutton PLASMOID. not the physical power button.

looking at the code, i can see where the problem is: in libkworkspace, requestShutdown is synchronous. it makes a call to QApplication::syncX(). this alone can take a while. it then requests org.kde.ksmserver to reset its "user timestamp" which seems to be a way to avoid timing issues with ksmserver. ... though i don't see why. will have to ask Ossi what's up with that. it also may make a dbus call which may not return immediately. in all, this is a highly synchronous method with all sorts of potentially long-blocking items in it.

 (btw, it makes me nervous that we're using libkworkspace in code outside of kde-workspace, though that will be resolved in 4.8 in this partciular case with the powermanagement engine gaining these capabilities ..)
Comment 6 Thomas Pfeiffer 2011-09-26 11:39:46 UTC
Erm... well I actually _did_ mean the hardware power button ;) Sorry if I caused confusion.
Comment 7 Aaron J. Seigo 2011-09-26 12:35:30 UTC
that's important because if we're talking about the hardware power button, with the correct configuration this is a non-issue for PA1 as it should simply sleep the device. if it isn't doing that, then the bug is that the configuration is incorrectly being set up.

in any case, the reason for the freeze is already being discussed on the relevant mailing list
Comment 8 Marco Martin 2011-09-26 16:12:42 UTC
to me also happens with the power button
Comment 9 Marco Martin 2011-09-26 16:19:45 UTC
sorry, *hardware* power button i mean ;)
Comment 10 Aaron J. Seigo 2011-09-26 19:57:15 UTC
yes, these settings got reverted again. i'm guessing its some conflict between packages and our defaults get clobbered by files from other generic packages when they update?
Comment 11 Javier Llorente 2011-09-29 09:06:17 UTC
Issue reproducible on 2011-09-28-20-40-meego-plasma-active-testing-USB-live.iso
Comment 12 Wilco 2011-10-02 10:50:06 UTC
Same problem on arch linux 64 and 32 bit. Using acpid and calling "init 0" on the power button press works as excepted, i.e. shutdown within a few seconds. However, init 0 does not properly end the KDE session.

Power settings are at default. "When power button pressed" is set to Shutdown. The regular shutdown menu (by using Ctrl+Alt+Del) does not have this problem.
Comment 13 Aaron J. Seigo 2011-10-03 10:53:00 UTC
this bug is apparently now fixed in kde-workspace master branch; i have emailed the active list the commit hashes that should be applied against plasma active packages until we move to a Workspaces 4.8 base.

*** This bug has been marked as a duplicate of bug 265405 ***