* thinkpad x60s: middle button doesn't work after hibernate
@ 2006-07-20 19:27 George Nychis
2006-07-20 19:46 ` Dmitry Torokhov
2006-07-21 19:45 ` Tino Keitel
0 siblings, 2 replies; 8+ messages in thread
From: George Nychis @ 2006-07-20 19:27 UTC (permalink / raw)
To: lkml
Hey guys,
I recently got the suspend to disk working and suspend to memory working
thanks to many of you. Whenever I suspend to disk and resume, the
middle mouse button on my thinkpad x60s no longer works for scrolling or
for pasting. I either have to reboot, or suspend to memory and resume.
Therefore:
Initial Boot: working
Suspend to disk -> resume: not working
Suspend to memory -> resume: working
To fix it for now, i simply suspend to memory and resume after resuming
a suspend to disk.
Anyone else experience this?
Thanks!
George
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: thinkpad x60s: middle button doesn't work after hibernate
2006-07-20 19:27 thinkpad x60s: middle button doesn't work after hibernate George Nychis
@ 2006-07-20 19:46 ` Dmitry Torokhov
2006-07-21 14:53 ` George Nychis
2006-07-21 19:45 ` Tino Keitel
1 sibling, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2006-07-20 19:46 UTC (permalink / raw)
To: George Nychis; +Cc: lkml
On 7/20/06, George Nychis <gnychis@cmu.edu> wrote:
> Hey guys,
>
> I recently got the suspend to disk working and suspend to memory working
> thanks to many of you. Whenever I suspend to disk and resume, the
> middle mouse button on my thinkpad x60s no longer works for scrolling or
> for pasting. I either have to reboot, or suspend to memory and resume.
> Therefore:
>
> Initial Boot: working
> Suspend to disk -> resume: not working
> Suspend to memory -> resume: working
>
> To fix it for now, i simply suspend to memory and resume after resuming
> a suspend to disk.
>
It sounds like psmouse resume method either not getting called or
fails during resume from disk. Could you do:
echo 1 > /sys/modules/i8042/parameters/debug
before suspending and send me dmesg after resuming. Make sure you have
big dmesg buffer.
Thanks!
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: thinkpad x60s: middle button doesn't work after hibernate
2006-07-20 19:46 ` Dmitry Torokhov
@ 2006-07-21 14:53 ` George Nychis
2006-07-21 15:45 ` Dmitry Torokhov
2006-07-21 17:00 ` Dmitry Torokhov
0 siblings, 2 replies; 8+ messages in thread
From: George Nychis @ 2006-07-21 14:53 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: lkml
Dmitry Torokhov wrote:
> On 7/20/06, George Nychis <gnychis@cmu.edu> wrote:
>> Hey guys,
>>
>> I recently got the suspend to disk working and suspend to memory working
>> thanks to many of you. Whenever I suspend to disk and resume, the
>> middle mouse button on my thinkpad x60s no longer works for scrolling or
>> for pasting. I either have to reboot, or suspend to memory and resume.
>> Therefore:
>>
>> Initial Boot: working
>> Suspend to disk -> resume: not working
>> Suspend to memory -> resume: working
>>
>> To fix it for now, i simply suspend to memory and resume after resuming
>> a suspend to disk.
>>
>
> It sounds like psmouse resume method either not getting called or
> fails during resume from disk. Could you do:
>
> echo 1 > /sys/modules/i8042/parameters/debug
>
> before suspending and send me dmesg after resuming. Make sure you have
> big dmesg buffer.
>
> Thanks!
>
Here it is:
http://rafb.net/paste/results/hDJXzS85.html
thanks again :)
- George
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: thinkpad x60s: middle button doesn't work after hibernate
2006-07-21 14:53 ` George Nychis
@ 2006-07-21 15:45 ` Dmitry Torokhov
2006-07-21 17:00 ` Dmitry Torokhov
1 sibling, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2006-07-21 15:45 UTC (permalink / raw)
To: George Nychis; +Cc: lkml
On 7/21/06, George Nychis <gnychis@cmu.edu> wrote:
>
>
> Dmitry Torokhov wrote:
> > On 7/20/06, George Nychis <gnychis@cmu.edu> wrote:
> >> Hey guys,
> >>
> >> I recently got the suspend to disk working and suspend to memory working
> >> thanks to many of you. Whenever I suspend to disk and resume, the
> >> middle mouse button on my thinkpad x60s no longer works for scrolling or
> >> for pasting. I either have to reboot, or suspend to memory and resume.
> >> Therefore:
> >>
> >> Initial Boot: working
> >> Suspend to disk -> resume: not working
> >> Suspend to memory -> resume: working
> >>
> >> To fix it for now, i simply suspend to memory and resume after resuming
> >> a suspend to disk.
> >>
> >
> > It sounds like psmouse resume method either not getting called or
> > fails during resume from disk. Could you do:
> >
> > echo 1 > /sys/modules/i8042/parameters/debug
> >
> > before suspending and send me dmesg after resuming. Make sure you have
> > big dmesg buffer.
> >
> > Thanks!
> >
>
> Here it is:
> http://rafb.net/paste/results/hDJXzS85.html
>
Hmm, resume routine gets called but the controller seems to be
confused. It stopped reporting 1 in bit 3 of byte 0 in addition to not
reporting middle button. Does it allow you pasting if you
boot/suspend/resume with "psmouse.proto=exps" (assuming that psmouse
is built in)? If so then trackpoint portion of psmouse driver needs to
be looked at.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: thinkpad x60s: middle button doesn't work after hibernate
2006-07-21 14:53 ` George Nychis
2006-07-21 15:45 ` Dmitry Torokhov
@ 2006-07-21 17:00 ` Dmitry Torokhov
2006-07-21 17:16 ` George Nychis
1 sibling, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2006-07-21 17:00 UTC (permalink / raw)
To: George Nychis; +Cc: lkml
On Friday 21 July 2006 10:53, George Nychis wrote:
>
> Dmitry Torokhov wrote:
> > On 7/20/06, George Nychis <gnychis@cmu.edu> wrote:
> >> Hey guys,
> >>
> >> I recently got the suspend to disk working and suspend to memory working
> >> thanks to many of you. Whenever I suspend to disk and resume, the
> >> middle mouse button on my thinkpad x60s no longer works for scrolling or
> >> for pasting. I either have to reboot, or suspend to memory and resume.
> >> Therefore:
> >>
> >> Initial Boot: working
> >> Suspend to disk -> resume: not working
> >> Suspend to memory -> resume: working
> >>
> >> To fix it for now, i simply suspend to memory and resume after resuming
> >> a suspend to disk.
> >>
> >
> > It sounds like psmouse resume method either not getting called or
> > fails during resume from disk. Could you do:
> >
> > echo 1 > /sys/modules/i8042/parameters/debug
> >
> > before suspending and send me dmesg after resuming. Make sure you have
> > big dmesg buffer.
> >
> > Thanks!
> >
>
> Here it is:
> http://rafb.net/paste/results/hDJXzS85.html
>
> thanks again :)
>
Please try the patch below. If it still does not work try uncommenting call
to psmouse_reset() in trackpoint_resume().
--
Dmitry
Input: trackpoint - activate protocol when resuming
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/mouse/trackpoint.c | 54 ++++++++++++++++++++++++++-------------
1 file changed, 36 insertions(+), 18 deletions(-)
Index: linux/drivers/input/mouse/trackpoint.c
===================================================================
--- linux.orig/drivers/input/mouse/trackpoint.c
+++ linux/drivers/input/mouse/trackpoint.c
@@ -183,21 +183,26 @@ static struct attribute_group trackpoint
.attrs = trackpoint_attrs,
};
-static void trackpoint_disconnect(struct psmouse *psmouse)
+static int trackpoint_start_protocol(struct psmouse *psmouse, unsigned char *firmware_id)
{
- sysfs_remove_group(&psmouse->ps2dev.serio->dev.kobj, &trackpoint_attr_group);
+ unsigned char param[2] = { 0 };
- kfree(psmouse->private);
- psmouse->private = NULL;
+ if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID)))
+ return -1;
+
+ if (param[0] != TP_MAGIC_IDENT)
+ return -1;
+
+ if (firmware_id)
+ *firmware_id = param[1];
+
+ return 0;
}
static int trackpoint_sync(struct psmouse *psmouse)
{
- unsigned char toggle;
struct trackpoint_data *tp = psmouse->private;
-
- if (!tp)
- return -1;
+ unsigned char toggle;
/* Disable features that may make device unusable with this driver */
trackpoint_read(&psmouse->ps2dev, TP_TOGGLE_TWOHAND, &toggle);
@@ -263,27 +268,40 @@ static void trackpoint_defaults(struct t
tp->ext_dev = TP_DEF_EXT_DEV;
}
+static void trackpoint_disconnect(struct psmouse *psmouse)
+{
+ sysfs_remove_group(&psmouse->ps2dev.serio->dev.kobj, &trackpoint_attr_group);
+
+ kfree(psmouse->private);
+ psmouse->private = NULL;
+}
+
+static int trackpoint_reconnect(struct psmouse *psmouse)
+{
+ /* psmouse_reset(psmouse); */
+
+ if (trackpoint_start_protocol(psmouse, NULL))
+ return -1;
+
+ if (trackpoint_sync(psmouse))
+ return -1;
+
+ return 0;
+}
+
int trackpoint_detect(struct psmouse *psmouse, int set_properties)
{
struct trackpoint_data *priv;
struct ps2dev *ps2dev = &psmouse->ps2dev;
unsigned char firmware_id;
unsigned char button_info;
- unsigned char param[2];
-
- param[0] = param[1] = 0;
- if (ps2_command(ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID)))
- return -1;
-
- if (param[0] != TP_MAGIC_IDENT)
+ if (trackpoint_start_protocol(psmouse, &firmware_id))
return -1;
if (!set_properties)
return 0;
- firmware_id = param[1];
-
if (trackpoint_read(&psmouse->ps2dev, TP_EXT_BTN, &button_info)) {
printk(KERN_WARNING "trackpoint.c: failed to get extended button data\n");
button_info = 0;
@@ -296,7 +314,7 @@ int trackpoint_detect(struct psmouse *ps
psmouse->vendor = "IBM";
psmouse->name = "TrackPoint";
- psmouse->reconnect = trackpoint_sync;
+ psmouse->reconnect = trackpoint_reconnect;
psmouse->disconnect = trackpoint_disconnect;
trackpoint_defaults(priv);
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: thinkpad x60s: middle button doesn't work after hibernate
2006-07-21 17:00 ` Dmitry Torokhov
@ 2006-07-21 17:16 ` George Nychis
2006-07-21 17:59 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: George Nychis @ 2006-07-21 17:16 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: lkml
Dmitry Torokhov wrote:
> On Friday 21 July 2006 10:53, George Nychis wrote:
>> Dmitry Torokhov wrote:
>>> On 7/20/06, George Nychis <gnychis@cmu.edu> wrote:
>>>> Hey guys,
>>>>
>>>> I recently got the suspend to disk working and suspend to memory working
>>>> thanks to many of you. Whenever I suspend to disk and resume, the
>>>> middle mouse button on my thinkpad x60s no longer works for scrolling or
>>>> for pasting. I either have to reboot, or suspend to memory and resume.
>>>> Therefore:
>>>>
>>>> Initial Boot: working
>>>> Suspend to disk -> resume: not working
>>>> Suspend to memory -> resume: working
>>>>
>>>> To fix it for now, i simply suspend to memory and resume after resuming
>>>> a suspend to disk.
>>>>
>>> It sounds like psmouse resume method either not getting called or
>>> fails during resume from disk. Could you do:
>>>
>>> echo 1 > /sys/modules/i8042/parameters/debug
>>>
>>> before suspending and send me dmesg after resuming. Make sure you have
>>> big dmesg buffer.
>>>
>>> Thanks!
>>>
>> Here it is:
>> http://rafb.net/paste/results/hDJXzS85.html
>>
>> thanks again :)
>>
>
> Please try the patch below. If it still does not work try uncommenting call
> to psmouse_reset() in trackpoint_resume().
>
The unmodified patch worked like a charm, thanks so much for your time.
work, and help Dmitry
- George
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: thinkpad x60s: middle button doesn't work after hibernate
2006-07-21 17:16 ` George Nychis
@ 2006-07-21 17:59 ` Dmitry Torokhov
0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2006-07-21 17:59 UTC (permalink / raw)
To: George Nychis; +Cc: lkml
On 7/21/06, George Nychis <gnychis@cmu.edu> wrote:
>
> The unmodified patch worked like a charm, thanks so much for your time.
> work, and help Dmitry
>
Thank you for testing, I will queue it for the mainline.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: thinkpad x60s: middle button doesn't work after hibernate
2006-07-20 19:27 thinkpad x60s: middle button doesn't work after hibernate George Nychis
2006-07-20 19:46 ` Dmitry Torokhov
@ 2006-07-21 19:45 ` Tino Keitel
1 sibling, 0 replies; 8+ messages in thread
From: Tino Keitel @ 2006-07-21 19:45 UTC (permalink / raw)
To: lkml
On Thu, Jul 20, 2006 at 15:27:13 -0400, George Nychis wrote:
> Hey guys,
>
> I recently got the suspend to disk working and suspend to memory working
> thanks to many of you. Whenever I suspend to disk and resume, the
> middle mouse button on my thinkpad x60s no longer works for scrolling or
I observed the same on my T23.
> for pasting. I either have to reboot, or suspend to memory and resume.
> Therefore:
>
> Initial Boot: working
> Suspend to disk -> resume: not working
> Suspend to memory -> resume: working
Thanks, that really works. I never tried to suspend to RAM after
hibernation.
>
> To fix it for now, i simply suspend to memory and resume after resuming
> a suspend to disk.
Unfortunately, I need a framebuffer console for the suspend2 progress
display (text mode progress display didn't work), and savagefb has
issues with hibernation, and vesafb is garbled after suspend to RAM.
>
> Anyone else experience this?
Me.
Regards,
Tino
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-07-22 6:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-20 19:27 thinkpad x60s: middle button doesn't work after hibernate George Nychis
2006-07-20 19:46 ` Dmitry Torokhov
2006-07-21 14:53 ` George Nychis
2006-07-21 15:45 ` Dmitry Torokhov
2006-07-21 17:00 ` Dmitry Torokhov
2006-07-21 17:16 ` George Nychis
2006-07-21 17:59 ` Dmitry Torokhov
2006-07-21 19:45 ` Tino Keitel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox