scrollwheel emulation breaks after suspend with 2.6.27-7

Bug #282387 reported by Chris Jones
176
This bug affects 20 people
Affects Status Importance Assigned to Milestone
xserver-xorg-input-evdev
Fix Released
Medium
xserver-xorg-input-evdev (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Intrepid by Evan Jeffrey

Bug Description

Binary package hint: xserver-xorg-input-evdev

ii xserver-xorg-input-evdev 1:2.0.99+git20080912-0ubuntu3 X.Org X server -- evdev input driver
ii linux-image-2.6.27-7-generic 2.6.27-7.10 Linux kernel image for version 2.6.27 on x86/x86_64

after updating to 2.6.27-7 scrollwheel emulation on the trackpoint in my Thinkpad X300 no longer works.
I enable it thus:

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

It works at first, but not after suspending. xinput(1) shows the emulation is still enabled and it behaves as if it should be (the middle mouse button respects the wheel emulation timeout setting and while I'm holding it down, the mouse pointer doesn't move), but scroll events don't seem to be making it to applications.

Works fine in 2.6.27-6, but I don't see anything obvious in the kernel changelogs that relates to this.

Revision history for this message
Chris Jones (cmsj) wrote :

Despite this report holding true across multiple test suspend cycles over the weekend, opening my laptop this morning and setting the xinput properties has left me with working scroll.
Bit of a head scratcher, frankly.

Revision history for this message
In , Chris Jones (cmsj) wrote :

I am running Ubuntu Intrepid

Linux kodachi 2.6.27-7-generic #1 SMP Fri Oct 10 03:55:24 UTC 2008 i686 GNU/Linux

ii xserver-xorg 1:7.4~2ubuntu7 the X.Org X server
ii xserver-xorg-core 2:1.5.1-1ubuntu3 Xorg X server - core server
ii xserver-xorg-input-evdev 1:2.0.99+git20080912-0ubuntu3 X.Org X server -- evdev input driver

I configure scrollwheel emulation with:

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

after a suspend/resume cycle, xinput reports that the emulation setting is still enabled and the mouse behaves as if it is working, but it doesn't actually send scroll events.

Also reported at: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/282387

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

I fixed that today, can you please fetch from git and try again?

Revision history for this message
In , Chris Jones (cmsj) wrote :

Peter: thanks for the swift response! I don't suppose that comes down to a single commit does it? It would be by far easiest for me to test if I could quickly apply a patch to the package I have and rebuild it.
If not then nevermind, I'll grab the whole thing and build it :)

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

b0737bdbd1f6e601eb4984b6f4cb49279190984ca should have been it.

It'd be great if you could test git tip too though.

Revision history for this message
In , Chris Jones (cmsj) wrote :

Created an attachment (id=19651)
disables ABI checking for xinput

Revision history for this message
In , Chris Jones (cmsj) wrote :

I'm not exactly sure if I'm doing the right things in testing this, but if I am, I don't think it's working.

I did:

git clone git://anongit.freedesktop.org/xorg/driver/xf86-input-evdev
git branch --track evdev-2.1-branch origin/evdev-2.1-branch
git checkout evdev-2.1-branch
applied ubuntu's ABI skipping patch (attached)
./autogen.sh --prefix=/usr
make
sudo make install

restarted X

I now see more xinput properties:

Device 'TPPS/2 IBM TrackPoint':
 Device Enabled: 1
 Evdev Axis Inversion: 0, 0
 Evdev Reopen Attempts: 10
 Evdev Middle Button Emulation: 0
 Evdev Middle Button Timeout: 50
 Evdev Wheel Emulation: 0
 Evdev Wheel Emulation Axes: 0, 0, 4, 5
 Evdev Wheel Emulation Inertia: 10
 Evdev Wheel Emulation Timeout: 200
 Evdev Wheel Emulation Button: 0
 Evdev Drag Lock Buttons: 0
 Wheel Emulation: 1
 Wheel Emulation Button: 2
 Wheel Emulation Y Axis: 4, 5

(not the default values, I played a little)

I see Wheel Emulation and Evdev Wheel Emulation, but enable either/both doesn't stop button 2 (middle) behaving purely as paste.

Revision history for this message
Chris Jones (cmsj) wrote :

After further suspend cycles it seems that it doesn't work more often than it does work, to the extent that the previous comment seems to have been an isolated incident

Changed in evdev:
status: Unknown → Confirmed
Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

> Evdev Wheel Emulation: 0
> Evdev Wheel Emulation Button: 0

> Wheel Emulation: 1
> Wheel Emulation Button: 2
> Wheel Emulation Y Axis: 4, 5

you created new properties with your command. the property names are all prefixed with "Evdev ". Try again with the right property name (or the number, that'll work too)

Revision history for this message
In , Chris Jones (cmsj) wrote :

Sorry, I did try setting those too, but it doesn't seem to help...

Fresh start:

  Evdev Wheel Emulation: 0
  Evdev Wheel Emulation Axes: 0, 0, 4, 5
  Evdev Wheel Emulation Inertia: 10
  Evdev Wheel Emulation Timeout: 200
  Evdev Wheel Emulation Button: 4

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

  Evdev Wheel Emulation: 1
  Evdev Wheel Emulation Axes: 0, 0, 4, 5
  Evdev Wheel Emulation Inertia: 10
  Evdev Wheel Emulation Timeout: 200
  Evdev Wheel Emulation Button: 2

Middle button still acts as a pure middle button.

Revision history for this message
In , Chris Jones (cmsj) wrote :

Created an attachment (id=19654)
Xorg log

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

wait, does it work at all? or just not after resume?

Revision history for this message
In , Chris Jones (cmsj) wrote :

With the version currently shipping in Ubuntu Intrepid it works at first, but then stops after a suspend.

I've not been able to get the git version to work at all, but I should probably do a full reboot to be sure.

Changed in evdev:
status: Confirmed → In Progress
Revision history for this message
Gerd Feiner (cerb) wrote :

i am also experiencing the same issue on a thinkpad x60s. scrollwheel emulation works fine after reboot and breaks after suspend. unlike chris, it never came back after suspend.

regards,
gerd

Revision history for this message
Gerd Feiner (cerb) wrote :

latest update a few minutes ago didn't solve the problem either.

i am now on 2.6.27-7-generic

regards,
gerd

Revision history for this message
paweloque (paweloque) wrote :

Is it possible that the device name is differs on different machines? I've a new Lenovo X301 and I don't even have the "TPPS/2 IBM TrackPoint" device. The only device that looks similar is the "DualPoint Stick", but executing the xinput with this name doesn't event make the scrolling work before a suspend.

Revision history for this message
Chris Jones (cmsj) wrote :

The device name does change, but actually based on the BIOS setup. It's called TPPS/2 IBM Trackpoint on mine because I disable the touchpad in the BIOS.

Reboot and do "xinput list" to find the device, then "xinput list-props" to get the properties of that device.
(You need to reboot because if you set properties that don't exist, they are created and ignored by the driver, so rebooting gets you a clean slate).

Revision history for this message
kelvie (kelvie) wrote :

I just came back from a hibernate and the trackpoint stopped working on my x60t as well:

/etc/acpi/resume.d $ xinput list-props 6
Device 'TPPS/2 IBM TrackPoint':
        Device Enabled: 1
        Middle Button Emulation: 1
        Middle Button Timeout: 50
        Wheel Emulation Inertia: 10
        Wheel Emulation: 1
        Wheel Emulation X Axis: 6, 7
        Wheel Emulation Y Axis: 4, 5
        Wheel Emulation Timeout: 200
        Wheel Emulation Button: 2
        Drag Lock Buttons: 0

I am also using 2.6.27-7-generic.

Revision history for this message
kelvie (kelvie) wrote :

And by trackpoint in my above comment, I was just referring to the scrolling.

Revision history for this message
Gerd Feiner (cerb) wrote :

maybe this should be visible as intrepid bug?

Revision history for this message
kelvie (kelvie) wrote :

I don't seem to see this problem anymore as of yesterday's updates.

Revision history for this message
kelvie (kelvie) wrote :

Hmm, never mind. It still seems to happen. I must have inadvertently restarted X last time.

Revision history for this message
Jack Lecou (jackl) wrote :

I'm also experiencing this problem: scroll emulation set with xinput works initially, but stops working after a suspend/resume. Same versions as above.

I'll add that it also stops working after a mere VT switch (which may be the real cause, since suspend/resume seems to do a VT switch implicitly).

Trying to turn it back on with xinput seems to partly work: button 2 presses stop being emitted and the cursor freezes while button 2 is down, but no button 4/5 events are emitted. (And, occasionally, re-running xinput WILL work after suspend/resume.)

Revision history for this message
Matthew Weier O'Phinney (mweierophinney) wrote :

I can verify the same mis-behavior on a Lenovo T61. I've defined a mouse-wheel.fdi for HAL, and on boot, all works as expected. However, after resuming from suspend or hibernate, scroll functionality no longer works.

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

I have the same problem, however, I can switch to another user and there scroll-wheel emulation works.

Revision history for this message
In , Niklas Vanhainen (niklas-vanhainen) wrote :

I had this same problem on Ubuntu 8.10. I just tried the latest git version and it did indeed fix the problem as far as I can tell. I'm going on about a dozen suspend-resume cycles and still no problems.

Revision history for this message
In , Niklas Vanhainen (niklas-vanhainen) wrote :

I had a peculiar problem once I installed the git version. Every time I hit Ctrl-C, the X-server would crash, and every time I hit Alt-F4, it would switch to a terminal.
I don't know if this is related but I thought I'd better let you know. The problem was resolved by reinstalling the Ubuntu version of evdev, which is from git on 2008-09-12.

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

I have this problem as well (Thinkpad X61 Tablet). It works when you switch to another user because that starts a new instance of X.
This applies to pretty much all Thinkpads, and they are quite popular among Linux users, so it would be nice if this could be fixed prior to the release.

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

The problem appears to have been fixed upstream. I installed the latest copy from the git repository, and have tried suspending and resuming over a dozen times and it's still working.

Revision history for this message
In , Niklas Vanhainen (niklas-vanhainen) wrote :

Ok, so I used the b0737bdbd1f6e601eb4984b6f4cb49279190984c commit to patch the Ubuntu version, and it solved the scrolling problem I had with the Ubuntu version as well as the crashing problem I had with HEAD, but it appears that another bug was introduced. After a VT-switch I cannot drag things with the mouse, for instance drag a window or copy with the mouse.
I'm guessing thats what draglock that was mentioned in the commit is for?

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

So I tried various upstream versions back and forth. The bug was supposed to have been fixed in the b0737bdbd1f6e601eb4984b6f4cb49279190984c commit, however that commit appeared to introduce another bug. I tried the commit before that, 5f2c8a2dcdf98b39997ee5e7c9a9ace3b640bfa3, and for some reason that one works perfectly, so far at least. I had some problems with HEAD, which included X crashing when Ctrl-C was pressed.
So I haven't been able to pinpoint exactly where this problem was fixed, and as such can't post a diff for that. I will continue investigating the problem when I have the time.

Anyone who wants to fix the problem now can follow these instructions:
sudo apt-get install build-essential git-core
sudo apt-get source xserver-xorg-input-evdev # You can delete the stuff it downloads to your working directory, this is only to get all the build dependencies
git clone git://git.freedesktop.org/git/xorg/driver/xf86-input-evdev
cd xf86-input-evdev
git reset --hard 5f2c8a2dcdf98b39997ee5e7c9a9ace3b640bfa3
./autogen --prefix=/usr
make
sudo make install

Now restart X and it should work properly. (at least it did for me)
If it doesn't work, first try rebooting, and if it still doesn't work, reinstall the Ubuntu version with
sudo apt-get -s install --reinstall xserver-xorg-input-evdev

Unfortunately I don't know how to make a deb out of this.

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

Oops that should be sudo apt-get install --reinstall xserver-xorg-input-evdev for reinstalling the ubuntu version.

Revision history for this message
Jack Lecou (jackl) wrote :

5f2c8a2dcdf98b39997ee5e7c9a9ace3b640bfa3 seems to be working well for me so far. Thanks Niklas.

(NB: I did have to manually install a couple extra xorg related -dev packages to compile it.)

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

Hm yeah I suppose the apt-get source should be apt-get build-dep xserver-xorg-input-evdev, sorry about that.

Changed in xserver-xorg-input-evdev:
status: New → Confirmed
Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

On Sat, Oct 25, 2008 at 08:30:15AM -0700, <email address hidden> wrote:
> Ok, so I used the b0737bdbd1f6e601eb4984b6f4cb49279190984c commit to patch the
> Ubuntu version, and it solved the scrolling problem I had with the Ubuntu
> version as well as the crashing problem I had with HEAD, but it appears that
> another bug was introduced. After a VT-switch I cannot drag things with the
> mouse, for instance drag a window or copy with the mouse.
> I'm guessing thats what draglock that was mentioned in the commit is for?

no. draglock is a feature for those who can't hold a button down while
dragging. shouldn't affect standard mouse operation at all.
the problem is caused because the wakeup handlers didn't register again. Please
try the patch below, fixes the problem for me.

commit ea13733382f85dec6cadfb631831cfa6ed4bc69a
Author: Peter Hutterer <email address hidden>
Date: Mon Oct 27 15:54:49 2008 +1030

    emuMB: add EvdevMBEmuOn and call from EvdevOn to register wakeup handlers.

    This got broken in b0737bdbd1f6e601eb4984b6f4cb49279190984c, when the
    EmuMBPreInit call was removed from EvdevOn. As a result, VT switching away and
    back wouldn't restore the wakeup handlers and mouse button presses
    disappeared.

diff --git a/src/emuMB.c b/src/emuMB.c
index 4af0791..e5a767a 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -317,6 +317,11 @@ EvdevMBEmuPreInit(InputInfoPtr pInfo)

     pEvdev->emulateMB.timeout = xf86SetIntOption(pInfo->options,
                                                  "Emulate3Timeout", 50);
+}
+
+void
+EvdevMBEmuOn(InputInfoPtr pInfo)
+{
     RegisterBlockAndWakeupHandlers (EvdevMBEmuBlockHandler,
                                     EvdevMBEmuWakeupHandler,
                                     (pointer)pInfo);
diff --git a/src/evdev.c b/src/evdev.c
index d112efe..26ae0a1 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1008,6 +1008,7 @@ EvdevOn(DeviceIntPtr device)
     } else
     {
         xf86AddEnabledDevice(pInfo);
+ EvdevMBEmuOn(pInfo);
         pEvdev->flags |= EVDEV_INITIALIZED;
         device->public.on = TRUE;
     }
diff --git a/src/evdev.h b/src/evdev.h
index c2f614a..7e1da15 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -127,6 +127,7 @@ BOOL EvdevMBEmuFilterEvent(InputInfoPtr, int, BOOL);
 void EvdevMBEmuWakeupHandler(pointer, int, pointer);
 void EvdevMBEmuBlockHandler(pointer, struct timeval**, pointer);
 void EvdevMBEmuPreInit(InputInfoPtr);
+void EvdevMBEmuOn(InputInfoPtr);
 void EvdevMBEmuFinalize(InputInfoPtr);
 void EvdevMBEmuEnable(InputInfoPtr, BOOL);

Revision history for this message
In , Niklas Vanhainen (niklas-vanhainen) wrote :

Great thanks, that works perfectly.

Changed in evdev:
status: In Progress → Fix Released
Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :
Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :
Revision history for this message
Chris Jones (cmsj) wrote :

Niklas: Is that the only patch required to the current Intrepid version, or is that a diff against current git?
(If the former I hope we can get this pushed through as an SRU, if the latter then it'd have to be a backport at best, I think)

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

Chris: Those are the commits that fix this problem, nothing else, so it's not a new version or anything.

Oh and the commits are b0737bdbd1f6e601eb4984b6f4cb49279190984c and af096e8c5d8b425f725a37bf4a98e205e70716e9

Revision history for this message
Chris Jones (cmsj) wrote :

I'm a little confused, those patches don't seem to apply cleanly to the package in intrepid?

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

Weird, it worked for me and I've been using it for a week now, but when I tried it on another computer it didn't apply.
I patched it manually and made a diff, so here it is. See if this works for you.
This is diffed against xserver-xorg-input-evdev_2.0.99+git20080912-0ubuntu5 and contains the code of both of the above diffs. I patched with patch -p1 < preinit.diff, configured, compiled and installed flawlessly.

Revision history for this message
aliencam (cameronk) wrote :

I did not apply the patches, but I would like to comment that it happens to me every other time I go into suspend... (For example, I turn on the laptop and middlemouse scroll works, then I suspend and resume and it does not, then after another suspend/resume it does work again.)

I am using intrepid ubuntu x86_64 and a thinkpad x61t

Revision history for this message
Marion Smith (msmith-extremeprogrammers) wrote :

Would someone who understands all of this please post a NEW summary of instructions on how to fix this? I have read through it but I am not sure what exactly I need to do to fix this problem.

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

I applied Niklas Vanhainen's patch to xserver-xorg-input-evdev_2.0.99+git20080912-0ubuntu5
but it doesn't fix the problem.
Now scrollwheel emulation works only in Up direction before and after suspend/hibernate.

Revision history for this message
Matthew Weier O'Phinney (mweierophinney) wrote :

With current xserver and kernels (as of 3 Nov 2008), I'm no longer experiencing this issue on a lenovo T61; everything works as expected.

Revision history for this message
Gerd Feiner (cerb) wrote :

can you please post the exact versions you use? for me, with current updates as of today, it still doesn't work. i have a thinkpad x60s.

the problem still shows as when it started: scrollwheel emulation works after reboot or restart of X and stops working after VT switching or suspend/hibernate.

Revision history for this message
Gerd Feiner (cerb) wrote :
Download full text (3.4 KiB)

i also tried applying those mentioned patches now. but it fails when trying to get the source for xserver-xorg-input-evdev?!

# sudo apt-get source xserver-xorg-input-evdev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to find a source package for xserver-xorg-input-evdev

i did all the prerequisites mentioned:

# sudo apt-get install build-essential git-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  g++ g++-4.3 libdigest-sha1-perl liberror-perl libstdc++6-4.3-dev
Suggested packages:
  g++-multilib g++-4.3-multilib gcc-4.3-doc libstdc++6-4.3-dbg git-doc
  git-arch git-cvs git-svn git-email git-daemon-run git-gui gitk gitweb
  libstdc++6-4.3-doc
The following NEW packages will be installed:
  build-essential g++ g++-4.3 git-core libdigest-sha1-perl liberror-perl
  libstdc++6-4.3-dev
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 8701kB of archives.
After this operation, 26.2MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://archive.ubuntu.com intrepid/main libstdc++6-4.3-dev 4.3.2-1ubuntu11 [1354kB]
Get:2 http://archive.ubuntu.com intrepid/main g++-4.3 4.3.2-1ubuntu11 [4128kB]
Get:3 http://archive.ubuntu.com intrepid/main g++ 4:4.3.1-1ubuntu2 [1444B]
Get:4 http://archive.ubuntu.com intrepid/main build-essential 11.4 [7172B]
Get:5 http://archive.ubuntu.com intrepid/main liberror-perl 0.17-1 [23.8kB]
Get:6 http://archive.ubuntu.com intrepid/main libdigest-sha1-perl 2.11-2build2 [25.4kB]
Get:7 http://archive.ubuntu.com intrepid/main git-core 1:1.5.6.3-1.1ubuntu2 [3162kB]
Fetched 8701kB in 7s (1163kB/s)
Selecting previously deselected package libstdc++6-4.3-dev.
(Reading database ... 148295 files and directories currently installed.)
Unpacking libstdc++6-4.3-dev (from .../libstdc++6-4.3-dev_4.3.2-1ubuntu11_i386.deb) ...
Selecting previously deselected package g++-4.3.
Unpacking g++-4.3 (from .../g++-4.3_4.3.2-1ubuntu11_i386.deb) ...
Selecting previously deselected package g++.
Unpacking g++ (from .../g++_4%3a4.3.1-1ubuntu2_i386.deb) ...
Selecting previously deselected package build-essential.
Unpacking build-essential (from .../build-essential_11.4_i386.deb) ...
Selecting previously deselected package liberror-perl.
Unpacking liberror-perl (from .../liberror-perl_0.17-1_all.deb) ...
Selecting previously deselected package libdigest-sha1-perl.
Unpacking libdigest-sha1-perl (from .../libdigest-sha1-perl_2.11-2build2_i386.deb) ...
Selecting previously deselected package git-core.
Unpacking git-core (from .../git-core_1%3a1.5.6.3-1.1ubuntu2_i386.deb) ...
Processing triggers for man-db ...
Setting up liberror-perl (0.17-1) ...
Setting up libdigest-sha1-perl (2.11-2build2) ...
Setting up git-core (1:1.5.6.3-1.1ubuntu2) ...
Setting up g++-4.3 (4.3.2-1ubuntu11) ...
Setting up libstdc++6-4.3-dev (4.3.2-1ubuntu11) ...
Setting up g++ (4:4.3.1-1ubuntu2) ...

Setting up build-essential (11.4) ...
#

when searching for the xserver-x...

Read more...

Revision history for this message
Gerd Feiner (cerb) wrote :

restarting of X seems to leviate the problem and restores scrollwheel emulation - but it is a bit against the thought of suspending/hibernating as you loose your current session and open programs.

and by restarting X i mean you can either kill it with crtl-alt-backspace or just log out and then in again.

Revision history for this message
Chris Jones (cmsj) wrote :

Niklas: thanks for re-rolling the patch, that one applied fine and I'm testing it now. It's already survived one suspend/resume cycle. I'll report back later as to how it's going.

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote : Re: [Bug 282387] Re: scrollwheel emulation breaks after suspend with 2.6.27-7

Ok, just to make this clear for those attempting to apply this patch,
follow these instructions, the instructions I gave above was for
getting a version from git where this problem doesn't exist.

sudo apt-get build-dep xserver-xorg-input-evdev
apt-get source xserver-xorg-input-evdev
cd xserver-xorg-input-evdev-2.0.99+git20080912
patch -p1 < /path/to/preinit.diff
./autogen --prefix=/usr
make
sudo make install

Restart the X server.

Post results here along with the problem you were experiencing before
the patch and any eventual problems after the patch.

Revision history for this message
Wouter Deconinck (wdconinc) wrote :

The solution in comment #36 above works for me (one comment: ./autogen should be ./autogen.sh).

Before: scroll wheel emulation works before suspend, but broken after suspend.
After: scroll wheel emulation still works after returning from suspend.

Thanks for the patch!

Revision history for this message
Adi (adolf-selinger) wrote :

Hi,
autogen.sh quits with the following error:
./configure: line 11656: syntax error near unexpected token `XINPUT,'
./configure: line 11656: `XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)'

btw: i cannot install build-dep. There is no such package. Did I miss something?
Thanx!

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

Now works for me too!

I was building a deb package with pdebuild and found out that
debian/patches/100_dont_check_abi.patch + Niklas' patch caused scrollwheel emulation to only work in Up direction.

If I disable this patch and use Niklas Vanhainen' patch I get a deb package that fixes this problem.

Thanks.

Revision history for this message
Chris Jones (cmsj) wrote :

Aurimas: I don't see that, and you'll need the abi check patch for xinput properties to work at all, so disabling that doesn't seem like a great idea (and certainly wouldn't be acceptable to the X team, I suspect!)

I've attached an i386 deb with the patch included. It would be great if we could get plenty of testing on this patch for potential SRUing

Revision history for this message
Aurimas Fišeras (aurimas-gmail) wrote :

Chris Jones:
tried your package and with it installed scrollwheel emulation works only in Up direction.

Maybe something is wrong with my scrollwheel emulation configuration?
<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.ZAxsisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
 <merge key="input.x11_options.EmulateWheelTimeout" type="string">150</merge>
</match>

Or I simply mess up something while building the package.

Revision history for this message
Chris Jones (cmsj) wrote :

Hi

Aurimas Fischer wrote:
> <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>

It could be your spelling of "Axis" there :)

