linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc
@ 2008-09-22 20:29 Tino Keitel
  2008-09-22 20:46 ` Tino Keitel
  2008-09-22 21:09 ` Rafael J. Wysocki
  0 siblings, 2 replies; 9+ messages in thread
From: Tino Keitel @ 2008-09-22 20:29 UTC (permalink / raw)
  To: linux-kernel

Hi,

my Mac mini core duo used to wake up from suspend to RAM when a key or
mouse button is pressed. This doesn't work anymore with 2.6.27-rc, the
current version that I tried is 2.6.27-rc7. I checked /proc/acpi/wakeup
for differences, with 2.6.26 and 2.6.27-rc, but both were identical:

Device	S-state	  Status   Sysfs node
PXS1	  S4	 disabled  pci:0000:01:00.0
PXS2	  S4	 disabled  pci:0000:02:00.0
USB1	  S3	 disabled  pci:0000:00:1d.0
USB2	  S3	 disabled  pci:0000:00:1d.1
USB3	  S3	 disabled  pci:0000:00:1d.2
USB4	  S3	 disabled  pci:0000:00:1d.3
USB7	  S3	 enabled   pci:0000:00:1d.7

Wakeup with the power switch at the back still works.

Any hints if there are some commits that I should try to revert, before
I start bisecting?

Regards,
Tino

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

* Re: Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc
  2008-09-22 20:29 Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc Tino Keitel
@ 2008-09-22 20:46 ` Tino Keitel
  2008-09-22 21:09 ` Rafael J. Wysocki
  1 sibling, 0 replies; 9+ messages in thread
From: Tino Keitel @ 2008-09-22 20:46 UTC (permalink / raw)
  To: linux-kernel

On Mon, Sep 22, 2008 at 22:29:11 +0200, Tino Keitel wrote:
> Hi,
> 
> my Mac mini core duo used to wake up from suspend to RAM when a key or
> mouse button is pressed. This doesn't work anymore with 2.6.27-rc, the

Forgot to mention: both devices are USB devices.

Regards,
Tino

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

* Re: Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc
  2008-09-22 20:29 Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc Tino Keitel
  2008-09-22 20:46 ` Tino Keitel
@ 2008-09-22 21:09 ` Rafael J. Wysocki
  2008-09-22 21:18   ` Tino Keitel
  1 sibling, 1 reply; 9+ messages in thread
From: Rafael J. Wysocki @ 2008-09-22 21:09 UTC (permalink / raw)
  To: Tino Keitel; +Cc: linux-kernel

On Monday, 22 of September 2008, Tino Keitel wrote:
> Hi,

Hi,

> my Mac mini core duo used to wake up from suspend to RAM when a key or
> mouse button is pressed. This doesn't work anymore with 2.6.27-rc, the
> current version that I tried is 2.6.27-rc7. I checked /proc/acpi/wakeup
> for differences, with 2.6.26 and 2.6.27-rc, but both were identical:

Did you test that with any 2.6.27-rc before -rc7?

> Device	S-state	  Status   Sysfs node
> PXS1	  S4	 disabled  pci:0000:01:00.0
> PXS2	  S4	 disabled  pci:0000:02:00.0
> USB1	  S3	 disabled  pci:0000:00:1d.0
> USB2	  S3	 disabled  pci:0000:00:1d.1
> USB3	  S3	 disabled  pci:0000:00:1d.2
> USB4	  S3	 disabled  pci:0000:00:1d.3
> USB7	  S3	 enabled   pci:0000:00:1d.7
> 
> Wakeup with the power switch at the back still works.
> 
> Any hints if there are some commits that I should try to revert, before
> I start bisecting?

I don't think you need to revert anything. :-)

Please check if the /sys/devices/.../power/wakeup file contains 'enabled' for
the USB controller pci:0000:00:1d.7 (I assume this is the one the keyboard &
mouse are attached to).  If it doesn't, please try to write 'enabled' to this
file and retest.

Thanks,
Rafael

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

* Re: Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc
  2008-09-22 21:09 ` Rafael J. Wysocki
@ 2008-09-22 21:18   ` Tino Keitel
  2008-09-25 22:35     ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Tino Keitel @ 2008-09-22 21:18 UTC (permalink / raw)
  To: linux-kernel

On Mon, Sep 22, 2008 at 23:09:34 +0200, Rafael J. Wysocki wrote:
> On Monday, 22 of September 2008, Tino Keitel wrote:
> > Hi,
> 
> Hi,
> 
> > my Mac mini core duo used to wake up from suspend to RAM when a key or
> > mouse button is pressed. This doesn't work anymore with 2.6.27-rc, the
> > current version that I tried is 2.6.27-rc7. I checked /proc/acpi/wakeup
> > for differences, with 2.6.26 and 2.6.27-rc, but both were identical:
> 
> Did you test that with any 2.6.27-rc before -rc7?

Only -rc6 IIRC.

> > Any hints if there are some commits that I should try to revert, before
> > I start bisecting?
> 
> I don't think you need to revert anything. :-)
> 
> Please check if the /sys/devices/.../power/wakeup file contains 'enabled' for
> the USB controller pci:0000:00:1d.7 (I assume this is the one the keyboard &
> mouse are attached to).  If it doesn't, please try to write 'enabled' to this
> file and retest.

Yes, this works. Thanks.

Regards,
Tino

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

* Re: Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc
  2008-09-22 21:18   ` Tino Keitel
