FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 12-22-2011, 09:28 AM
Jonathan Nieder
 
Default Bug#652869: Laptop auto power-on after correct shutdown and being powered-off

severity 652869 important
quit

Hey,

Antonio-M. Corbi Bellot wrote:

> After upgrading to linux-image-3.1.0-amd64 (3.1.5-1) the laptop I use
> works as expected but after shutting it down and being correctly
> powered-off it automatically powers-on after 5 or 6 minutes (this is
> always the same time).
>
> Booting this laptop with linux-image-3.0.0-2-amd64 (3.0.0-6) I can't
> reproduce this problem, even with previous linux-image-3.1.0-amd64
> (prior to 3.1.5-1) I did not have this problem.

Fun.

Please send full "dmesg" output from immediately after bootup.

Could you try this patch[1]?

[1] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html

-- >8 --
Subject: Revert "rtc: Disable the alarm in the hardware"

This reverts commit 0cbc008c56f7b4a11ba6fe80e196d7ab322baabf.
---
Thanks and hope that helps,
Jonathan

drivers/rtc/interface.c | 44 ++++++++++----------------------------------
1 files changed, 10 insertions(+), 34 deletions(-)

diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 3d9d2b976560..44e91e598f8d 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -318,20 +318,6 @@ int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
}
EXPORT_SYMBOL_GPL(rtc_read_alarm);

-static int ___rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
-{
- int err;
-
- if (!rtc->ops)
- err = -ENODEV;
- else if (!rtc->ops->set_alarm)
- err = -EINVAL;
- else
- err = rtc->ops->set_alarm(rtc->dev.parent, alarm);
-
- return err;
-}
-
static int __rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
{
struct rtc_time tm;
@@ -355,7 +341,14 @@ static int __rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
* over right here, before we set the alarm.
*/

- return ___rtc_set_alarm(rtc, alarm);
+ if (!rtc->ops)
+ err = -ENODEV;
+ else if (!rtc->ops->set_alarm)
+ err = -EINVAL;
+ else
+ err = rtc->ops->set_alarm(rtc->dev.parent, alarm);
+
+ return err;
}

int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
@@ -769,20 +762,6 @@ static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer)
return 0;
}

-static void rtc_alarm_disable(struct rtc_device *rtc)
-{
- struct rtc_wkalrm alarm;
- struct rtc_time tm;
-
- __rtc_read_time(rtc, &tm);
-
- alarm.time = rtc_ktime_to_tm(ktime_add(rtc_tm_to_ktime(tm),
- ktime_set(300, 0)));
- alarm.enabled = 0;
-
- ___rtc_set_alarm(rtc, &alarm);
-}
-
/**
* rtc_timer_remove - Removes a rtc_timer from the rtc_device timerqueue
* @rtc rtc device
@@ -804,10 +783,8 @@ static void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer)
struct rtc_wkalrm alarm;
int err;
next = timerqueue_getnext(&rtc->timerqueue);
- if (!next) {
- rtc_alarm_disable(rtc);
+ if (!next)
return;
- }
alarm.time = rtc_ktime_to_tm(next->expires);
alarm.enabled = 1;
err = __rtc_set_alarm(rtc, &alarm);
@@ -869,8 +846,7 @@ again:
err = __rtc_set_alarm(rtc, &alarm);
if (err == -ETIME)
goto again;
- } else
- rtc_alarm_disable(rtc);
+ }

mutex_unlock(&rtc->ops_lock);
}
--
1.7.8




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111222102812.GC6548@elie.Belkin">http://lists.debian.org/20111222102812.GC6548@elie.Belkin
 
Old 01-03-2012, 02:40 PM
Jonathan Nieder
 
Default Bug#652869: Laptop auto power-on after correct shutdown and being powered-off

found 652869 linux-2.6/3.2~rc7-1~experimental.1
found 652869 linux-2.6/3.1.6-1
quit

Hi Marco,

Marco Santos wrote:

> I'm having the same problem with a Toshiba Portege Z830 with both kernel
> 3.2.0-rc7-amd64 (3.2~rc7-1~experimental.1) and 3.1.0-1-amd64 (3.1.6-1).
>
> My quick and dirty solution is setting (with cron) the wakealarm to one year
> from now:

Could you try 3.2-rc4 or 3.1.4 from snapshot.debian.org for comparison?

Thanks,
Jonathan



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120103154011.GA21256@elie.hsd1.il.comcast.net">h ttp://lists.debian.org/20120103154011.GA21256@elie.hsd1.il.comcast.net
 
Old 01-03-2012, 02:47 PM
Christophe Vu-Brugier
 
Default Bug#652869: Laptop auto power-on after correct shutdown and being powered-off

Hi Jonathan,

On Thu, 22 Dec 2011 04:28:12 -0600, Jonathan Nieder wrote :
> Could you try this patch[1]?
>
> [1] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html

I experienced the bug with a Toshiba Portege R830 and Linux 3.1.6. I
followed your instructions and I rebuilt a kernel that reverts "rtc:
Disable the alarm in the hardware". That works: my laptop does not
power on automagically after 5 minutes.

Thank you,

>
> -- >8 --
> Subject: Revert "rtc: Disable the alarm in the hardware"
>
> This reverts commit 0cbc008c56f7b4a11ba6fe80e196d7ab322baabf.
> ---
> Thanks and hope that helps,
> Jonathan
>
> drivers/rtc/interface.c | 44
> ++++++++++---------------------------------- 1 files changed, 10
> insertions(+), 34 deletions(-)
>
> diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
> index 3d9d2b976560..44e91e598f8d 100644
> --- a/drivers/rtc/interface.c
> +++ b/drivers/rtc/interface.c
> @@ -318,20 +318,6 @@ int rtc_read_alarm(struct rtc_device *rtc,
> struct rtc_wkalrm *alarm) }
> EXPORT_SYMBOL_GPL(rtc_read_alarm);
>
> -static int ___rtc_set_alarm(struct rtc_device *rtc, struct
> rtc_wkalrm *alarm) -{
> - int err;
> -
> - if (!rtc->ops)
> - err = -ENODEV;
> - else if (!rtc->ops->set_alarm)
> - err = -EINVAL;
> - else
> - err = rtc->ops->set_alarm(rtc->dev.parent, alarm);
> -
> - return err;
> -}
> -
> static int __rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm
> *alarm) {
> struct rtc_time tm;
> @@ -355,7 +341,14 @@ static int __rtc_set_alarm(struct rtc_device
> *rtc, struct rtc_wkalrm *alarm)
> * over right here, before we set the alarm.
> */
>
> - return ___rtc_set_alarm(rtc, alarm);
> + if (!rtc->ops)
> + err = -ENODEV;
> + else if (!rtc->ops->set_alarm)
> + err = -EINVAL;
> + else
> + err = rtc->ops->set_alarm(rtc->dev.parent, alarm);
> +
> + return err;
> }
>
> int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
> @@ -769,20 +762,6 @@ static int rtc_timer_enqueue(struct rtc_device
> *rtc, struct rtc_timer *timer) return 0;
> }
>
> -static void rtc_alarm_disable(struct rtc_device *rtc)
> -{
> - struct rtc_wkalrm alarm;
> - struct rtc_time tm;
> -
> - __rtc_read_time(rtc, &tm);
> -
> - alarm.time = rtc_ktime_to_tm(ktime_add(rtc_tm_to_ktime(tm),
> - ktime_set(300, 0)));
> - alarm.enabled = 0;
> -
> - ___rtc_set_alarm(rtc, &alarm);
> -}
> -
> /**
> * rtc_timer_remove - Removes a rtc_timer from the rtc_device
> timerqueue
> * @rtc rtc device
> @@ -804,10 +783,8 @@ static void rtc_timer_remove(struct rtc_device
> *rtc, struct rtc_timer *timer) struct rtc_wkalrm alarm;
> int err;
> next = timerqueue_getnext(&rtc->timerqueue);
> - if (!next) {
> - rtc_alarm_disable(rtc);
> + if (!next)
> return;
> - }
> alarm.time = rtc_ktime_to_tm(next->expires);
> alarm.enabled = 1;
> err = __rtc_set_alarm(rtc, &alarm);
> @@ -869,8 +846,7 @@ again:
> err = __rtc_set_alarm(rtc, &alarm);
> if (err == -ETIME)
> goto again;
> - } else
> - rtc_alarm_disable(rtc);
> + }
>
> mutex_unlock(&rtc->ops_lock);
> }


--
Christophe Vu-Brugier



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120103164717.22d9c3bc@trantor">http://lists.debian.org/20120103164717.22d9c3bc@trantor
 
Old 01-03-2012, 03:09 PM
Marco Santos
 
Default Bug#652869: Laptop auto power-on after correct shutdown and being powered-off

Hi Jonathan,

I've tested 3.2-rc4 and it's fixed.
There's no more hidden elfs powering on the laptop

Thanks,
Marco

On 01/03/2012 03:40 PM, Jonathan Nieder wrote:

found 652869 linux-2.6/3.2~rc7-1~experimental.1
found 652869 linux-2.6/3.1.6-1
quit

Hi Marco,

Marco Santos wrote:


I'm having the same problem with a Toshiba Portege Z830 with both kernel
3.2.0-rc7-amd64 (3.2~rc7-1~experimental.1) and 3.1.0-1-amd64 (3.1.6-1).

My quick and dirty solution is setting (with cron) the wakealarm to one year
from now:

Could you try 3.2-rc4 or 3.1.4 from snapshot.debian.org for comparison?

Thanks,
Jonathan







--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F032852.1010808@waynext.com">http://lists.debian.org/4F032852.1010808@waynext.com
 
Old 01-03-2012, 03:30 PM
Jonathan Nieder
 
Default Bug#652869: Laptop auto power-on after correct shutdown and being powered-off

forwarded 652869 http://thread.gmane.org/gmane.linux.kernel/1225947/focus=1234608
tags 652869 + patch
quit

Christophe Vu-Brugier wrote:

> I experienced the bug with a Toshiba Portege R830 and Linux 3.1.6. I
> followed your instructions and I rebuilt a kernel that reverts "rtc:
> Disable the alarm in the hardware". That works: my laptop does not
> power on automagically after 5 minutes.

Thanks, all.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120103163035.GB21256@elie.hsd1.il.comcast.net">h ttp://lists.debian.org/20120103163035.GB21256@elie.hsd1.il.comcast.net
 

Thread Tools




All times are GMT. The time now is 03:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org