fwiw I set this stuff from a script in my home directory which I
configured the GNOME Session preferences to launch when I log in.
All it does is run these commands:

xinput set-int-prop DEVICE "Wheel Emulation" 8 1
xinput set-int-prop DEVICE "Wheel Emulation Button" 8 2
xinput set-int-prop DEVICE "Wheel Emulation Y Axis" 8 4 5

where "DEVICE" is "TPPS/2 IBM TrackPoint"

Cheers,
--
Chris Jones
  <email address hidden>
   www.canonical.com

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

I'm experiencing the same problems as Aurimas Fischer with the don't
check abi patch enabled (including Chris's deb). It does work if I set
it up with xinput, but not with the HAL configuration. This patch is
all about initialization of the device and I assume xinput does its
thing after initialization. I tried including the Y Axis (and other
axises) parameters in the HAL config, unsuccessfully. I will
investigate and report back here.

Revision history for this message
Marion Smith (msmith-extremeprogrammers) wrote :

I get the following error right off the bat:

marion@Adama:~$ sudo apt-get build-dep xserver-xorg-input-evdev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to find a source package for xserver-xorg-input-evdev
marion@Adama:~$

Revision history for this message
tsurge (mastasurge) wrote :

I applied the patch and it worked for the scroll, but now I cant click and hold my left button... meaning I cant highlight anything! Anyone know what I did wrong? T61

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

tsurge: I assume you applied the first of two git patches? Try the
package Chris built.

On Thu, Nov 6, 2008 at 7:21 PM, tsurge <email address hidden> wrote:
> I applied the patch and it worked for the scroll, but now I cant click
> and hold my left button... meaning I cant highlight anything! Anyone
> know what I did wrong? T61
>
> --
> scrollwheel emulation breaks after suspend with 2.6.27-7
> https://bugs.launchpad.net/bugs/282387
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

Marion: You probably don't have the source repository enabled...

On Thu, Nov 6, 2008 at 9:51 PM, Niklas Vanhainen
<email address hidden> wrote:
> tsurge: I assume you applied the first of two git patches? Try the
> package Chris built.
>
> On Thu, Nov 6, 2008 at 7:21 PM, tsurge <email address hidden> wrote:
>> I applied the patch and it worked for the scroll, but now I cant click
>> and hold my left button... meaning I cant highlight anything! Anyone
>> know what I did wrong? T61
>>
>> --
>> scrollwheel emulation breaks after suspend with 2.6.27-7
>> https://bugs.launchpad.net/bugs/282387
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>>
>

Revision history for this message
Marion Smith (msmith-extremeprogrammers) wrote :

Ok. I enabled the source repository and successfully installed the patch. I seem to be working great now. Thank you all for your help. I love Ubuntu!

Revision history for this message
Bob Peterson (bob-peterson) wrote :

Nicklas: I installed your patch, which fixed the scrolling after suspend issue. However, I am now experiencing the problem of not being able to click and hold my left mouse button (e.g. highlight, drag selection box). I applied the second of your diffs after I found this problem, but it didn't help. I also can't install Chris's package, since it's for the i386 architecture (I'm running 64-bit).

Revision history for this message
tsurge (mastasurge) wrote :

Same problem for myself as well. I have 64 bit ubuntu and so I cannot load Chris' patch.

Revision history for this message
David Klann (dxklann) wrote :

Not to "beat a dead horse", but the patch (preinit.diff) and process described by Niklas Vanhainen on 2008-11-03 worked (exactly as described) for me on:

Lenovo ThinkPad T61 (type 6465-CTO)
uname -a: "Linux <hostname> 2.6.27-8-server #1 SMP Thu Nov 6 18:18:16 UTC 2008 x86_64 GNU/Linux"

dpkg -l xserver-xorg\* | fgrep ii | head -n 5
ii xserver-xorg 1:7.4~5ubuntu3 the X.Org X server
ii xserver-xorg-core 2:1.5.2-2ubuntu3 Xorg X server - core server
ii xserver-xorg-dev 2:1.5.2-2ubuntu3 Xorg X server - development files
ii xserver-xorg-input-all 1:7.4~5ubuntu3 the X.Org X server -- input driver metapacka
ii xserver-xorg-input-evdev 1:2.0.99+git20080912-0ubuntu6 X.Org X server -- evdev input driver

Thanks for all the help!

 -David Klann

Revision history for this message
Robert Persson (ireneshusband) wrote :

My experience of this bug is different. For instance, just now my middle-button scrolling started working again for no apparent reason. I had been reading email in Thunderbird on one virtual desktop with scrolling disabled. Then I switched to Firefox on another virtual desktop and realised that I was able to scroll properly again. In other words this is happening independently of suspend or resume events. I don't yet know if this also works the other way (i.e.scrolling become suddenly disabled without apparent cause).

Revision history for this message
Chris Jones (cmsj) wrote :

Robert: that sounds like a different bug, especially if you have a real middle button and are not using scrollwheel emulation settings. This bug is about xinput settings being lost on resume.

Revision history for this message
Tomasz Nowakowski (crazyrat) wrote :

I have applied patch which was mention in comment #36 by Niklas Vanhainen. I have to say that the problem with scolling went gone, but new problem arrived. Left mouse button dragging stops working. I cannot select block of text or drug windows pointing it's title bar. Left mouse button click and double click works fine.
I have ThinkPad T61p and Ubuntu 8.10 x64 with kernel 2.6.27-7-generic.

Revision history for this message
Tomasz Nowakowski (crazyrat) wrote :

I have applied also patch from comment #23 and all works perfect now. What I mean is that track point scroll and left mouse dragging works after waking up from suspend. I've tried several times put my computer into S3 mode and wake, and all seems to be working fine.
For the record I'll write all the scriptology that have been applied. I have to install some additional packages (autoconf, libltd7, libtool).

patch1: http://launchpadlibrarian.net/19254960/preinit.diff
patch2: http://launchpadlibrarian.net/18944380/restorewakeup.diff

sudo apt-get build-dep xserver-xorg-input-evdev
apt-get source xserver-xorg-input-evdev
cd xserver-xorg-input-evdev-2.0.99+git20080912
patch -p1 < /path/to/patch1/preinit.diff
patch -p1 < /path/to/patch2/restorewakeup.diff
./autogen.sh --prefix=/usr
make
sudo make install

I hope this will help somebody.

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

Tomi: use the preinit.diff from comment #27 instead of 22 and 23, it
incorporates both and should apply cleanly, unlike 22 and 23.

On Mon, Nov 17, 2008 at 7:06 PM, Tomi <email address hidden> wrote:
> I have applied also patch from comment #23 and all works perfect now. What I mean is that track point scroll and left mouse dragging works after waking up from suspend. I've tried several times put my computer into S3 mode and wake, and all seems to be working fine.
> For the record I'll write all the scriptology that have been applied. I have to install some additional packages (autoconf, libltd7, libtool).
>
> patch1: http://launchpadlibrarian.net/19254960/preinit.diff
> patch2: http://launchpadlibrarian.net/18944380/restorewakeup.diff
>
> sudo apt-get build-dep xserver-xorg-input-evdev
> apt-get source xserver-xorg-input-evdev
> cd xserver-xorg-input-evdev-2.0.99+git20080912
> patch -p1 < /path/to/patch1/preinit.diff
> patch -p1 < /path/to/patch2/restorewakeup.diff
> ./autogen.sh --prefix=/usr
> make
> sudo make install
>
> I hope this will help somebody.
>
> --
> scrollwheel emulation breaks after suspend with 2.6.27-7
> https://bugs.launchpad.net/bugs/282387
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Tomasz Nowakowski (crazyrat) wrote :

You right Niklas. Funny thing that in my comment above (#56) I use link to a proper version of preinit.diff.

Revision history for this message
Sammy Spets (sammys) wrote :
Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote :

Sammy: There is still the problem with the dont_check_abi patch
causing some problems with the HAL configuration when combined with
this patch, it only works properly using xinput commands. Did you try
patching with dont_check_abi?
I haven't had time to see if this can be fixed somehow. If you would
like to help out, try applying the dont_check_abi patch (i believe
it's in debian/patches of the source tree) to the latest copy from git
to see if the problem has been fixed. If it has, it's only a matter of
identifying which commit fixed it and incorporating that into the
patch.

On Tue, Nov 18, 2008 at 2:44 AM, Sammy Spets <email address hidden> wrote:
> Patch confirmed to work on stinkpad X61 using the following:
> http://launchpadlibrarian.net/19254960/preinit.diff from https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/282387/comments/27
> http://launchpadlibrarian.net/18801118/mouse-wheel.fdi from https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/152214/comments/8
> Instructions from https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/282387/comments/36
>
> Kiitos Niklas! Hope we can get this into the package ASAP. I can help
> out if help will speed things up.
>
> --
> scrollwheel emulation breaks after suspend with 2.6.27-7
> https://bugs.launchpad.net/bugs/282387
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Sammy Spets (sammys) wrote :

Niklas: Works with the dont_check_abi patch and git HEAD.

Revision history for this message
Sammy Spets (sammys) wrote :

I've just tried running b0737bdbd1f6e601eb4984b6f4cb49279190984c with the dont_check_abi patch and it works for me. Could you confirm i've done the right thing here using the following commands to test it:

As user 'fred' in their home directory:
git clone git://git.freedesktop.org/git/xorg/driver/xf86-input-evdev
cd xf86-input-evdev
git reset --hard b0737bdbd1f6e601eb4984b6f4cb49279190984c
./autogen --prefix=/usr
make

As root:
invoke-rc.d gdm stop
cp ~fred/xf86-input-evdev/src/.libs/evdev_drv.so /usr/lib/xorg/modules/input/
ldconfig -n /usr/lib/xorg/modules/input/
invoke-rc.d hal restart
invoke-rc.d gdm start

Revision history for this message
Sammy Spets (sammys) wrote :

Ok... it's not selecting text in any window after applying the b0737* driver. Scrolling works though. I'll check where it fixes it.

Revision history for this message
Sammy Spets (sammys) wrote :

Niklas: Here are my findings for the git repository revisions. On some of the revisions I couldn't select text after switching VT and back to X. Selecting by double-click worked but dragging with mouse button down didn't work. In the results below you'll find "Selection" results are about that.

63af314368cec47b6b8266db331f2c820e7a071f CTRL-C kills X, Selections OK, Scroll OK
af096e8c5d8b425f725a37bf4a98e205e70716e9 CTRL-C kills X, Selections OK, Scroll OK
12498042fcc08e34aef0117ce84192f59542fd56 CTRL-C kills X, Selections bad, Scroll OK

As you can see, CTRL-C still kills X even with the HEAD revision (63af314368cec47b6b8266db331f2c820e7a071f). Commit af096e8c5d8b425f725a37bf4a98e205e70716e9 appears to have the fix for the selections breaking after VT switch. Commit 12498042fcc08e34aef0117ce84192f59542fd56 was immediately before af096e8c5d8b425f725a37bf4a98e205e70716e9.

Unfortunately, the commit fixing the problem doesn't cleanly apply to the xserver-xorg-input-evdev-2.0.99+git20080912 source.

Revision history for this message
jklasdf (jjj11x) wrote :

Installing the latest xserver-xorg-input-evdev and the xserver-xorg-core package which it depends on from Debian unstable seems to fix the problem.

Revision history for this message
epv (epvubuntu) wrote :

as a side note, one can restore normal behavior when it's broken by removing and re-modprobing the psmouse module. Not a fix, but at least it doesn't require rebooting or restarting the X server.
(btw the problem happens for me with xserver-xorg-input-evdev 1:2.0.99+git20080912-0ubuntu6.

Revision history for this message
kelvie (kelvie) wrote :

Hmm, then perhaps it would be a good idea to put in /etc/acpi/resume.d a script (I called mine 99-reload-psmouse):

#!/bin/sh
rmmod psmouse
modprobe psmouse

I think you have to chmod +x it as well.

Revision history for this message
david wood (david-wood) wrote :

Confirmed that the instructions from comment 36 work, using the patch from comment 27, on amd64, x200. I modified the steps by removing the explicit autogen, make, make install, and instead doing a debian/rules binary to create a deb.

Then I then saw the same issue that Aurimas reported (HAL policy not working, but xinput lines working); worked around that by adding the following lines to .profile (ugh):

# FIX FOR BROKEN EVDEV/HAL for TrackPoint scrolling:
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
xinput set-int-prop "TPPS/2 IBM TrackPoint" "Wheel Emulation Y Axis" 8 4 5

I consider this preferable to removing and re-adding modules (by pure superstition :). This forms the basis of new documentation added to thinkwiki here:

http://www.thinkwiki.org/wiki/Installing_Ubuntu_8.04_&_8.10_on_an_X200#TrackPoint

If anyone would like to change/improve/correct, please have at it. Thanks everyone!

Revision history for this message
Alexei Colin (alexei.colin) wrote :

To add to obsidian's comment #68, it seems that HAL policy file is being read, but it is not being read in correctly. Here are two examples of a line in the policy file and what output from xinput it leads to after reboot:

<merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
Wheel Emulation Y Axis: 4, 0

<merge key="input.x11_options.YAxisMapping" type="string">5 4</merge>
Wheel Emulation Y Axis: 5, 0

Maybe it is worth filing a bug report about this one if people agree.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

should be fixed in jaunty

Changed in xserver-xorg-input-evdev:
status: Confirmed → Fix Released
Revision history for this message
mooz (ramuski) wrote :

Niklas's instructions in post #36 at https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/282387/comments/36 worked for me after going into standby and resuming.

I am using a Lenovo Thinkpad X61 Tablet.

The only steps additional steps I had to take was the installation of a few other dependencies including libtool and autoconf using the code:

sudo apt-get install libtool
sudo apt-get install autoconf

Revision history for this message
Matthäus Brandl (matthaeus) wrote :

Thanks a lot, problem seems to be fixed here

Revision history for this message
Marc Jauvin (marc-r4l) wrote :

This fix works for me on my Thinkpad T61.

Thanks a lot!

Revision history for this message
aliencam (cameronk) wrote :

So by the status at the top being "fix released" does that mean that the fix should be in the repos already, or do we have to apply the patch as described in #36?

Revision history for this message
Nils (loewen-nils) wrote :

I'm stuck at the 4th step in the sequence:
sudo apt-get build-dep xserver-xorg-input-evdev
apt-get source xserver-xorg-input-evdev
cd xserver-xorg-input-evdev-2.0.99+git20080912
patch -p1 < /path/to/preinit.diff
./autogen --prefix=/usr
make
sudo make install

I get the following error:
laptop:~$ patch -p1 < /path/to/preinit.diff
bash: /path/to/preinit.diff: No such file or directory

I'm running: Intrepid 8.10 64 bit kernel 2.6.27-12 generic Gnome 2.24.1
Any help appreciated!

Revision history for this message
Niklas Vanhainen (niklas-vanhainen) wrote : Re: [Bug 282387] Re: scrollwheel emulation breaks after suspend with 2.6.27-7

Nils:
You need to replace "/path/to/preinit.diff" with the actual path to
your preinit.diff.

On Tue, Feb 17, 2009 at 1:05 AM, Nils <email address hidden> wrote:
> I'm stuck at the 4th step in the sequence:
> sudo apt-get build-dep xserver-xorg-input-evdev
> apt-get source xserver-xorg-input-evdev
> cd xserver-xorg-input-evdev-2.0.99+git20080912
> patch -p1 < /path/to/preinit.diff
> ./autogen --prefix=/usr
> make
> sudo make install
>
> I get the following error:
> laptop:~$ patch -p1 < /path/to/preinit.diff
> bash: /path/to/preinit.diff: No such file or directory
>
> I'm running: Intrepid 8.10 64 bit kernel 2.6.27-12 generic Gnome 2.24.1
> Any help appreciated!
>
> --
> scrollwheel emulation breaks after suspend with 2.6.27-7
> https://bugs.launchpad.net/bugs/282387
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
David Jaša (dejv) wrote :

Works for me on Jaunty α 5 without any patches. My .fdi file for configuration is attached. dmesg says about my trackpoint this:
[ 19.733498] IBM TrackPoint firmware: 0x0e, buttons: 3/3
[ 19.924076] pci 0000:01:00.0: power state changed by ACPI to D0
[ 19.924090] pci 0000:01:00.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
[ 20.011417] input: TPPS/2 IBM TrackPoint as /devices/platform/i8042/serio1/serio2/input/input10

and in Xorg.0.log is this:
[ 3.327112] (II) config/hal: Adding input device TPPS/2 IBM TrackPoint
[ 3.327186] (II) LoadModule: "evdev"
[ 3.327371] (II) Loading /usr/lib/xorg/modules/input//evdev_drv.so
[ 3.344560] (II) Module evdev: vendor="X.Org Foundation"
        compiled for 1.5.99.902, module version = 2.1.1
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 4.0
[ 3.344643] (**) TPPS/2 IBM TrackPoint: always reports core events
[ 3.344659] (**) TPPS/2 IBM TrackPoint: Device: "/dev/input/event10"
[ 3.344740] (II) TPPS/2 IBM TrackPoint: Found 3 mouse buttons
[ 3.344751] (II) TPPS/2 IBM TrackPoint: Found x and y relative axes
[ 3.344760] (II) TPPS/2 IBM TrackPoint: Configuring as mouse
[ 3.344784] (**) Option "Emulate3Buttons" "true"
[ 3.344800] (II) TPPS/2 IBM TrackPoint: Forcing middle mouse button emulation on.
[ 3.344811] (**) Option "EmulateWheel" "true"
[ 3.344833] (**) Option "EmulateWheelButton" "2"
[ 3.344852] (**) TPPS/2 IBM TrackPoint: YAxisMapping: buttons 4 and 5
[ 3.344861] (**) TPPS/2 IBM TrackPoint: EmulateWheelButton: 2, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 3.344889] (II) XINPUT: Adding extended input device "TPPS/2 IBM TrackPoint" (type: MOUSE)
[ 3.344936] (**) TPPS/2 IBM TrackPoint: (accel) keeping acceleration scheme 1
[ 3.344947] (**) TPPS/2 IBM TrackPoint: (accel) filter chain progression: 2.00
[ 3.344966] (**) TPPS/2 IBM TrackPoint: (accel) filter stage 0: 20.00 ms
[ 3.344989] (**) TPPS/2 IBM TrackPoint: (accel) set acceleration profile 0

Changed in evdev:
importance: Unknown → Medium
Changed in evdev:
importance: Medium → Unknown
Changed in evdev:
importance: Unknown → Medium
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.