Summary: | Switching between powerdevil states hangs kded | ||
---|---|---|---|
Product: | [Unmaintained] solid | Reporter: | Torrie Fischer <tdfischer> |
Component: | powermanagement-daemon | Assignee: | Dario Freddi <drf> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andresjarv, digitalpioneer, jacopods+kde, jaroslav.petras, sitter, tiposchi, zdenek.zikan |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Unspecified | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
patch for the daemon
patch for krunner |
Description
Torrie Fischer
2008-12-07 07:55:27 UTC
Same problem here, when the program switch to aggressive powersave, I can't use anymore my keyboard. KDE 4.1.86 (4.2 >= 20081221), Debian experimental + unreleased (deb http://kde42.debian.net/debian/ UNRELEASED main), amd64 Same problem here. I can use mouse in this time period. It happens after manual profile switch too. This issue is related to DPMS. Knowing what video card you are on could definitely help. (In reply to comment #3) > This issue is related to DPMS. Knowing what video card you are on could > definitely help. > asfalatus@mobileworkshop:~$ lspci -k | grep VGA 01:05.0 VGA compatible controller: ATI Technologies Inc RS780M/RS780MN [Radeon HD 3200 Graphics] 02:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3400 Series I am using radeon driver just now, but no matters which driver I use (fglrx before, or radeonhd). But this is interesting: asfalatus@mobileworkshop:~$ cat /var/log/Xorg.0.log | grep DPMS (II) Loading extension DPMS (II) Loading extension DPMS (II) RADEON(0): No DPMS capabilities specified (II) RADEON(0): No DPMS capabilities specified (**) RADEON(0): DPMS enabled (II) RADEON(0): No DPMS capabilities specified (II) RADEON(0): No DPMS capabilities specified ... But as I said here: http://bugs.kde.org/show_bug.cgi?id=178642 , default display power manager in KDE4 works well. In KDE 3.5.9 (with kpowersave app) everything works well too. Strange things happen around DPMS ^^ Ubuntu bug https://bugs.edge.launchpad.net/ubuntu/+source/kdebase-workspace/+bug/312549 describes the same problem IMO. I also see a delay in reaction (for some profile switches I only get the change notification after >10 seconds), however mouse and keyboard appear to working just fine. 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev03) Subsystem: Dell Device 01bd Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at eff00000 (32-bit, non-prefetchable) [size=512K] I/O ports at eff8 [size=8] Memory at d0000000 (32-bit, prefetchable) [size=256M] Memory at efec0000 (32-bit, non-prefetchable) [size=256K] Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable- Capabilities: [d0] Power Management version 2 Kernel modules: intelfb From the Ubuntu bug: michael@michaelspc:~$ sudo lspci -v -s 01:00.0 01:00.0 VGA compatible controller: nVidia Corporation GeForce 8600M GT (rev a1) Subsystem: Dell Device 0228 Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at fd000000 (32-bit, non-prefetchable) [size=16M] Memory at e0000000 (64-bit, prefetchable) [size=256M] Memory at fa000000 (64-bit, non-prefetchable) [size=32M] I/O ports at ef00 [size=128] [virtual] Expansion ROM at fea00000 [disabled] [size=128K] Capabilities: [60] Power Management version 2 Capabilities: [68] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- Capabilities: [78] Express Endpoint, MSI 00 Capabilities: [100] Virtual Channel <?> Capabilities: [128] Power Budgeting <?> Capabilities: [600] Vendor Specific Information <?> Kernel driver in use: nvidia Kernel modules: nvidiafb, nvidia I am experiencing the same problem. $ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c) *** Bug 178999 has been marked as a duplicate of this bug. *** I experience the same here, with this video card: 00:12.0 VGA compatible controller: nVidia Corporation Device 0531 (rev a2) (II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is (II) NVIDIA(0): enabled. (II) NVIDIA(0): NVIDIA GPU GeForce 7150M / nForce 630M (C67) at PCI:0:18:0 (II) NVIDIA(0): (GPU-0) (--) NVIDIA(0): Memory: 262144 kBytes (--) NVIDIA(0): VideoBIOS: 05.67.32.16.06 (--) NVIDIA(0): Interlaced video modes are supported on this GPU (--) NVIDIA(0): Connected display device(s) on GeForce 7150M / nForce 630M at (--) NVIDIA(0): PCI:0:18:0: (--) NVIDIA(0): CMO (DFP-0) (--) NVIDIA(0): CMO (DFP-0): 310.0 MHz maximum pixel clock (--) NVIDIA(0): CMO (DFP-0): Internal Dual Link LVDS ..... (**) Option "dpms" "true" (**) NVIDIA(0): DPMS enabled ----- This happens with both nvidia drivers 177.82 and 180.22 if I comment out the DPMS code in the daemon, /apparently/ the problem is solved. Is it the driver or X? It seems that we have quite different video cards with the same issue. xorg-server is version 1.3.0.0 if that might help. The issue appears to be gone by commenting out the following call: PowerDevilDaemon.cpp:~520 void PowerDevilDaemon::setUpDPMS() { ... d->kscreenSaverIface->configure(); } I am unable to further debug this call as I don't know what function corresponds to the dbus call. Can anybody confirm that? I've done some additional research; apparently the dbus call itself hangs kded; I replaced the called function in krunner/screensaver with a function that just returns and the hang still persists. On the other hand the code in kcontrol/energy/ which does the same looks pretty much identical. But that one does not hang dbus, as it doesn't hang by directly calling the method with qdbus. I am most confused. Btw, Dario, what's the reason for calling the function with a delay? QTimer::singleShot(300, this, SLOT(setUpDPMS())); Jacopo The bug is caused by a dbus deadlock in the setProfile call; the powerdevil runner is waiting for the powerdevil daemon while the daemon is waiting for krunner/screensaver. Sometimes you can even get two deadlocks in a row (~50 secs) when changing profile with the battery applet or the runner because actually they call refreshStatus before setProfile; this actually means that if for some reason you are in a profile which is different from the "default", you'll get two calls to setProfile. *** is this the expected behaviour *** ? Following a suggestion by Thiago, the patch works by letting powerdevil emit a signal which is received by krunner/screensaver without any deadlock. -- it's my very first time to write code with dbus and such, so please have a look at the code; it's should be simple to see if I did something really bad-- Besides, this patch should fix also Bug #178642 (have a look at the code :P) The patch is composed of one file for powerdevil/daemon and another one for krunner/screensaver J Created attachment 30891 [details]
patch for the daemon
Created attachment 30892 [details]
patch for krunner
SVN commit 922619 by dafre: BUG: 177123 BUG: 178642 CCMAIL: jacopods@gmail.com Applying Jacopo's patch, and removing generation of (now) useless kscreensaver interface. This should solve every kind of problems with DPMS. I will backport to 4.2 soon M +18 -0 krunner/screensaver/saverengine.cpp M +2 -2 powerdevil/daemon/CMakeLists.txt M +19 -14 powerdevil/daemon/PowerDevilDaemon.cpp M +3 -2 powerdevil/daemon/PowerDevilDaemon.h M +3 -2 powerdevil/daemon/org.kde.PowerDevil.xml WebSVN link: http://websvn.kde.org/?view=rev&revision=922619 SVN commit 922628 by dafre: BUG: 177123 BUG: 178642 Backporting to 4.2 M +18 -0 krunner/screensaver/saverengine.cpp M +2 -2 powerdevil/daemon/CMakeLists.txt M +19 -14 powerdevil/daemon/PowerDevilDaemon.cpp M +3 -2 powerdevil/daemon/PowerDevilDaemon.h M +3 -2 powerdevil/daemon/org.kde.PowerDevil.xml WebSVN link: http://websvn.kde.org/?view=rev&revision=922628 *** Bug 182685 has been marked as a duplicate of this bug. *** *** Bug 184992 has been marked as a duplicate of this bug. *** *** Bug 183867 has been marked as a duplicate of this bug. *** |