@ 2008-09-25 22:35     ` Rafael J. Wysocki
  2008-09-29 21:19       ` Tino Keitel
  0 siblings, 1 reply; 9+ messages in thread
From: Rafael J. Wysocki @ 2008-09-25 22:35 UTC (permalink / raw)
  To: Tino Keitel; +Cc: linux-kernel

On Monday, 22 of September 2008, Tino Keitel wrote:
> On Mon, Sep 22, 2008 at 23:09:34 +0200, Rafael J. Wysocki wrote:
> > On Monday, 22 of September 2008, Tino Keitel wrote:
> > > Hi,
> > 
> > Hi,
> > 
> > > my Mac mini core duo used to wake up from suspend to RAM when a key or
> > > mouse button is pressed. This doesn't work anymore with 2.6.27-rc, the
> > > current version that I tried is 2.6.27-rc7. I checked /proc/acpi/wakeup
> > > for differences, with 2.6.26 and 2.6.27-rc, but both were identical:
> > 
> > Did you test that with any 2.6.27-rc before -rc7?
> 
> Only -rc6 IIRC.
> 
> > > Any hints if there are some commits that I should try to revert, before
> > > I start bisecting?
> > 
> > I don't think you need to revert anything. :-)
> > 
> > Please check if the /sys/devices/.../power/wakeup file contains 'enabled' for
> > the USB controller pci:0000:00:1d.7 (I assume this is the one the keyboard &
> > mouse are attached to).  If it doesn't, please try to write 'enabled' to this
> > file and retest.
> 
> Yes, this works. Thanks.

This actually is a regression for which I'm sorry.

Can you please check if the appended patch restores the previous behavior?

Thanks,
Rafael

---
From: Rafael J. Wysocki <rjw@sisk.pl>

ACPI: Make /proc/acpi/wakeup interface handle PCI devices

Make the ACPI /proc/acpi/wakeup interface set the appropriate
wake-up bits of physical devices corresponding to the ACPI
devices and make those bits be set initially for devices that are
enabled to wake up by default.  This is needed to restore the
previous behavior for the PCI devices that were previously handled
correctly with the help of the /proc/acpi/wakeup interface.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/acpi/glue.c       |    5 ++++-
 drivers/acpi/sleep/proc.c |   10 ++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/sleep/proc.c
===================================================================
--- linux-2.6.orig/drivers/acpi/sleep/proc.c
+++ linux-2.6/drivers/acpi/sleep/proc.c
@@ -377,6 +377,14 @@ acpi_system_wakeup_device_seq_show(struc
 	return 0;
 }
 
+static void physical_device_enable_wakeup(struct acpi_device *adev)
+{
+	struct device *dev = acpi_get_physical_device(adev->handle);
+
+	if (dev && device_can_wakeup(dev))
+		device_set_wakeup_enable(dev, adev->wakeup.state.enabled);
+}
+
 static ssize_t
 acpi_system_write_wakeup_device(struct file *file,
 				const char __user * buffer,
@@ -411,6 +419,7 @@ acpi_system_write_wakeup_device(struct f
 		}
 	}
 	if (found_dev) {
+		physical_device_enable_wakeup(found_dev);
 		list_for_each_safe(node, next, &acpi_wakeup_device_list) {
 			struct acpi_device *dev = container_of(node,
 							       struct
@@ -428,6 +437,7 @@ acpi_system_write_wakeup_device(struct f
 				       dev->pnp.bus_id, found_dev->pnp.bus_id);
 				dev->wakeup.state.enabled =
 				    found_dev->wakeup.state.enabled;
+				physical_device_enable_wakeup(dev);
 			}
 		}
 	}
Index: linux-2.6/drivers/acpi/glue.c
===================================================================
--- linux-2.6.orig/drivers/acpi/glue.c
+++ linux-2.6/drivers/acpi/glue.c
@@ -165,8 +165,11 @@ static int acpi_bind_one(struct device *
 				"firmware_node");
 		ret = sysfs_create_link(&acpi_dev->dev.kobj, &dev->kobj,
 				"physical_node");
-		if (acpi_dev->wakeup.flags.valid)
+		if (acpi_dev->wakeup.flags.valid) {
 			device_set_wakeup_capable(dev, true);
+			device_set_wakeup_enable(dev,
+						acpi_dev->wakeup.state.enabled);
+		}
 	}
 
 	return 0;

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

* Re: Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc
  2008-09-25 22:35     ` Rafael J. Wysocki
@ 2008-09-29 21:19       ` Tino Keitel
  2008-09-29 21:58         ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Tino Keitel @ 2008-09-29 21:19 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel

On Fri, Sep 26, 2008 at 00:35:08 +0200, Rafael J. Wysocki wrote:

[...]

> Can you please check if the appended patch restores the previous behavior?

Yes, with this patch wakeup using the keyboard works as it did with
2.6.26.

Thanks and regards,
Tino

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

* Re: Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc
  2008-09-29 21:19       ` Tino Keitel
@ 2008-09-29 21:58         ` Rafael J. Wysocki
  2008-09-30 19:53           ` Tino Keitel
  0 siblings, 1 reply; 9+ messages in thread
From: Rafael J. Wysocki @ 2008-09-29 21:58 UTC (permalink / raw)
  To: Tino Keitel; +Cc: linux-kernel

On Monday, 29 of September 2008, Tino Keitel wrote:
> On Fri, Sep 26, 2008 at 00:35:08 +0200, Rafael J. Wysocki wrote:
> 
> [...]
> 
> > Can you please check if the appended patch restores the previous behavior?
> 
> Yes, with this patch wakeup using the keyboard works as it did with
> 2.6.26.

Thanks for testing.

Can you also check if this patch is sufficient to fix the sky2 issue, or if you
need the patch I sent in the sky2 thread in addition to it?

Thanks,
Rafael

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

* Re: Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc
  2008-09-29 21:58         ` Rafael J. Wysocki
@ 2008-09-30 19:53           ` Tino Keitel
  2008-09-30 20:09             ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Tino Keitel @ 2008-09-30 19:53 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel

On Mon, Sep 29, 2008 at 23:58:32 +0200, Rafael J. Wysocki wrote:
> On Monday, 29 of September 2008, Tino Keitel wrote:
> > On Fri, Sep 26, 2008 at 00:35:08 +0200, Rafael J. Wysocki wrote:
> > 
> > [...]
> > 
> > > Can you please check if the appended patch restores the previous behavior?
> > 
> > Yes, with this patch wakeup using the keyboard works as it did with
> > 2.6.26.
> 
> Thanks for testing.
> 
> Can you also check if this patch is sufficient to fix the sky2 issue, or if you
> need the patch I sent in the sky2 thread in addition to it?

With this patch only, WOL is still broken. The machine doesn't wake up
and the power/wakeup entry for the sky2 device stays at "disabled"
after I enable WOL. With the WOL patch, power/wakeup changed to
"enabled" after "ethtool -s eth0 wol g".

Regards,
Tino

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

* Re: Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc
  2008-09-30 19:53           ` Tino Keitel
@ 2008-09-30 20:09             ` Rafael J. Wysocki
  0 siblings, 0 replies; 9+ messages in thread
From: Rafael J. Wysocki @ 2008-09-30 20:09 UTC (permalink / raw)
  To: Tino Keitel; +Cc: linux-kernel

On Tuesday, 30 of September 2008, Tino Keitel wrote:
> On Mon, Sep 29, 2008 at 23:58:32 +0200, Rafael J. Wysocki wrote:
> > On Monday, 29 of September 2008, Tino Keitel wrote:
> > > On Fri, Sep 26, 2008 at 00:35:08 +0200, Rafael J. Wysocki wrote:
> > > 
> > > [...]
> > > 
> > > > Can you please check if the appended patch restores the previous behavior?
> > > 
> > > Yes, with this patch wakeup using the keyboard works as it did with
> > > 2.6.26.
> > 
> > Thanks for testing.
> > 
> > Can you also check if this patch is sufficient to fix the sky2 issue, or if you
> > need the patch I sent in the sky2 thread in addition to it?
> 
> With this patch only, WOL is still broken. The machine doesn't wake up
> and the power/wakeup entry for the sky2 device stays at "disabled"
> after I enable WOL. With the WOL patch, power/wakeup changed to
> "enabled" after "ethtool -s eth0 wol g".

OK, thanks for testing.

I'm going to submit the sky2 patch for merging too.

Thanks,
Rafael

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

end of thread, other threads:[~2008-09-30 20:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-22 20:29 Wakeup from suspend via keyboard and mouse doesn't work anymore with 2.6.27-rc Tino Keitel
2008-09-22 20:46 ` Tino Keitel
2008-09-22 21:09 ` Rafael J. Wysocki
2008-09-22 21:18   ` Tino Keitel
2008-09-25 22:35     ` Rafael J. Wysocki
2008-09-29 21:19       ` Tino Keitel
2008-09-29 21:58         ` Rafael J. Wysocki
2008-09-30 19:53           ` Tino Keitel
2008-09-30 20:09             ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).