* appletouch quirk doesn't run at resume [not found] ` <45FBBDEA.9060708@m3y3r.de> @ 2007-03-18 0:42 ` Adrian Bunk 2007-03-18 18:45 ` Jiri Kosina 0 siblings, 1 reply; 10+ messages in thread From: Adrian Bunk @ 2007-03-18 0:42 UTC (permalink / raw) To: Thomas Meyer Cc: tglx, Rafael J. Wysocki, Linus Torvalds, Linux Kernel Mailing List, Andrew Morton, Soeren Sonnenburg, Sergey Vlasov, Jiri Kosina, linux-input On Sat, Mar 17, 2007 at 11:07:38AM +0100, Thomas Meyer wrote: > Thomas Gleixner schrieb: > > I finally found a dual core box, which survives suspend/resume without > > crashing in the middle of nowhere. Sigh, I never figured out from the > > code and the bug reports what's going on. > > > > The observed hangs are caused by a stale state transition of the clock > > event devices, which keeps the RCU synchronization away from completion, > > when the non boot CPU is brought back up. > > > > The suspend/resume in oneshot mode needs the similar care as the > > periodic mode during suspend to RAM. My assumption that the state > > transitions during the different shutdown/bringups of s2disk would go > > through the periodic boot phase and then switch over to highres resp. > > nohz mode were simply wrong. > > > > Add the appropriate suspend / resume handling for the non periodic > > modes. > > > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > > > > Excellent work. Now suspend to disk is working again. But: > > 1.) The quirk added in commit a417a21e10831bca695b4ba9c74f4ddf5a95ac06 > for the appletouch driver doesn't seem to work after resume. >... Not a regression, but still a bug. Appropriate people added to the Cc. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: appletouch quirk doesn't run at resume 2007-03-18 0:42 ` appletouch quirk doesn't run at resume Adrian Bunk @ 2007-03-18 18:45 ` Jiri Kosina 2007-03-18 19:01 ` Thomas Meyer 0 siblings, 1 reply; 10+ messages in thread From: Jiri Kosina @ 2007-03-18 18:45 UTC (permalink / raw) To: Thomas Meyer Cc: Linux Kernel Mailing List, Adrian Bunk, Andrew Morton, Soeren Sonnenburg, Sergey Vlasov, linux-input On Sun, 18 Mar 2007, Adrian Bunk wrote: > > 1.) The quirk added in commit a417a21e10831bca695b4ba9c74f4ddf5a95ac06 > > for the appletouch driver doesn't seem to work after resume. > Not a regression, but still a bug. Appropriate people added to the Cc. (trimmed CC a little bit) Thomas, could you please provide more information? Did it ever work for you after suspend/resume cycle and it just broke at some point in the past, or you are not sure whether it ever worked? Also, what exactly does it mean that it doesn't work? Are both the interfaces after resume bound to usbhid driver (you can check this in /sys)? When the quirk works correctly, only the keyboard interface should be bound to usbhid driver. Please check the binding both before and after suspend/resume cycle, and let me know. Thanks, -- Jiri Kosina ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: appletouch quirk doesn't run at resume 2007-03-18 18:45 ` Jiri Kosina @ 2007-03-18 19:01 ` Thomas Meyer 2007-03-18 19:22 ` Jiri Kosina 0 siblings, 1 reply; 10+ messages in thread From: Thomas Meyer @ 2007-03-18 19:01 UTC (permalink / raw) To: Jiri Kosina Cc: Linux Kernel Mailing List, Adrian Bunk, Andrew Morton, Soeren Sonnenburg, Sergey Vlasov, linux-input Jiri Kosina schrieb: > On Sun, 18 Mar 2007, Adrian Bunk wrote: > > > Thomas, could you please provide more information? Did it ever work for > you after suspend/resume cycle and it just broke at some point in the > past, or you are not sure whether it ever worked? > I'm not sure whether this ever worked. > Also, what exactly does it mean that it doesn't work? Are both the > interfaces after resume bound to usbhid driver (you can check this in > /sys)? When the quirk works correctly, only the keyboard interface should > be bound to usbhid driver. Please check the binding both before and after > suspend/resume cycle, and let me know. > Appletouch is bound to the device: T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 7 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=05ac ProdID=0218 Rev= 0.60 S: Manufacturer=Apple Computer S: Product=Apple Internal Keyboard / Trackpad C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr= 40mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=8ms I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=appletouch E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=8ms I:* If#= 2 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid E: Ad=84(I) Atr=03(Int.) MxPS= 1 Ivl=8ms But the X server touchpad driver doesn't work anymore, that means i can't emulte a right click by tapping with 3 fingers on the mouse pad. after restarting x the mouse driver works again. So i think this is maybe a problem in X? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: appletouch quirk doesn't run at resume 2007-03-18 19:01 ` Thomas Meyer @ 2007-03-18 19:22 ` Jiri Kosina 2007-03-27 21:02 ` Thomas Meyer 0 siblings, 1 reply; 10+ messages in thread From: Jiri Kosina @ 2007-03-18 19:22 UTC (permalink / raw) To: Thomas Meyer Cc: Linux Kernel Mailing List, Adrian Bunk, Andrew Morton, Soeren Sonnenburg, Sergey Vlasov, linux-input On Sun, 18 Mar 2007, Thomas Meyer wrote: > Appletouch is bound to the device: OK, so the quirk actually works fine ... > But the X server touchpad driver doesn't work anymore, that means i > can't emulte a right click by tapping with 3 fingers on the mouse pad. > after restarting x the mouse driver works again. So i think this is > maybe a problem in X? ... but there is something apparently wrong either with the appletouch driver or X. Could you test via evtest whether the events are properly generated by the kernel? If they do, I'd say it is almost certainly X bug. Thanks, -- Jiri Kosina ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: appletouch quirk doesn't run at resume 2007-03-18 19:22 ` Jiri Kosina @ 2007-03-27 21:02 ` Thomas Meyer 2007-03-28 12:26 ` Jiri Kosina 0 siblings, 1 reply; 10+ messages in thread From: Thomas Meyer @ 2007-03-27 21:02 UTC (permalink / raw) To: Jiri Kosina Cc: Linux Kernel Mailing List, Adrian Bunk, Soeren Sonnenburg, linux-input Jiri Kosina schrieb: > On Sun, 18 Mar 2007, Thomas Meyer wrote: > > >> Appletouch is bound to the device: >> > > OK, so the quirk actually works fine ... > Yes, it works fine, but... > >> But the X server touchpad driver doesn't work anymore, that means i >> can't emulte a right click by tapping with 3 fingers on the mouse pad. >> after restarting x the mouse driver works again. So i think this is >> maybe a problem in X? >> > > ... but there is something apparently wrong either with the appletouch > driver or X. Could you test via evtest whether the events are properly > generated by the kernel? If they do, I'd say it is almost certainly X bug. > It seems, that after the resume all usb devices gets removed and plug in again (virtually!). This results in a new input device name: before suspend and resume: appletouch Geyser 3 inited. input: appletouch as /class/input/input2 after resume: Restarting tasks ... <6>usb 1-2: USB disconnect, address 3 PM: Removing info for No Bus:usbdev1.3_ep83 PM: Removing info for usb:1-2:1.0 PM: Removing info for No Bus:usbdev1.3_ep81 input: appletouch disconnected [cut] PM: Adding info for No Bus:usbdev1.4_ep83 PM: Adding info for usb:1-2:1.1 appletouch Geyser 3 inited. input: appletouch as /class/input/input15 This change confuses the X synaptics driver: Touchpad no synaptics event device found (checked 11 nodes) Touchpad The /dev/input/event* device nodes seem to be missing (EE) xf86OpenSerial: Cannot open device /dev/input/event2 No such file or directory. (WW) Touchpad: cannot open input device And so X falls back to my second pointer device which is a UsbMouse under /dev/input/mice One could say that the synaptics driver rightly complains about the missing event2 device! So is this a bug in the X synaptics driver? Comments are welcome. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: appletouch quirk doesn't run at resume 2007-03-27 21:02 ` Thomas Meyer @ 2007-03-28 12:26 ` Jiri Kosina 2007-03-28 13:24 ` Dmitry Torokhov 0 siblings, 1 reply; 10+ messages in thread From: Jiri Kosina @ 2007-03-28 12:26 UTC (permalink / raw) To: Thomas Meyer Cc: Jiri Kosina, Linux Kernel Mailing List, Adrian Bunk, Soeren Sonnenburg, linux-input On Tue, 27 Mar 2007, Thomas Meyer wrote: > It seems, that after the resume all usb devices gets removed and plug in > again (virtually!). This results in a new input device name: Yes, this is what actually happens. JFYI see current thread on lkml which is a bit realted - http://lkml.org/lkml/2007/3/27/149 if interested. > This change confuses the X synaptics driver: > Touchpad no synaptics event device found (checked 11 nodes) > Touchpad The /dev/input/event* device nodes seem to be missing > (EE) xf86OpenSerial: Cannot open device /dev/input/event2 > No such file or directory. > (WW) Touchpad: cannot open input device > One could say that the synaptics driver rightly complains about the > missing event2 device! So is this a bug in the X synaptics driver? You can of course work this around by adding an udev rule such as SUBSYSTEM=="input",KERNEL=="event*",SYSFS{name}=="appletouch",SYMLINK+="input/appletouchpad" and the let Xorg use /dev/input/appletouchpad, which will always be a symlink to the correct device. -- Jiri Kosina ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: appletouch quirk doesn't run at resume 2007-03-28 12:26 ` Jiri Kosina @ 2007-03-28 13:24 ` Dmitry Torokhov 2007-03-28 16:51 ` Thomas Meyer 0 siblings, 1 reply; 10+ messages in thread From: Dmitry Torokhov @ 2007-03-28 13:24 UTC (permalink / raw) To: Jiri Kosina Cc: Thomas Meyer, Jiri Kosina, Linux Kernel Mailing List, Adrian Bunk, Soeren Sonnenburg, linux-input, Peter Osterlund On 3/28/07, Jiri Kosina <jikos@jikos.cz> wrote: > On Tue, 27 Mar 2007, Thomas Meyer wrote: > > > It seems, that after the resume all usb devices gets removed and plug in > > again (virtually!). This results in a new input device name: > > Yes, this is what actually happens. JFYI see current thread on lkml which > is a bit realted - http://lkml.org/lkml/2007/3/27/149 if interested. > > > This change confuses the X synaptics driver: > > Touchpad no synaptics event device found (checked 11 nodes) > > Touchpad The /dev/input/event* device nodes seem to be missing > > (EE) xf86OpenSerial: Cannot open device /dev/input/event2 > > No such file or directory. > > (WW) Touchpad: cannot open input device > > One could say that the synaptics driver rightly complains about the > > missing event2 device! So is this a bug in the X synaptics driver? > > You can of course work this around by adding an udev rule such as > > SUBSYSTEM=="input",KERNEL=="event*",SYSFS{name}=="appletouch",SYMLINK+="input/appletouchpad" > > and the let Xorg use /dev/input/appletouchpad, which will always be a > symlink to the correct device. > I am not sure if this would help... According to the excerpt from X log synaptics driver attempted to scan evdev devices and locate the touchpad. However if this scan happen before udev had a chance to process the event and create new /dev/input/eventX device node it will fail. I wonder if we should adjust the X driver to spin for a couple of seconds in EventAutoDevProbe if the touchpad was already seen once... Peter? -- Dmitry ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: appletouch quirk doesn't run at resume 2007-03-28 13:24 ` Dmitry Torokhov @ 2007-03-28 16:51 ` Thomas Meyer 2007-03-28 17:06 ` Jiri Kosina 0 siblings, 1 reply; 10+ messages in thread From: Thomas Meyer @ 2007-03-28 16:51 UTC (permalink / raw) To: Dmitry Torokhov Cc: Jiri Kosina, Jiri Kosina, Linux Kernel Mailing List, Adrian Bunk, Soeren Sonnenburg, linux-input, Peter Osterlund Dmitry Torokhov schrieb: > On 3/28/07, Jiri Kosina <jikos@jikos.cz> wrote: >> On Tue, 27 Mar 2007, Thomas Meyer wrote: >> >> > It seems, that after the resume all usb devices gets removed and >> plug in >> > again (virtually!). This results in a new input device name: >> >> Yes, this is what actually happens. JFYI see current thread on lkml >> which >> is a bit realted - http://lkml.org/lkml/2007/3/27/149 if interested. >> >> > This change confuses the X synaptics driver: >> > Touchpad no synaptics event device found (checked 11 nodes) >> > Touchpad The /dev/input/event* device nodes seem to be missing >> > (EE) xf86OpenSerial: Cannot open device /dev/input/event2 >> > No such file or directory. >> > (WW) Touchpad: cannot open input device >> > One could say that the synaptics driver rightly complains about the >> > missing event2 device! So is this a bug in the X synaptics driver? >> >> You can of course work this around by adding an udev rule such as >> >> SUBSYSTEM=="input",KERNEL=="event*",SYSFS{name}=="appletouch",SYMLINK+="input/appletouchpad" >> >> >> and the let Xorg use /dev/input/appletouchpad, which will always be a >> symlink to the correct device. >> This was my first idea, too. But then i found this entry in the Changelog of the synaptics driver: - In the DeviceOn() function, if opening the device node fails, try to auto-detect the correct event device again. This fixes some problems which occur after a suspend/resume cycle or after rmmod/insmod-ing the psmouse kernel driver. > > I am not sure if this would help... According to the excerpt from X > log synaptics driver attempted to scan evdev devices and locate the > touchpad. However if this scan happen before udev had a chance to > process the event and create new /dev/input/eventX device node it will > fail. Okay. This strengthens above statement. And udev is too slow to create the devices, while the driver already scanned the directory. > > I wonder if we should adjust the X driver to spin for a couple of > seconds in EventAutoDevProbe if the touchpad was already seen once... > Peter? > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: appletouch quirk doesn't run at resume 2007-03-28 16:51 ` Thomas Meyer @ 2007-03-28 17:06 ` Jiri Kosina 2007-03-28 17:35 ` Dmitry Torokhov 0 siblings, 1 reply; 10+ messages in thread From: Jiri Kosina @ 2007-03-28 17:06 UTC (permalink / raw) To: Thomas Meyer Cc: Dmitry Torokhov, Linux Kernel Mailing List, Soeren Sonnenburg, linux-input, Peter Osterlund On Wed, 28 Mar 2007, Thomas Meyer wrote: > > I am not sure if this would help... According to the excerpt from X > > log synaptics driver attempted to scan evdev devices and locate the > > touchpad. However if this scan happen before udev had a chance to > > process the event and create new /dev/input/eventX device node it will > > fail. > Okay. This strengthens above statement. And udev is too slow to create > the devices, while the driver already scanned the directory. > > I wonder if we should adjust the X driver to spin for a couple of > > seconds in EventAutoDevProbe if the touchpad was already seen once... > > Peter? Yes, it looks like this is the root cause. However I must admit that I don't like this behavior too much. We shouldn't rely on drivers individual userland to wait for a reasonable time before the udev settles down. This is not a nice API to provide. Will try to think of some solution which would have reasonable nastiness/functionality ratio. -- Jiri Kosina ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: appletouch quirk doesn't run at resume 2007-03-28 17:06 ` Jiri Kosina @ 2007-03-28 17:35 ` Dmitry Torokhov 0 siblings, 0 replies; 10+ messages in thread From: Dmitry Torokhov @ 2007-03-28 17:35 UTC (permalink / raw) To: Jiri Kosina Cc: Thomas Meyer, Linux Kernel Mailing List, Soeren Sonnenburg, linux-input, Peter Osterlund On 3/28/07, Jiri Kosina <jikos@jikos.cz> wrote: > On Wed, 28 Mar 2007, Thomas Meyer wrote: > > > > I am not sure if this would help... According to the excerpt from X > > > log synaptics driver attempted to scan evdev devices and locate the > > > touchpad. However if this scan happen before udev had a chance to > > > process the event and create new /dev/input/eventX device node it will > > > fail. > > Okay. This strengthens above statement. And udev is too slow to create > > the devices, while the driver already scanned the directory. > > > I wonder if we should adjust the X driver to spin for a couple of > > > seconds in EventAutoDevProbe if the touchpad was already seen once... > > > Peter? > > Yes, it looks like this is the root cause. > > However I must admit that I don't like this behavior too much. We > shouldn't rely on drivers individual userland to wait for a reasonable > time before the udev settles down. This is not a nice API to provide. Will > try to think of some solution which would have reasonable > nastiness/functionality ratio. > The proper fix would be teach X to recognize hotplug events. I've heard they are working on it. -- Dmitry ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-03-28 17:35 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <Pine.LNX.4.64.0703160925270.26106@woody.linux-foundation.org> [not found] ` <200703162134.14265.rjw@sisk.pl> [not found] ` <1174078066.13341.279.camel@localhost.localdomain> [not found] ` <1174087552.13341.332.camel@localhost.localdomain> [not found] ` <45FBBDEA.9060708@m3y3r.de> 2007-03-18 0:42 ` appletouch quirk doesn't run at resume Adrian Bunk 2007-03-18 18:45 ` Jiri Kosina 2007-03-18 19:01 ` Thomas Meyer 2007-03-18 19:22 ` Jiri Kosina 2007-03-27 21:02 ` Thomas Meyer 2007-03-28 12:26 ` Jiri Kosina 2007-03-28 13:24 ` Dmitry Torokhov 2007-03-28 16:51 ` Thomas Meyer 2007-03-28 17:06 ` Jiri Kosina 2007-03-28 17:35 ` Dmitry Torokhov
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).