Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mouse accelleration [FIXED] <-- YOU NEED THIS
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Sat Mar 12, 2005 2:55 pm    Post subject: mouse accelleration [FIXED] <-- YOU NEED THIS Reply with quote

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?
_________________
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb


Last edited by bushwakko on Thu Apr 14, 2005 4:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
zehnan1
Tux's lil' helper
Tux's lil' helper


Joined: 08 Oct 2004
Posts: 90
Location: Slovenia

PostPosted: Sat Mar 12, 2005 9:53 pm    Post subject: Reply with quote

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. :)
Back to top
View user's profile Send private message
Husky
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2003
Posts: 77

PostPosted: Sun Mar 13, 2005 11:23 am    Post subject: Reply with quote

a bit OT:

you have to set the mouse-speed to 10 on the razer mousedriver to disable all mouse acceleration under windows.
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Sun Mar 13, 2005 12:33 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Tue Mar 15, 2005 12:16 pm    Post subject: Reply with quote

bump.
_________________
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Tue Mar 15, 2005 2:55 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
eae
Apprentice
Apprentice


Joined: 28 Dec 2004
Posts: 211

PostPosted: Tue Mar 15, 2005 3:20 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Tue Mar 15, 2005 3:34 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
ribx
Apprentice
Apprentice


Joined: 20 Nov 2003
Posts: 213
Location: germany

PostPosted: Sat Mar 26, 2005 10:17 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Tue Mar 29, 2005 12:58 pm    Post subject: Reply with quote

Ok, thanks. Will check it out!
_________________
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Back to top
View user's profile Send private message
eae
Apprentice
Apprentice


Joined: 28 Dec 2004
Posts: 211

PostPosted: Thu Apr 14, 2005 2:51 pm    Post subject: Reply with quote

So, I want to apply the patch linked in the last post here: http://razer.tigga.org/phpBB2/viewtopic.php?t=3691&postdays=0&postorder=asc&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.
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Thu Apr 14, 2005 2:53 pm    Post subject: Reply with quote

hmm, I wonder too, an ebuild would be great.
_________________
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Back to top
View user's profile Send private message
eae
Apprentice
Apprentice


Joined: 28 Dec 2004
Posts: 211

PostPosted: Thu Apr 14, 2005 3:17 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Thu Apr 14, 2005 3:42 pm    Post subject: Reply with quote

do emerge xorg-x11 --digest, see if that fixes it.
_________________
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Back to top
View user's profile Send private message
eae
Apprentice
Apprentice


Joined: 28 Dec 2004
Posts: 211

PostPosted: Thu Apr 14, 2005 3:55 pm    Post subject: Reply with quote

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. :)
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Thu Apr 14, 2005 4:05 pm    Post subject: Reply with quote

hehe, that was unecesarry
_________________
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Back to top
View user's profile Send private message
eae
Apprentice
Apprentice


Joined: 28 Dec 2004
Posts: 211

PostPosted: Thu Apr 14, 2005 4:51 pm    Post subject: Reply with quote

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"
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Thu Apr 14, 2005 4:59 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
eae
Apprentice
Apprentice


Joined: 28 Dec 2004
Posts: 211

PostPosted: Thu Apr 14, 2005 6:30 pm    Post subject: Reply with quote

Yes of course, this is what I did step by step (as root):
Code:
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:
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:
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:
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:
emerge xorg-x11


if you read carefully the first lines of output you should see something like
Code:
* 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.
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Thu Apr 14, 2005 8:55 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Thu Apr 14, 2005 9:08 pm    Post subject: Reply with quote

hmmm...

Quote:
***** 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
Back to top
View user's profile Send private message
eae
Apprentice
Apprentice


Joined: 28 Dec 2004
Posts: 211

PostPosted: Thu Apr 14, 2005 9:43 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Thu Apr 14, 2005 9:57 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Thu Apr 14, 2005 10:29 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Thu Apr 14, 2005 10:35 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum