feisty kubuntu - laptop auto-suspends when on ac power even though set to do so only when on battery

Bug #77623 reported by daniel2501
4
Affects Status Importance Assigned to Milestone
kde-guidance (Ubuntu)
Fix Released
Undecided
Sebastian Kügler

Bug Description

Binary package hint: kde-guidance

Feisty
kubuntu-guidance-powermanager version: 0.7.1~svn20061215-0ubuntu1
kernel: 2.6.20-2-generic

Revision history for this message
Sebastian Kügler (sebasje) wrote :

Can you check that lshal report the AC status correctly?

Revision history for this message
daniel2501 (daniel2501) wrote :

It looks like maybe I was wrong and it's just suspending immediately after I unplug AC power and then open the laptop. It is reporting AC status correctly. I think this may be a duplicate bug then.

Revision history for this message
Sebastian Kügler (sebasje) wrote : Re: [Bug 77623] Re: feisty kubuntu - laptop auto-suspends when on ac power even though set to do so only when on battery

On Wednesday 03 January 2007 15:25, daniel2501 wrote:
> It looks like maybe I was wrong and it's just suspending immediately
> after I unplug AC power and then open the laptop. It is reporting AC
> status correctly. I think this may be a duplicate bug then.

We should reset the idle time after resume, that's probably why it does that
thing:

- It resumes
- idle time is high because during suspend it had not been reset
- It sees we're not on battery, checks if idle time is higher than set in the
  UI and happily suspends again
--
sebas

 http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Human beings, who are almost unique in having the ability to learn from the
experience of others, are also remarkable for their apparent disinclination
to do so. - Douglas Adams

Revision history for this message
Luka Renko (lure) wrote :

sebas, there seems to be some code that should protect this case:

       if idlesec - self.lastidlesec > 100:
            print "last:", idlesec - self.lastidlesec
            return # probably bogus idleseconds right after suspend
        self.lastidlesec = idlesec

The only problem I see is that lastidlesec is not updated after this change is detected, so idle handling may be completely disabled after resume. Or am I missing something?

Revision history for this message
Sebastian Kügler (sebasje) wrote :

On Wednesday 03 January 2007 21:17, Luka Renko wrote:
> sebas, there seems to be some code that should protect this case:
>
> if idlesec - self.lastidlesec > 100:
> print "last:", idlesec - self.lastidlesec
> return # probably bogus idleseconds right after suspend
> self.lastidlesec = idlesec
>
>
> The only problem I see is that lastidlesec is not updated after this change
> is detected, so idle handling may be completely disabled after resume. Or
> am I missing something?

Yeah, but this one is pretty ugly. The right thing to do I think
is 'resetting' the idleseconds post resume.
--
sebas

 http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Great people talk about ideas. Average people talk about things. Small people
talk about people. (Dave Marinaccio)

Revision history for this message
Sebastian Kügler (sebasje) wrote :

powermanager now resets the idle time after waking up and after plugging / unplugging the AC adapter.

Changed in kde-guidance:
assignee: nobody → sebas-kde
status: Unconfirmed → Fix Committed
Revision history for this message
Luka Renko (lure) wrote :

Feisty package: 0.7.1~svn20070129-0ubuntu1

Changed in kde-guidance:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.