public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.19: ACPI reports AC not present after resume from STD
@ 2006-12-03 12:25 Andrey Borzenkov
  2006-12-03 13:11 ` Pavel Machek
  0 siblings, 1 reply; 25+ messages in thread
From: Andrey Borzenkov @ 2006-12-03 12:25 UTC (permalink / raw)
  To: linux-acpi; +Cc: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I started to notice it some time ago; I can't say exactly if this was not 
present in earlier versions because recently I switched from STR (which gave 
me no end of troubles) to STD. So I may have not seen it before.

Suspend to disk while on battery. Plug in AC, resume. ACPI continues to show 
AC adapter as not present:

{pts/0}% cat /proc/acpi/ac_adapter/ADP1/state
state:                   off-line

replugging AC correctly changes state to on-line.

The system is Toshiba Portege 4000; I am not sure which information may be 
required in this case so please tell what is needed (unfortunately I will be 
off next two weeks without access to this system).

regards

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFcsJYR6LMutpd94wRAqSeAJ4n3lHqbdvgBeXxeIc9ZUTDe/X2jgCgyfU5
w+heEYYnA3Al/U9xHovOkQ4=
=F+Zu
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 25+ messages in thread
* RE: 2.6.19: ACPI reports AC not present after resume from STD
@ 2006-12-07 18:57 Karasyov, Konstantin A
  2006-12-07 19:47 ` Rafael J. Wysocki
  0 siblings, 1 reply; 25+ messages in thread
From: Karasyov, Konstantin A @ 2006-12-07 18:57 UTC (permalink / raw)
  To: Andrey Borzenkov; +Cc: linux-acpi, Lebedev, Vladimir P

[-- Attachment #1: Type: text/plain, Size: 2309 bytes --]

Hi,

Unfortunately, I cannot reproduce this bug on my system, but the problem
could be solved by adding a resume handler for AC adapter device. Could
you try the attached patch to see if it helps.

Regards.
Konstantin.
>-----Original Message-----
>From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
>owner@vger.kernel.org] On Behalf Of Andrey Borzenkov
>Sent: Sunday, December 03, 2006 7:01 PM
>To: Alexey Starikovskiy
>Cc: Pavel Machek; linux-acpi@vger.kernel.org;
linux-kernel@vger.kernel.org
>Subject: Re: 2.6.19: ACPI reports AC not present after resume from STD
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Sunday 03 December 2006 17:35, Alexey Starikovskiy wrote:
>> Andrey Borzenkov wrote:
>> > -----BEGIN PGP SIGNED MESSAGE-----
>> > Hash: SHA1
>> >
>> > On Sunday 03 December 2006 16:11, Pavel Machek wrote:
>> >> Hi!
>> >>
>> >>> I started to notice it some time ago; I can't say exactly if this
was
>> >>> not present in earlier versions because recently I switched from
STR
>> >>> (which gave me no end of troubles) to STD. So I may have not seen
it
>> >>> before.
>> >>>
>> >>> Suspend to disk while on battery. Plug in AC, resume. ACPI
continues
>to
>> >>> show AC adapter as not present:
>> >>>
>> >>> {pts/0}% cat /proc/acpi/ac_adapter/ADP1/state
>> >>> state:                   off-line
>> >>>
>> >>> replugging AC correctly changes state to on-line.
>> >>
>> >> try echo platform > /sys/power/disk.
>> >
>> > Nope.
>> >
>> > {pts/0}% pmsuspend disk
>> > ... after resume
>> > {pts/0}% cat /sys/power/disk
>> > platform
>> > {pts/0}% cat /proc/acpi/ac_adapter/ADP1/state
>> > state:                   off-line
>>
>> please look if patches in 7122 work  for you.
>
>No. I applied patches from comments 38 and 52 (modified, it did not
apply
>cleanly to 2.6.19). As far as I understood, those two were final.
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.5 (GNU/Linux)
>
>iD8DBQFFcvS3R6LMutpd94wRAp9oAKCM7+6G4SsgFEGLgkW1jxM3VMQHqQCdFSDQ
>14w+QsgDtxWusmfdzCMOdqo=
>=QDyt
>-----END PGP SIGNATURE-----
>-
>To unsubscribe from this list: send the line "unsubscribe linux-acpi"
in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: ac_resume.patch --]
[-- Type: application/octet-stream, Size: 1080 bytes --]

Index: linux-2.6/drivers/acpi/ac.c
===================================================================
--- linux-2.6.orig/drivers/acpi/ac.c	2006-09-20 07:42:06.000000000 +0400
+++ linux-2.6/drivers/acpi/ac.c	2006-12-07 22:52:00.000000000 +0300
@@ -55,6 +55,7 @@
 
 static int acpi_ac_add(struct acpi_device *device);
 static int acpi_ac_remove(struct acpi_device *device, int type);
+static int acpi_ac_resume(struct acpi_device *device, int state);
 static int acpi_ac_open_fs(struct inode *inode, struct file *file);
 
 static struct acpi_driver acpi_ac_driver = {
@@ -64,6 +65,7 @@
 	.ops = {
 		.add = acpi_ac_add,
 		.remove = acpi_ac_remove,
+		.resume = acpi_ac_resume,
 		},
 };
 
@@ -281,6 +283,22 @@
 	return 0;
 }
 
+static int acpi_ac_resume(struct acpi_device *device, int state)
+{
+	int result = 0;
+	struct acpi_ac *ac = NULL;
+
+
+	if (!device || !acpi_driver_data(device))
+		return -EINVAL;
+
+	ac = (struct acpi_ac *)acpi_driver_data(device);
+
+	result = acpi_ac_get_state(ac);
+
+	return (result);
+}
+
 static int __init acpi_ac_init(void)
 {
 	int result;

^ permalink raw reply	[flat|nested] 25+ messages in thread
* RE: 2.6.19: ACPI reports AC not present after resume from STD
@ 2006-12-07 20:40 Lebedev, Vladimir P
  2006-12-16 17:38 ` Andrey Borzenkov
       [not found] ` <200702132116.05404.arvidjaar@mail.ru>
  0 siblings, 2 replies; 25+ messages in thread
From: Lebedev, Vladimir P @ 2006-12-07 20:40 UTC (permalink / raw)
  To: Alexey Starikovskiy, Rafael J. Wysocki
  Cc: Karasyov, Konstantin A, Andrey Borzenkov, linux-acpi


Please register new bug, attach acpidump and dmesg.


-----Original Message-----
From: Alexey Starikovskiy [mailto:alexey.y.starikovskiy@linux.intel.com]

Sent: Thursday, December 07, 2006 10:49 PM
To: Rafael J. Wysocki
Cc: Karasyov, Konstantin A; Andrey Borzenkov;
linux-acpi@vger.kernel.org; Lebedev, Vladimir P
Subject: Re: 2.6.19: ACPI reports AC not present after resume from STD

Rafael J. Wysocki wrote:
> Hi,
>
> On Thursday, 7 December 2006 19:57, Karasyov, Konstantin A wrote:
>   
>> Hi,
>>
>> Unfortunately, I cannot reproduce this bug on my system, but the
problem
>> could be solved by adding a resume handler for AC adapter device.
Could
>> you try the attached patch to see if it helps.
>>     
>
> I can reproduce it and the patch doesn't help.
>
> Greetings,
> Rafael
>
>   
Any ACPI errors in dmesg?

Regards,
    Alex.

^ permalink raw reply	[flat|nested] 25+ messages in thread
* RE: 2.6.19: ACPI reports AC not present after resume from STD
@ 2006-12-08 13:26 Karasyov, Konstantin A
  0 siblings, 0 replies; 25+ messages in thread
From: Karasyov, Konstantin A @ 2006-12-08 13:26 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Andrey Borzenkov, linux-acpi, Lebedev, Vladimir P

All,

Yes, the patch will not help, as I realize now - the same function is
called on reads from /proc/acpi/ac/.../state file, so the problem is
somewhere else. Sorry for bothering :)

Regards.
Konstantin.
>-----Original Message-----
>From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
>Sent: Thursday, December 07, 2006 10:48 PM
>To: Karasyov, Konstantin A
>Cc: Andrey Borzenkov; linux-acpi@vger.kernel.org; Lebedev, Vladimir P
>Subject: Re: 2.6.19: ACPI reports AC not present after resume from STD
>
>Hi,
>
>On Thursday, 7 December 2006 19:57, Karasyov, Konstantin A wrote:
>> Hi,
>>
>> Unfortunately, I cannot reproduce this bug on my system, but the
problem
>> could be solved by adding a resume handler for AC adapter device.
Could
>> you try the attached patch to see if it helps.
>
>I can reproduce it and the patch doesn't help.
>
>Greetings,
>Rafael
>
>
>> >-----Original Message-----
>> >From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
>> >owner@vger.kernel.org] On Behalf Of Andrey Borzenkov
>> >Sent: Sunday, December 03, 2006 7:01 PM
>> >To: Alexey Starikovskiy
>> >Cc: Pavel Machek; linux-acpi@vger.kernel.org;
>> linux-kernel@vger.kernel.org
>> >Subject: Re: 2.6.19: ACPI reports AC not present after resume from
STD
>> >
>> >-----BEGIN PGP SIGNED MESSAGE-----
>> >Hash: SHA1
>> >
>> >On Sunday 03 December 2006 17:35, Alexey Starikovskiy wrote:
>> >> Andrey Borzenkov wrote:
>> >> > -----BEGIN PGP SIGNED MESSAGE-----
>> >> > Hash: SHA1
>> >> >
>> >> > On Sunday 03 December 2006 16:11, Pavel Machek wrote:
>> >> >> Hi!
>> >> >>
>> >> >>> I started to notice it some time ago; I can't say exactly if
this
>> was
>> >> >>> not present in earlier versions because recently I switched
from
>> STR
>> >> >>> (which gave me no end of troubles) to STD. So I may have not
seen
>> it
>> >> >>> before.
>> >> >>>
>> >> >>> Suspend to disk while on battery. Plug in AC, resume. ACPI
>> continues
>> >to
>> >> >>> show AC adapter as not present:
>> >> >>>
>> >> >>> {pts/0}% cat /proc/acpi/ac_adapter/ADP1/state
>> >> >>> state:                   off-line
>> >> >>>
>> >> >>> replugging AC correctly changes state to on-line.
>> >> >>
>> >> >> try echo platform > /sys/power/disk.
>> >> >
>> >> > Nope.
>> >> >
>> >> > {pts/0}% pmsuspend disk
>> >> > ... after resume
>> >> > {pts/0}% cat /sys/power/disk
>> >> > platform
>> >> > {pts/0}% cat /proc/acpi/ac_adapter/ADP1/state
>> >> > state:                   off-line
>> >>
>> >> please look if patches in 7122 work  for you.
>> >
>> >No. I applied patches from comments 38 and 52 (modified, it did not
>> apply
>> >cleanly to 2.6.19). As far as I understood, those two were final.
>> >-----BEGIN PGP SIGNATURE-----
>> >Version: GnuPG v1.4.5 (GNU/Linux)
>> >
>> >iD8DBQFFcvS3R6LMutpd94wRAp9oAKCM7+6G4SsgFEGLgkW1jxM3VMQHqQCdFSDQ
>> >14w+QsgDtxWusmfdzCMOdqo=
>> >=QDyt
>> >-----END PGP SIGNATURE-----
>> >-
>> >To unsubscribe from this list: send the line "unsubscribe
linux-acpi"
>> in
>> >the body of a message to majordomo@vger.kernel.org
>> >More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
>--
>If you don't have the time to read,
>you don't have the time or the tools to write.
>		- Stephen King

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2007-05-19 18:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-03 12:25 2.6.19: ACPI reports AC not present after resume from STD Andrey Borzenkov
2006-12-03 13:11 ` Pavel Machek
2006-12-03 13:52   ` Andrey Borzenkov
2006-12-03 14:35     ` Alexey Starikovskiy
2006-12-03 16:00       ` Andrey Borzenkov
  -- strict thread matches above, loose matches on Subject: below --
2006-12-07 18:57 Karasyov, Konstantin A
2006-12-07 19:47 ` Rafael J. Wysocki
2006-12-07 19:48   ` Alexey Starikovskiy
2006-12-07 20:00     ` Rafael J. Wysocki
2006-12-07 20:40 Lebedev, Vladimir P
2006-12-16 17:38 ` Andrey Borzenkov
     [not found] ` <200702132116.05404.arvidjaar@mail.ru>
2007-02-24  9:55   ` Andrey Borzenkov
2007-02-24 19:46     ` Rafael J. Wysocki
2007-02-24 23:26       ` Andrey Borzenkov
2007-02-25 10:17         ` Rafael J. Wysocki
2007-02-25 10:37           ` Andrey Borzenkov
2007-02-25 10:51             ` Rafael J. Wysocki
2007-02-25 17:14               ` Andrey Borzenkov
2007-02-25 18:58                 ` Rafael J. Wysocki
2007-02-26 20:35                   ` Andrey Borzenkov
2007-02-26 21:23                     ` Rafael J. Wysocki
2007-03-05 22:07                 ` Rafael J. Wysocki
2007-03-08  7:51                   ` Andrey Borzenkov
2007-05-19 18:03                   ` Andrey Borzenkov
2006-12-08 13:26 Karasyov, Konstantin A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox