On Tue, 6 Jul 2010, Maxim Levitsky wrote: > Ok, it seems that recent changes really did made /proc/acpi/wakeup > unnecessary. > > > Let me explain from beginning the current situation: > > 1. Indeed if I enable manually wakeup on both usb controller, wakeup > works. > > usb controller = /sys/devices/pci0000:00/0000:00:1a.0/power/wakeup > usb device = /sys/devices/pci0000:00/0000:00:1a.0/usb2/2-2/power/wakeup > > UDEV rule to set wakeup on usb controller works: > > SUBSYSTEM=="pci", DRIVER=="uhci_hcd", ATTR{power/wakeup}="enabled" > SUBSYSTEM=="pci", DRIVER=="ehci_hcd", ATTR{power/wakeup}="enabled" > > > UDEV rule to set wakeup on device itself just doesn't work, even though > udev executes it: > > ACTION=="add", ENV{DEVTYPE}=="usb_device", ATTR{power/wakeup}="enabled" > > I did try to add my usb id for mouse like you did. It of course doesn't > help. > > I also found that above rule, *sometimes* works, but very rarely, so > indeed something else sets it. I strongly suspect its kernel. Why not edit drivers/base/power/sysfs.c:wake_store()? Add something like this: dev_info(dev, "Process %s wrote: %s\n", current->comm, buf); Then you'll know for certain what userspace is doing to the wakeup attribute. If it turns out that userspace isn't disabling the mouse's setting then the kernel must be responsible, so you can track down the problem by bisecting. > I also think that I shouldn't need to set wakeup to enabled on usb > controller. This should be done automaticly as soon as I set 'enabled' > on usb device. No. They are two different wakeup settings for two different devices. Indeed, suppose you had both a USB mouse and a USB keyboard attached to the same controller, and suppose you wanted the keyboard to be a wakeup device but not the mouse. Then should disabling wakeup for the mouse also disable wakeup for the controller? Should the wakeup setting for the controller always follow the last setting that was changed on any device beneath it? That does not seem like a robust approach. Alan Stern _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm