Wheel emulation doesn't work after suspend/resume

Bug #289023 reported by puntium
52
This bug affects 10 people
Affects Status Importance Assigned to Milestone
xinput (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have a thinkpad X60.

I turn on wheel emulation for the built-in trackpoint using the following xinput commands:

xinput set-int-prop $DEVICEID "Wheel Emulation" 8 1
xinput set-int-prop $DEVICEID "Wheel Emulation Button" 8 2

When I do this, wheel emulation starts working fine. However, if i suspend to RAM and resume, wheel emulation stops working, even if i reissue the above commands.

xev shows that the button 2 even is still getting through, but scrolling doesn't work in any of the apps.

Revision history for this message
Nathan Collins (ntc2) wrote :

I've experienced the same thing on an X60s.

When I suspend and resume while attached to the "ultra base" docking station the middle mouse button returns to default behavior (paste), and if reissue the xinput commands it makes it so middle click no longer pastes if held down for a while (presumably for "Wheel Emulation Timeout"), like when wheel emulation scrolling works, except no scrolling happens.

When I suspend and resume while not attached to the docking station, middle mouse button is reset to default behavior, but reissuing the xinput commands does make scrolling work again in this case.

Revision history for this message
Nathan Collins (ntc2) wrote :

Oops, looks like its it's more complicated than that: I just tried a second suspend and resume while not attached to the docking station and this time reissuing the commands has the same effect as I described for suspending and resuming while attached to the docking station :P

Revision history for this message
whtvr (whtvr) wrote :

Hi,

I have a similar problem on my X200s. I only got trackpoint scrolling after issuing the following commands:

xinput set-int-prop "TPPS/2 IBM TrackPoint" "Wheel Emulation" 8 1
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Wheel Emulation Button" 8 2

but I noticed that after suspending or hibernating scrolling doesn't work anymore. I also noticed that up until one of the recent updates I could make scrolling work again after resuming from suspend/hibernate by issuing the above commands. Strangely enough that only worked every second resume so when the laptop resumed from suspend I had to put it back to sleep, than wake it up again, re-run these commands and only then it worked.

But that weird workaround stopped working after one of the recent updates in last week or so

Revision history for this message
Nathan Collins (ntc2) wrote :

Just tried again with a new setup, after seeing whtvr's post, and got seemingly unpredictable behavior. My setup is now x60s attached to an ultrabase with external monitor and external usb ibm keyboard. The usb keyboard also has a trackpoint and three mouse keys, just like the x60s keyboard (this thing: http://www-307.ibm.com/pc/support/site.wss/MIGR-4WKSWX.html). I'm using fdi to configure both on intrepid.

$ cat /etc/hal/fdi/policy/laptop-keyboard-mouse-wheel.fdi
<match key="info.product" string="TPPS/2 IBM TrackPoint">
 <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
 <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
 <!--
 <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
 <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
 -->
 <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match>

$ cat /etc/hal/fdi/policy/usb-keyboard-mouse-wheel.fdi
<match key="info.product" string="Chicony USB Trackpoint pointing device">
 <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
 <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
 <!--
 <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
 <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
 -->
 <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match>

Here's what happened (when I say a keyboard "works" I mean typing and wheel mouse emulation).

1. Booted computer with lid/screen closed, using power button on the ultra base. The usb keyboard works.

2. Suspend and resume. Now the usb keyboard doesn't work at all. Unplug and replug it and it's back to normal. I now open the lid and try the laptop keyboard and trackpoint. Everything works.

3. Suspend and resume. Laptop keyboard works but usb keyboard doesn't work at all like in 2. Unplug and replug fixes it and everything works.

4. Now I unplug the usb keyboard and suspend and resume. The laptop keyboard now supports typing and moving the mouse, but when I hold down the middle button and move the trackpoint the pointer stays still and nothing happens, as described in my first post in december. I plug the usb keyboard back and it works, but laptop keyboard is unaffected.

5. Suspend and resume. Everything works.

6. Suspend and resume. Everything works.

7. Unplug usb keyboard and suspend and resume. Laptop keyboard works. Plug in usb keyboard. There is a long delay (5+ seconds) with no response, but then it works, and laptop keyboard still works.

Because of the long delay in 7 I wonder if the usb keyboard always works after suspend resume, but sometimes there is just a long delay?

Revision history for this message
Lesmana Zimmer (lesmana) wrote :

i too am affected by this bug. i have a thinkpad x40. i made fdi files similar to comment #4. for me this bug doesn't happen at every suspend/resume, it happends about once in five suspen/resume cycles.

there is a workaround and maybe also fix for this problem in thinkwiki: http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint

here the text from thinkwiki
----
Scrolling may be disabled after a resume from suspend.

You can manually reactivate the trackpoint by reloading the psmouse module as root:

    # rmmod psmouse && modprobe psmouse

You can automatically force the pm-utils to reload this module. Create a file /etc/pm/config.d/01reload_mouse as root with the following content:

# reload psmouse to reactivate trackpoint scrolling
SUSPEND_MODULES="${SUSPEND_MODULES:+$SUSPEND_MODULES }psmouse"

Revision history for this message
Anmar Oueja (anmar) wrote :

Given how many people use thinkpads, I am surprised this is not getting more attention. What can we do to escalate the importance of this bug?

Revision history for this message
Nathan Collins (ntc2) wrote :

Anmar,

Using the setup described in http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint#xorg.conf.d on Lucid I no longer have this problem.

Revision history for this message
Helge Willum Thingvad (helgesdk) wrote :

This bug is still present in Lucid.
Reloading the psmouse module doesn't fix the scrolling problem.
I have created the manual configuration file referred to by enoksrd #7 (and restarted X), which works, but that doesn't justify the fact that settings made in gpointing-device-settings sometimes stop working after suspend/resume.

I don't know how gponting-device-settings does it's magic, but apparently it isn't working 100% of the time.

Revision history for this message
hydroo (hydroo) wrote :

For me the middle mouse button of my external thinkpad keyboard stops working after suspend.

After a few attempts it seems that it's only if the keyboard to my thinkpad dock pro. Directly connected to the notebook it seems to work.

xinput list-props is the same before and after suspend to RAM.

Revision history for this message
hydroo (hydroo) wrote :

It works if I unplug and plug in the keyboard again.

Revision history for this message
hydroo (hydroo) wrote :

Perhaps this is an xinput bug?

affects: ubuntu → xinput (Ubuntu)
Revision history for this message
hydroo (hydroo) wrote :

(I can't edit a comment :( )
I use Ubuntu 16.04 and xinput 1.6.2-1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.