[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 287952] Battery Monitor widget stops tracking charging state changes after suspend/resume cycle
From:       Csaba Kertész <csaba.kertesz () gmail ! com>
Date:       2012-07-06 17:32:40
Message-ID: bug-287952-17878-sbzaAX8Ifd () http ! bugs ! kde ! org/
[Download RAW message or body]

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

--- Comment #23 from Csaba Kertész <csaba.kertesz@gmail.com> ---
I use KDE 4.7.2, so I could not apply exactly the same patch, but the only
difference between my KDE version and yours that the disabled DBus reply is
async in your case and sync in KDE 4.7.2.  So I used the following:

        setData("Battery", "Has Battery", !batterySources.isEmpty());
        if (!batterySources.isEmpty()) {
            setData("Battery", "Sources", batterySources);
            /* COMMENT
            QDBusMessage msg =
QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement",
                                                             
"/org/kde/Solid/PowerManagement",
                                                             
"org.kde.Solid.PowerManagement",
                                                             
"batteryRemainingTime");
            QDBusPendingReply< int > reply =
QDBusConnection::sessionBus().asyncCall(msg);
            reply.waitForFinished();
            if (reply.isValid()) {
                //kDebug() << "Remaining time 1:" << reply.value();
                setData("Battery", "Remaining msec", reply.value());
            }
         COMMENT   */
        }

Results: The patch does not effect anything, the same sympthoms are observed
before and after. I publish them to see an exact test cases for the problem:

Test case 1:
------------
1. Laptop is not suspended in this case
2. Pull and reconnect the AC power

Result: The Battery Monitor always works correctly

Test case 2:
------------
1. Laptop on AC power
2. Suspend
3. Pull the AC power
4. Resume on battery power

Result: Battery Monitor shows the battery percentage correctly.

Test case 3:
------------
1. Laptop on battery power
2. Suspend
2. Resume on battery power

Result: Battery Monitor does not work, it is stuck at the same battery
percentage.

-- 
You are receiving this mail because:
You are watching all bug changes.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic