Mouse jumps to center in (sdl?/opengl?) games

Bug #61105 reported by beza1e1
184
This bug affects 35 people
Affects Status Importance Assigned to Milestone
unclutter (Debian)
Confirmed
Unknown
unclutter (Ubuntu)
Confirmed
Low
Unassigned
Declined for Maverick by Sebastien Bacher

Bug Description

I have this bug in Edgy with Nexuiz, Tremulous and Wormux, so i assume it is on a deeper level. SDL maybe?

The mouse jumps around every second or so. Sometimes regularly to the center, but sometimes to other points. It looks like some kind of position reset or something. It happens fullscreen and windowed.

(summary of comments: It's unclutter's fault. It interferes with SDL's relative mouse input. If you're seeing this bug and there isn't a smarter unclutter released yet, just killall unclutter.)

Revision history for this message
beza1e1 (beza1e1) wrote :

My xorg.conf may help?

Revision history for this message
Carlos F. (topopardo-deactivatedaccount) wrote :

Same here. I think this is a problem with openGL games, as it happens with:
-xmoto
-neverputt/neverball
-ppracer
-slune

I'm using Feisty "Linux vayralemine 2.6.20-13-generic #2 SMP Sun Mar 25 00:21:25 UTC 2007 i686 GNU/Linux" on an Acer Aspire 1692. I'll be happy to help debugging this.

Revision history for this message
Carlos F. (topopardo-deactivatedaccount) wrote :

Wow, this was reported LONG time ago. I didn't suffer from this bug when I used Edgy!

Revision history for this message
Tim Kersten (timkersten) wrote :

I have the same problem. In Edgy all opengl games worked - but here in Feisty the mouse keeps jumping to a particular location on the screen every few seconds. Usually the centre of the screen, but sometimes a different location. It makes all those opengl games unplayable :-(

Revision history for this message
Tim Kersten (timkersten) wrote :

Anyone any idea what might be causing the problem? It would be nice if we could diagnose the problem accurately. I just don't know where to even begin looking. Anyone?

Revision history for this message
Tim Kersten (timkersten) wrote :

I changed the affected package - but please change it back if I'm wrong. My reason being, it seems unlikely that this is where the problem lies: I tried installing nexuiz on a friends machine which is also a Dell laptop. It's a different model to mine - the difference is that the mouse does NOT jump around on his computer when playing games such as nexuiz. It works perfectly. Nexuiz is very playable. It gives me the impression that this is somehow hardware, which is why I failed to see how SDL could be affected.
I'm in the middle of exams at the moment, but I will try install a clean ubuntu with no updates and try all the above mentioned games again.

Revision history for this message
Tim Kersten (timkersten) wrote :

Just to let you know, I thought it might have something to do with the graphics card driver. I have an intel i945 graphics chip and was using the xserver-xorg-video-i810 driver. I tried using the new xserver-xorg-video-intel drivers but they made no difference. :-(

Revision history for this message
Carlos F. (topopardo-deactivatedaccount) wrote :

My case:

ATI mobility X700 card, fglrx driver. The mouse jumps to center on:

-xmoto (opengl)
-neverball/neverputt/etc (opengl)
-dosbox (??)

The mouse doesn't jump:
-wesnoth (sdl)
-scummvm (??)

If it were only an opengl issue, why does the bug appear on dosbox? This drives me nuts. It seems that the bug was reported long time ago, but in my case it appeared on Feisty and not before.

Let's see if we can reduce the scope of the bug and find its cause, because it makes most games unplayable.

Revision history for this message
Tim Kersten (timkersten) wrote :

You quite right. It doesn't seem to be limited to opengl. I wonder if we could create some very simple programs using the various libraries in question to reduce the scope? I'll look into it when I get a chance. I really hope we get to the bottom of it because all lots of these games were perfectly playable in Dapper and Edgy and in Feisty they're no longer playable.

Revision history for this message
Tim Kersten (timkersten) wrote :

What really bugs me though is that it works for some people and not for others.

Revision history for this message
Tim Kersten (timkersten) wrote :

I attached a small video of the bug as it occurs.

Note the mouse is fully ok before nexuiz gets focused, but once focused, the bug kicks in. Nexuiz has the problem in windowed and in fullscreen made. Xmoto only has the problem in fullscreen mode.

The difference is when windowed, xmoto allows the cursor to move outside it's window, where as nexuiz will not allow you to move the cursor outside it's window. Globulation2 behaves just like xmoto.

Revision history for this message
Rasmus Neckelmann (neckelmann) wrote :

As I see it, it can either be caused by two things:

1. It's a problem with the applications. Many implement mouse movement in games by for each game update resetting the mouse cursor to center of the screen - this is suitable for tracking relative mouse movement (for instance in an FPS game, you can roll your mouse for ever and ever (given a long enough chord :)), and the player will continue to rotate - if the cursor wasn't reset to the middle of the screen, the player would stop rotating when the cursor hit the edge of the screen).
This should work fine, but it's easy to make a bug in a game where the input loop is updated also when the application isn't focussed. Especially when using a high-level library like SDL.

2. It's a problem with SDL. Maybe some SDL functions unexpectedly resets the mouse cursor in some special cases.

It's weird that the bug isn't consistant on all system, though.

Revision history for this message
Tim Kersten (timkersten) wrote :

I just downloaded the latest updates and restarted my machine. Just for kicks I thought I'd try those games again - and to my amazement they worked!! At least Nexuiz and Xmoto do anyway.

Can someone else confirm that this? Then we can close this bug! :-)

Revision history for this message
Carlos F. (topopardo-deactivatedaccount) wrote :

Yes... it worked! It is fixed now, I don't know how, but fixed nevertheless.

I'm closing the bug now :)

Revision history for this message
Carlos F. (topopardo-deactivatedaccount) wrote :

The bug is closed with the lastest updates on Feisty

Revision history for this message
Carlos F. (topopardo-deactivatedaccount) wrote :

Reopened, it happened again with the lastest opengl/mesa updates (2007-07-15)

Revision history for this message
trollord (trollenlord) wrote :

Carlos, could you using Synaptic force an older version of the packages, and report which versions work and which do not?

Revision history for this message
Carlos F. (topopardo-deactivatedaccount) wrote :

trollord: which packages should I try to downgrade? Maybe libgl1-mesa-dri, libgl1-mesa-glx and libglu1-mesa? Any other package?

Revision history for this message
Carlos F. (topopardo-deactivatedaccount) wrote :

I downgraded the following packages:

$ sudo apt-get install libgl1-mesa-dri=6.5.2-3ubuntu7 libgl1-mesa-glx=6.5.2-3ubuntu7 libgl1-mesa-dev=6.5.2-3ubuntu7 mesa-common-dev=6.5.2-3ubuntu7 mesa-utils=6.5.2-3ubuntu7 libglu1-mesa=6.5.2-3ubuntu7 libglu1-mesa-dev=6.5.2-3ubuntu7

and restarted the computer, but it didn't fix the problem. Maybe it's caused by some other package?

BTW, qemu is also affected by this bug, just in case it helps to track it down

Revision history for this message
Pascal Giard (pascalgiard-debian) wrote :

At least in my case, the problem turns out to be xserver-xorg-input-mouse. Downgrading to previous version solved the problem.
Therefore, i believe this bugreport should be reassigned.

Revision history for this message
Tim Kersten (timkersten) wrote :

I have changed the package this bug belongs to as suggested by Pascal Giard. This bug is present for me from a clean install in gutsy when using xserver-xorg-input-mouse version 1.2.1-1. The bug is no longer present when I downgraded to version 1.1.1-0ubuntu, available from here: http://security.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-input-mouse/xserver-xorg-input-mouse_1.1.1-0ubuntu1_i386.deb

Is there any other information required in order to fix this problem? Perhaps there is a way to fix it perminantly as it seems to be reappearing with each new version of ubuntu. Can this be taken upstream? I don't know enough about it to investigate further.

Many thanks!!
Tim :-)

Revision history for this message
Tim Kersten (timkersten) wrote :

Sorry about the above comment. I am mistaken. Downgrading that package did not solve the problem. Is there any information I could provide to help track down the source of the issue?

Tim

Revision history for this message
Tim Kersten (timkersten) wrote :

Ha!! I have an update. I created a new user account on my computer and that worked like a charm, so it must be some setting in the home folder. I have no idea what, but I am happy that I can now play games again :-D

Can somebody else confirm this too? Maybe we can track down the settings responsible and make sure it doesn't happen again.

Tim

Revision history for this message
Tim Kersten (timkersten) wrote :

Ok, I've finally figured out the problem. It's unclutter. The jumping of the mouse is caused by unclutter running. :-)
I really should have figured this out earlier...
Anyway, can this bug be closed now? Or marked as invalid?

Cheers,
Tim

Revision history for this message
Felipe Morales (hel-sheep) wrote :

I confirm Tim Kersten remark (https://bugs.launchpad.net/ubuntu/+bug/61105/comments/24): I had the same problem, but stopping unclutter solved it. This could be marked as an unclutter bug, but I doubt it is fixable.

Revision history for this message
Peter Cordes (peter-cordes) wrote :

The thing unclutter conflicts with is SDL's relative mouse input. If you
export SDL_MOUSE_RELATIVE=0
before running an SDL game, the mouse won't jump. OTOH, an FPS like nexuiz will be unplayable because you won't be able to turn freely! But this does confirm that it's SDL's relative mouse input that is broken by unclutter.

 So it has nothing to do with xserver-xorg-input-mouse

description: updated
Revision history for this message
Łukasz Semler (lukasz-semler) wrote :

Hi. I have similar problem with games that uses SDL library & use their own mouse pointer ( Nexuiz-sdl, Postal 1&2, Quake Live, Secret Maryo Chronicles, etc.).
The only difference is when I click on let say a menu START (in game) then mouse pointer show in completly other place ( direction is always right+down ).
When I click somwere above+left of menu then it is possible to hit the menu.
In Quake Live when I shoot (click with mouse) my crosshair is always going down+right direction).

When I tried :

export SDL_MOUSE_RELATIVE=0

then it works ok ( but it's unusable as Peter said before).

And I don't have unclutter running or even installed (Ubuntu 64 9.10)

Revision history for this message
Łukasz Semler (lukasz-semler) wrote :

I find this problem is related to DGA.

How to test:

1.Start nexuiz with glx (nexuiz-linux-glx.sh)
2.Go to setting->input
3.Check "Turn off OS mouse acceleration" (tip -> "Make use of DGA mouse input")

than it should behave like nexuiz-linux-sdl.

I think SDL is using DGA for mouse input & this is the problem.

Revision history for this message
Łukasz Semler (lukasz-semler) wrote :

And it seems I found the solution.

In the xorg.conf find section "Module" & add this:

Option "omit xfree86-dga"

so it would look like this:

Section "Module"
SubSection "extmod"
Option "omit xfree86-dga"
EndSubSection
EndSection

And than every game is now working without problem.

Revision history for this message
Bjartur (bjartur79) wrote :

Am I right that this happens only with nVidia's proprietary driver?
nVidia plans to drop support for DGA, so the problem would cease to exist. But if this also affects users of other drivers then the installer should detect whether this particular hardware/driver combination works with DGA, and disable/enable the extension with that in mind. This could also be used as a temporary fix while nVidia supports DGA.

Revision history for this message
Darryl Meganoski (zodiacdm) wrote :

What surprises me is that so many people wrote comments on this, although there is only 1 person (and now me) that reported that this bug affects them.

I am not familiar with the way the site works, but I would think that if there is a low number of people reported to be affected they will not make the bug a high priority.

So vote up people ;)

I'm testing Maverick and this is still going on :(

Revision history for this message
4th guy (4th-guy) wrote :

This bug also affects me. Currently, the only way to bypass the bug is to stop unclutter before launching a conflicting application.

Changed in unclutter (Debian):
status: Unknown → New
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I've added a nominate for maverick since unclutter seems to be auto-added during an upgrade to maverick

Revision history for this message
Sebastien Bacher (seb128) wrote :

declining nomination since unclutter was dropped since

Changed in unclutter (Ubuntu):
importance: Undecided → Low
Revision history for this message
Mathieu Comandon (strycore) wrote :

As long as it never makes it on a default Ubuntu install ever again, I'm happy with that and don't actually care if the bug gets fixed.
The package was nearly dropped out of debian twice and it's been in version 0.8 since 1996 or even before (it wasn't in debian before that).
Seriously ? An unmaintained program from the last century that does crazy things with your mouse pointer ? On a default install ?? No way !

Revision history for this message
forteller (forteller) wrote :

The unclutter website now says: "(active development) ", so I'll just add that this bug also affects the game Steel Storm.

Revision history for this message
Andrea Amoroso (heiko81) wrote :

yes, it worked for me..thanks..
maverick from alpha2

Revision history for this message
SIO (sio-wtf) wrote :

Bug doesn't appear when unclutter is used with "-grab" option. Developers warn though that this option doesn't work well with all window managers. Works for me ok with fluxbox.

Changed in unclutter (Debian):
status: New → Confirmed
Revision history for this message
lonnallen@yahoo.com (lonnallen) wrote :

for the time being I disabled unclutter to stop the jumping mouse problem while gaming on Kubuntu 11.10.

Revision history for this message
Adrian Busolini (aab-cs) wrote :

Łukasz Semler's solution in comment #29 worked for me (UrbanTerror on Ubuntu 12.04, XFCE, NVIDIA proprietary, with Synergy client - unclutter not installed)

Revision history for this message
lee8oi (lee8oi) wrote :

I had this issue myself here in Ubuntu 12.04 with the SDL games. The easiest fix I was able to come up with was to edit /etc/environment file and add "SDL_VIDEO_X11_DGAMOUSE=0" to the end of it then re-log. It applied the change system-wide so all SDL games were fixed.

Revision history for this message
phukariflux (phukariflux-deactivatedaccount) wrote :

also affects Urban Terror (cursor jumps into fixed position somewhere around the center of screen) in Xubuntu 12.10 64bit

Revision history for this message
Chozabu (chozabu) wrote :

I can confirm this also affects a few SDL games tested in Kubuntu 12.10 with a Nvidia Optimus setup.
I've just removed unclutter, but some of the solutions above would be better

Revision history for this message
drink (martin-espinoza) wrote :

This has been getting better but it just got worse. Notably in XBMC

Revision history for this message
drink (martin-espinoza) wrote :

Sorry for double-comment: I am using unclutter but I am not using -grab

Revision history for this message
Mathieu Comandon (strycore) wrote :

unclutter fun fact : some files in the upstream archive are older than linux itself (09-04-1991) and the most recently updated file was modified almost 20 years ago (11-04-1994).

Revision history for this message
Ubuntu12.04LTSUser (ubuntu12.04ltsuser) wrote :

Still a problem as at 19 April 2013 in Ubuntu 12.04 LTS with up to date system.

As reported above this is affecting certain (fullscreen?) games (e.g. Lugaru) + XBMC where the mouse continually (and almost instantly) jumps back to the center of the screen (or some other fixed point) whenever you try to move the mouse.

Makes using affected appications impossible: You can't even click on the close/quit button because you cannot get the mouse pointer over the buttons before the pointer snaps back to the center of the screen!

running terminal command: killall unclutter
...immediately solves the issue in all affected programs. However, it's hardly fair to expect novice users to have to do this.

Any chance this bug's "importance" can be bumped up considering it renders certain programs unuseable?

my hardware = Toshiba Satellite C850

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

Other bug subscribers

Remote bug watches

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