Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Gamers & Players
  • Search

mouse accelleration [FIXED] <-- YOU NEED THIS

Having problems getting your favorite Linux game to work? Want to discuss strategies? This is the place!
Post Reply
  • Print view
Advanced search
41 posts
  • 1
  • 2
  • Next
Author
Message
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

mouse accelleration [FIXED] <-- YOU NEED THIS

  • Quote

Post by bushwakko » Sat Mar 12, 2005 2:55 pm

this isnt a game-specific problem though. However I cannot turn mouse accelleration completely off in linux.
If i do xset m 0 0 it appears, in x anyway, that mouse acc is off, but it isn't really. If you enter a games it is more apparent, since it is more sensitive on mouse movements (especially quake3 and quake2). If there is a program somewhere which measures the raw mouse input and compares it to how the mouse moves on the screen, i'm sure it would be apparent that the mouse moves longer when moved fast. This is pretty crippeling to linux gaming, especially to someone who try to game a little serious. It's a shame though, because I remember reading that quake3 performes better under linux than in windows.

I don't know where the problem is, but it would seem that Xorg or something has an old implementation that has some acceleration by default or doesn't handle the mouse correctly. Something that wasn't noticed back in the days without games.

Would be great if someone with some insight could comment on this?
Last edited by bushwakko on Thu Apr 14, 2005 4:55 pm, edited 1 time in total.
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
zehnan1
Tux's lil' helper
Tux's lil' helper
Posts: 90
Joined: Fri Oct 08, 2004 8:23 pm
Location: Slovenia

  • Quote

Post by zehnan1 » Sat Mar 12, 2005 9:53 pm

That is odd. I never had any problems with linux and xset m 0 0 - it works fine on several mice. Even for Diamondback which seems impossible to turn off accel in windows no matter the registry hacks and drivers.
My method of measuring acceleration is to put an obstacle to the left side of the mouse surface, align the mouse with an obstacle keeping the pointer at the very left of the screen. Then quickly pull mouse to the right so the pointer should be somewhat beetwen the middle and the far right of the screen. Then slowly go back. If the mouse hits the obstacle the same time as it hits the left edge of the screen, no acceleration is present. :)
Top
Husky
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 77
Joined: Thu Oct 23, 2003 12:23 pm

  • Quote

Post by Husky » Sun Mar 13, 2005 11:23 am

a bit OT:

you have to set the mouse-speed to 10 on the razer mousedriver to disable all mouse acceleration under windows.
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Sun Mar 13, 2005 12:33 pm

well the best measurement is trying to move the mouse slowly in most games. Not even SDL games work...
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Tue Mar 15, 2005 12:16 pm

bump.
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Tue Mar 15, 2005 2:55 pm

A good example of mouse being broken (may be implementation, but definantly also mouse acceleration related) is quake2.

In quake2 if you move the mouse very slowly you can definantly see mouse acelleration. In SDL if you move the mouse slow enough, it wont move at all. You can move it as long as you want, as long as you move it slow enough (easier to see with high sens, since when it starts to move, it moves further). in GLX-mode its even worse. If you move the mouse slow enough it will move in the opposite direction (!) and if you move a little faster it will stop moving and eventually move the correct way...

This makes it impossible to play. And in my opionion quake3 is also impossible to play, because of mouse acc...
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
eae
Apprentice
Apprentice
Posts: 211
Joined: Tue Dec 28, 2004 4:18 pm

  • Quote

Post by eae » Tue Mar 15, 2005 3:20 pm

I can confirm that xset m 0 0 seems to have no effect in games. I tried different values for xset m and then run Enemy Territory in the same xserver, and nothing changed.
But I interpreted that the opposite way: that is, I believed that mouse acceleration is disabled in et regardless of your x settings. I didn't make an accurate test though.
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Tue Mar 15, 2005 3:34 pm

the problem is that it is hard to make an accurate test here... :/
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
ribx
Apprentice
Apprentice
Posts: 219
Joined: Thu Nov 20, 2003 8:12 am
Location: germany

  • Quote

Post by ribx » Sat Mar 26, 2005 10:17 pm

you are realy lucky. REALY :) a friend of mine just show me this thread in the razor forum. it is q3 and et itself which does the accel. i have no clue what is wrong with your q2.
The adopt an unanswered post initiative
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Tue Mar 29, 2005 12:58 pm

Ok, thanks. Will check it out!
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
eae
Apprentice
Apprentice
Posts: 211
Joined: Tue Dec 28, 2004 4:18 pm

  • Quote

Post by eae » Thu Apr 14, 2005 2:51 pm

So, I want to apply the patch linked in the last post here: http://razer.tigga.org/phpBB2/viewtopic ... c&start=20 to xorg.

What is the best way to do so? I think I should add the patch to /usr/portage/distfiles/xorg-x11-6.8.2-patches-0.1.2.tar.bz2 and re-emerge xorg-x11. Is it enough to just add the patch in the tarball or do I have to edit something else? Thanks.
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Thu Apr 14, 2005 2:53 pm

hmm, I wonder too, an ebuild would be great.
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
eae
Apprentice
Apprentice
Posts: 211
Joined: Tue Dec 28, 2004 4:18 pm

  • Quote

Post by eae » Thu Apr 14, 2005 3:17 pm

If I just add the patch to /usr/portage/distfiles/xorg-x11-6.8.2-patches-0.1.2.tar.bz2 , the emerge process fails complaining that the file size does not correspond to the expected one. What's the proper way of doing what I want?
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Thu Apr 14, 2005 3:42 pm

do emerge xorg-x11 --digest, see if that fixes it.
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
eae
Apprentice
Apprentice
Posts: 211
Joined: Tue Dec 28, 2004 4:18 pm

  • Quote

Post by eae » Thu Apr 14, 2005 3:55 pm

I did it the dirty way by manually editing the digest file and inserting the new file size and checksum. Now it's compiling, I'll post again when it's finished. :)
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Thu Apr 14, 2005 4:05 pm

hehe, that was unecesarry
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
eae
Apprentice
Apprentice
Posts: 211
Joined: Tue Dec 28, 2004 4:18 pm

  • Quote

Post by eae » Thu Apr 14, 2005 4:51 pm

Ok, it's done and it works. Mouse acceleration is gone; the overall sensation is that sensitivity is doubled, so you'll probably want to behalf your sensitivity cvar. The funny thing is that i behalved twice today (the first time was because I was switching mouse resolution from 400 to 800 dpi) so now I have a sens of 0.3. 8O

On a side note: in Enemy Territory setting in_dgamouse 2 only works in the new 2.60 patch. This is the reason why I had to go through this (etpro is not compatible with the 2.60 patch yet).

Anyways in my opinion this fix is very important for the linux gaming community and I believe that it should be publicized more. Maybe you could edit the thread title for this purpose bushwakko. :D Something like "Mouse Acceleration -> YOU NEED THIS!!!11"
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Thu Apr 14, 2005 4:59 pm

I concur, topic is now changed. It would be fantastic if it where possible to make an ebuild of this, that only compiles the files needed. I have no idea, but I'm guessing this is a patch that only affects a file or two of the entire xorg package. Like it unpacks the xorg-source, applies the patch, compiles and installs that file.:)

also would be great to know excactly what you did to make this work, what file you patched, and how you edited the xorg ebuild and so on :)
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
eae
Apprentice
Apprentice
Posts: 211
Joined: Tue Dec 28, 2004 4:18 pm

  • Quote

Post by eae » Thu Apr 14, 2005 6:30 pm

Yes of course, this is what I did step by step (as root):

Code: Select all

mkdir sometempdir
cd sometempdir
tar -xjf /usr/portage/distfiles/xorg-x11-6.8.2-patches-0.1.2.tar.bz2
cd patch/
nano 9999_all_mouse-accel-fix.patch
in this new file paste the following (You may have to adjust the indentation)

Code: Select all

diff -Naur xc/programs/Xserver/hw/xfree86/common/xf86DGA.c xc/programs/Xserver/hw/xfree86/common/xf86DGA.c
--- xc/programs/Xserver/hw/xfree86/common/xf86DGA.c     2004-04-23 21:20:32.000000000 +0200
+++ xc.gentoo/programs/Xserver/hw/xfree86/common/xf86DGA.c      2004-11-15 01:16:48.000000000 +0100
@@ -905,8 +905,8 @@
     de.u.u.type = e->u.u.type + *XDGAEventBase;
     de.u.u.detail = e->u.u.detail;
     de.u.event.time = e->u.keyButtonPointer.time;
-    de.u.event.dx = dx;
-    de.u.event.dy = dy;
+    de.u.event.dx = 2 * dx; /* for the id bug */
+    de.u.event.dy = 2 * dy; /* for the id bug */
     de.u.event.pad1 = DGAMouseX;
     de.u.event.pad2 = DGAMouseY;
     xf86eqEnqueue ((xEvent *) &de);

(I have made some stupid changes to make it look more like the other gentoo patces)
Now save the file; then

Code: Select all

rm /usr/portage/distfiles/xorg-x11-6.8.2-patches-0.1.2.tar.bz2
cd ..
tar -cjf  xorg-x11-6.8.2-patches-0.1.2.tar.bz2 patch/
cp xorg-x11-6.8.2-patches-0.1.2.tar.bz2  /usr/portage/distfiles/
Then what I did was to edit the file /usr/portage/x11-base/xorg-x11/files/digest-xorg-x11-6.8.2-r1 ; there's a line

Code: Select all

MD5 61782b11027ce300d7634d024accc3c7 xorg-x11-6.8.2-patches-0.1.2.tar.bz2 150386
that I modified with the new md5sum and the new size of the file xorg-x11-6.8.2-patches-0.1.2.tar.bz2.

Finally

Code: Select all

emerge xorg-x11
if you read carefully the first lines of output you should see something like

Code: Select all

* Applying various patches (bugfixes/updates) ...
 *   0119_all_exports-lib-v2.patch ...
[...]
 *   9999_all_mouse-accel-fix.patch ...                                   [ ok ]
 * Done with patching
which means that the whole thing worked. Then wait for compilation to finish and start your game in a new xserver. :)

I know that this is not the most correct way of doing this (emerge digest instead of editing the digest file?) but it worked for me and should work for everybody.
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Thu Apr 14, 2005 8:55 pm

can you make a link to the patched bzip archive? if not you can email it to me wakko-at-generation-dot-no ;) I hax0r-scrambled my email adress, and I can upload it to my server.
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Thu Apr 14, 2005 9:08 pm

hmmm...
***** 9999_all_mouse-accel-fix.patch *****

==========================================

PATCH COMMAND: patch -p0 -g0 < /var/tmp/portage/xorg-x11-6.8.2-r1/work/patch/9999_al
l_mouse-accel-fix.patch

==========================================
patching file xc/programs/Xserver/hw/xfree86/common/xf86DGA.c
Hunk #1 FAILED at 905.
1 out of 1 hunk FAILED -- saving rejects to file xc/programs/Xserver/hw/xfree86/commo
n/xf86DGA.c.rej
==========================================

PATCH COMMAND: patch -p1 -g0 < /var/tmp/portage/xorg-x11-6.8.2-r1/work/patch/9999_al
l_mouse-accel-fix.patch

==========================================
can't find file to patch at input line 7
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur xc/programs/Xserver/hw/xfree86/common/xf86DGA.c
|xc/programs/Xserver/hw/xfree86/common/xf86DGA.c
|--- xc/programs/Xserver/hw/xfree86/common/xf86DGA.c 2004-04-23
|21:20:32.000000000 +0200
|+++ xc.gentoo/programs/Xserver/hw/xfree86/common/xf86DGA.c 2004-11-15
|01:16:48.000000000 +0100
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
==========================================
hmm... didn't work for me, I got this message a few times. it doesn't find the fime, also after inspecting the patch it just seems that it doubles the sensitivity or something, perhaps this makes mouseacc feel less, because the acceleration threshold isn't reached ?

[edit]
The threshold is always reached, meaning its always above it. hence the faster movment too. :) if so, then it's fine by me, except if the always-max-acceleration cuts down on the samples in some way. It's a little hard to explain what i mean, if it's like less actual hz...
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
eae
Apprentice
Apprentice
Posts: 211
Joined: Tue Dec 28, 2004 4:18 pm

  • Quote

Post by eae » Thu Apr 14, 2005 9:43 pm

Uhm, you could try to unpack /usr/portage/distfiles/X11R6.8.2-src.tar.bz2 and patch by hand; look for the file xc/programs/Xserver/hw/xfree86/common/xf86DGA.c ; :? if you still have problems I can patch it, repackage and send you /usr/portage/distfiles/X11R6.8.2-src.tar.bz2, if you want.
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Thu Apr 14, 2005 9:57 pm

I just changed the file while in /var/tmp/blabla/work/xc/blabla/xf86DGA.c real fast, just after patching ;) its compiling now.
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Thu Apr 14, 2005 10:29 pm

I'm pretty sure my file got patched, though my mouse feels just the same :/
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
bushwakko
Guru
Guru
User avatar
Posts: 495
Joined: Tue Mar 25, 2003 12:35 am

  • Quote

Post by bushwakko » Thu Apr 14, 2005 10:35 pm

btw:

diff -Naur xc/programs/Xserver/hw/xfree86/common/xf86DGA.c xc/programs/Xserver/hw/xfree86/common/xf86DGA.c

<-- is this supposed to be in the file?
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Top
Post Reply
  • Print view

41 posts
  • 1
  • 2
  • Next

Return to “Gamers & Players”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy