Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
an interesting usb mouse hack for gamers
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next  
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
mikeraach
Apprentice
Apprentice


Joined: 20 Jan 2003
Posts: 168

PostPosted: Fri Jan 28, 2005 12:34 am    Post subject: Reply with quote

krejler wrote:

You could try to....
Code:
echo 50 > /sys/module/usbhid/parameters/mousepoll

...then replug your mouse, and move the cursor around a bit.


Yup, that made a big difference. And after playing with setting it from 2, then 10 (unplugging in between) I did notice a small difference.

Nice little hack :)
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Fri Jan 28, 2005 12:43 am    Post subject: Reply with quote

mikeraach wrote:
krejler wrote:

You could try to....
Code:
echo 50 > /sys/module/usbhid/parameters/mousepoll

...then replug your mouse, and move the cursor around a bit.


Yup, that made a big difference. And after playing with setting it from 2, then 10 (unplugging in between) I did notice a small difference.

Nice little hack :)


Hehe, thanks. :)
I'm glad you got it working.
Back to top
View user's profile Send private message
Iron_DragonLord
Apprentice
Apprentice


Joined: 04 Nov 2004
Posts: 273

PostPosted: Fri Jan 28, 2005 2:49 am    Post subject: Reply with quote

I'd just like to say thanks! My mouse is hauling ass at 2ms and 800 dpi.

One question though... how risky is it to set my mouse to 1 ms?
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Fri Jan 28, 2005 12:46 pm    Post subject: Reply with quote

Iron_DragonLord wrote:
I'd just like to say thanks! My mouse is hauling ass at 2ms and 800 dpi.

One question though... how risky is it to set my mouse to 1 ms?


It probably wont hurt to try, but I doubt you can feel it. I'm not sure a lot of mice supports it, and I suspect they'll just jump back whatever polling interval they support.
Back to top
View user's profile Send private message
Jagasian
n00b
n00b


Joined: 04 Dec 2004
Posts: 7

PostPosted: Fri Feb 04, 2005 5:01 am    Post subject: Reply with quote

I just got the new Razor Diamondback, which is a 1600dpi optical mouse. The problem that I am having is that everytime my system boots, xorg is automatically setting the acceleration scale and threshold settings to 8/10 and 1 respectively. Since I use 1000hz sampling, each mouse delta is very small for slow movements, and the 8/10 scale causes a movement of 1 count to be scaled to 0.8, which is then rounded down to 0. Hence slow movements don't cause any cursor movement, even if I move the mouse an entire meter!

I think the automatic settings calculation during boot has something to do with hotplug, but I am not sure. After I log in, I can use "xset 1 255" to disable acceleration, but for some reason putting it in .bash_profile and .xinitrc doesn't change anything.

Any ideas on how to fix this? Acceleration is for low resolution mice. High resolution mice should simply have acceleration disabled as it only causes problems. The Razor Diamondback is absolutely awesome with acceleration disabled and a 1000hz sample rate!
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Sat Feb 05, 2005 1:14 am    Post subject: Reply with quote

Jagasian wrote:
I just got the new Razor Diamondback, which is a 1600dpi optical mouse. The problem that I am having is that everytime my system boots, xorg is automatically setting the acceleration scale and threshold settings to 8/10 and 1 respectively. Since I use 1000hz sampling, each mouse delta is very small for slow movements, and the 8/10 scale causes a movement of 1 count to be scaled to 0.8, which is then rounded down to 0. Hence slow movements don't cause any cursor movement, even if I move the mouse an entire meter!

I think the automatic settings calculation during boot has something to do with hotplug, but I am not sure. After I log in, I can use "xset 1 255" to disable acceleration, but for some reason putting it in .bash_profile and .xinitrc doesn't change anything.

Any ideas on how to fix this? Acceleration is for low resolution mice. High resolution mice should simply have acceleration disabled as it only causes problems. The Razor Diamondback is absolutely awesome with acceleration disabled and a 1000hz sample rate!


What automatic calculations are you talking about? I'm a little lost, heh. :)

Now, the xset-in-xinitrc does indeed not work. Personally, I use a tiny script, that sleeps for a couple of seconds, and then calls xset, to disable acceleration. It works great! :)
Back to top
View user's profile Send private message
Jagasian
n00b
n00b


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Feb 05, 2005 1:45 am    Post subject: Reply with quote

krejler wrote:
Jagasian wrote:
I just got the new Razor Diamondback, which is a 1600dpi optical mouse. The problem that I am having is that everytime my system boots, xorg is automatically setting the acceleration scale and threshold settings to 8/10 and 1 respectively. Since I use 1000hz sampling, each mouse delta is very small for slow movements, and the 8/10 scale causes a movement of 1 count to be scaled to 0.8, which is then rounded down to 0. Hence slow movements don't cause any cursor movement, even if I move the mouse an entire meter!

I think the automatic settings calculation during boot has something to do with hotplug, but I am not sure. After I log in, I can use "xset 1 255" to disable acceleration, but for some reason putting it in .bash_profile and .xinitrc doesn't change anything.

Any ideas on how to fix this? Acceleration is for low resolution mice. High resolution mice should simply have acceleration disabled as it only causes problems. The Razor Diamondback is absolutely awesome with acceleration disabled and a 1000hz sample rate!


What automatic calculations are you talking about? I'm a little lost, heh. :)

Now, the xset-in-xinitrc does indeed not work. Personally, I use a tiny script, that sleeps for a couple of seconds, and then calls xset, to disable acceleration. It works great! :)


I think that the automatic calculations are due to hotplug, but I have looked through the hotplug scripts and can't find it. Maybe I am overlooking something. I can tell they are automatic because the acceleration settings are different for other mice. Why isn't there a way to make xset's parameters permenant? I would be happy with a permenant "xset mouse 1 255" setting.
Back to top
View user's profile Send private message
bennettp
Guru
Guru


Joined: 22 Feb 2004
Posts: 335
Location: on my back and tumbling

PostPosted: Sat Feb 05, 2005 3:37 am    Post subject: Reply with quote

krejler wrote:
Iron_DragonLord wrote:
I'd just like to say thanks! My mouse is hauling ass at 2ms and 800 dpi.

One question though... how risky is it to set my mouse to 1 ms?


It probably wont hurt to try, but I doubt you can feel it. I'm not sure a lot of mice supports it, and I suspect they'll just jump back whatever polling interval they support.

I set mine to 1ms... no smoke curling from it... but of course I couldn't tell the difference in proformance.
_________________
Registered Linux User #363420
Back to top
View user's profile Send private message
Jagasian
n00b
n00b


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Feb 05, 2005 5:10 am    Post subject: Reply with quote

bennettp wrote:
krejler wrote:
Iron_DragonLord wrote:
I'd just like to say thanks! My mouse is hauling ass at 2ms and 800 dpi.

One question though... how risky is it to set my mouse to 1 ms?


It probably wont hurt to try, but I doubt you can feel it. I'm not sure a lot of mice supports it, and I suspect they'll just jump back whatever polling interval they support.

I set mine to 1ms... no smoke curling from it... but of course I couldn't tell the difference in proformance.


When I measure a 1ms polling interval using a utility I wrote, I only see new data from the mouse every 2ms. I have tested a Logitech MX300 and a Razor Diamondback. I am not sure if this is a limitation of the utility I wrote, the mice in question, or maybe something to do with Linux itself.
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Sat Feb 05, 2005 10:47 am    Post subject: Reply with quote

Jagasian wrote:
bennettp wrote:
krejler wrote:
Iron_DragonLord wrote:
I'd just like to say thanks! My mouse is hauling ass at 2ms and 800 dpi.

One question though... how risky is it to set my mouse to 1 ms?


It probably wont hurt to try, but I doubt you can feel it. I'm not sure a lot of mice supports it, and I suspect they'll just jump back whatever polling interval they support.

I set mine to 1ms... no smoke curling from it... but of course I couldn't tell the difference in proformance.


When I measure a 1ms polling interval using a utility I wrote, I only see new data from the mouse every 2ms. I have tested a Logitech MX300 and a Razor Diamondback. I am not sure if this is a limitation of the utility I wrote, the mice in question, or maybe something to do with Linux itself.

Code:
500
416
750
500
500
1000
1000
1000
500
1000
500
1000


It isn't impossible, but it requires a quick hand. ;)
Back to top
View user's profile Send private message
Jagasian
n00b
n00b


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Feb 05, 2005 5:52 pm    Post subject: Reply with quote

krejler wrote:

Code:
500
416
750
500
500
1000
1000
1000
500
1000
500
1000


It isn't impossible, but it requires a quick hand. ;)


I tried moving as fast as I can. Maybe it is some other kernel setting that limits the granularity of interrupt intervals or something? I am using a preemptable kernel option. A cat /dev/proc whatever it is, shows a 1ms polling rate.

What mouse do have?
CPU and speed?
Any kernel tweaks?
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Sat Feb 05, 2005 8:58 pm    Post subject: Reply with quote

Jagasian wrote:
krejler wrote:

Code:
500
416
750
500
500
1000
1000
1000
500
1000
500
1000


It isn't impossible, but it requires a quick hand. ;)


I tried moving as fast as I can. Maybe it is some other kernel setting that limits the granularity of interrupt intervals or something? I am using a preemptable kernel option. A cat /dev/proc whatever it is, shows a 1ms polling rate.

What mouse do have?
CPU and speed?
Any kernel tweaks?


I use an MX500. My CPU is an Athlon XP 2500+, and I'm currently running a vanilla 2.6.10-kernel. :)

A normal "as-fast-as-i-can" movement produces 500Hz here, too. I had to put some effort into it. Try to be a little more agressive, if possible. ;)
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Tue Feb 08, 2005 1:28 pm    Post subject: Reply with quote

Great news everyone!

I got the "Applied; Thanks" from Vojtech Pavlik yesterday! 8)

Although, I guess it's too late for it to make it into, 2.6.11, since other USB fixes has already been merged... So maybe 2.6.12. :)

No more more patchting! :lol:

EDIT:
My webserver is probably going to have some downtime this weekend.
If you are unable to contact it, the latest patch can be grabbed from LKML:

http://lkml.org/lkml/2005/2/7/142
Back to top
View user's profile Send private message
Jagasian
n00b
n00b


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Feb 19, 2005 8:04 pm    Post subject: Reply with quote

krejler wrote:
Great news everyone!

I got the "Applied; Thanks" from Vojtech Pavlik yesterday! 8)

Although, I guess it's too late for it to make it into, 2.6.11, since other USB fixes has already been merged... So maybe 2.6.12. :)

No more more patchting! :lol:

EDIT:
My webserver is probably going to have some downtime this weekend.
If you are unable to contact it, the latest patch can be grabbed from LKML:

http://lkml.org/lkml/2005/2/7/142


That is great! I have been hacking my kernel for too long. This will really help allot of Linux gamers... and personally, anybody who just wants a smoother mousing experience on the Desktop. Now all Linux needs is quality mouse acceleration, as opposed to this threshold based crap. Windows definitely has better mouse acceleration than Linux because it uses a smooth acceleration curve as opposed to a step function. Then, all that will be needed is a nice Gnome and KDE GUI for tweaking acceleration, sample rate, double-click and other such settings, as well as GUI tools for testing them out, especially a GUI rate reader.
Back to top
View user's profile Send private message
simfox3
n00b
n00b


Joined: 02 Oct 2003
Posts: 1

PostPosted: Sat Feb 19, 2005 11:52 pm    Post subject: Does it work for wireless mice? Reply with quote

Hi,
Does the polling and increasing the dpi work for wireless mices as well?

I patched the kernel, and compiled it w/ 2 ms and it runs fine. /proc/bus/usb/devices also shows that it went to 2ms, but I don't feel a difference.. Should there be? What about the resolution for wireless mice?

Thanks,
Saad
Back to top
View user's profile Send private message
Gentii
Guru
Guru


Joined: 01 Feb 2004
Posts: 306

PostPosted: Sun Feb 20, 2005 1:22 am    Post subject: Reply with quote

The 800 dpi makes you feel a difference, but the usb kernel hack makes you see a difference. The mouse will be indeed a lot smoother on the screen. Try a high value like 20 ms, and then switch again to 2 ms. It's the best way to see exactly what change.
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Sun Feb 20, 2005 1:49 am    Post subject: Reply with quote

Hi all,

Jagasian,
Currently, I think KDE and GNOME's mouse control-panels (or whatever we should call them) are "OK". In my GNOME mice-settings I am able to configure the double-click time, the acceleration, and the sensitivity. I agree that it would be nice with some options for changing the sampling rate (both for ps2 mice, and usb mice), but the psmouse driver has had the "rate" option for as long as I can remember, but there haven't been any options in the desktop enviroments to tweak this, so I doubt this will be any different for USB mice. Of course, unless someone steps up and does this. :)
And oh, about the graphical rate reader. I reckon implementing a tiny GUI on top of your rate-reading tool would be rather trivial. Any takers? ;)

simfox,
They should work just as well on wireless mice, as corded mice. I doubt you are going to gain anything though. The fact that it is wireless, of course, leads to increased latencies, so I doubt your wireless mouse will be as precise as a corded one. :)


And, I'd also like to say, that the old method of peeking inside the "devices" file, in usbfs, is non-working with the new version. The reason for this is, that Vojtech Pavlik informed that, that I should not be changing the descriptor endpoint, as it is to be considered read-only. So, with the new patch, your only option is to check the currently passed parameter, by issuing 'cat /sys/module/usbhid/parameters/mousepoll'.

Farewell. :twisted:
Back to top
View user's profile Send private message
bennettp
Guru
Guru


Joined: 22 Feb 2004
Posts: 335
Location: on my back and tumbling

PostPosted: Sun Feb 20, 2005 7:22 am    Post subject: Reply with quote

Jagasian wrote:
Now all Linux needs is quality mouse acceleration, as opposed to this threshold based crap. Windows definitely has better mouse acceleration than Linux because it uses a smooth acceleration curve as opposed to a step function.

Mouse acceleration is much worse for games. This is a very annoying aspect of winxp: there's no way to disable the acceration in games. I keep acceleration disabled at all times, and I find it much smoother. However, I have the mouse running at 800dpi. At 400dpi, I need to enable acceleration or it's too damn slow!
_________________
Registered Linux User #363420
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Sun Feb 20, 2005 4:52 pm    Post subject: Reply with quote

bennettp wrote:
Jagasian wrote:
Now all Linux needs is quality mouse acceleration, as opposed to this threshold based crap. Windows definitely has better mouse acceleration than Linux because it uses a smooth acceleration curve as opposed to a step function.

Mouse acceleration is much worse for games. This is a very annoying aspect of winxp: there's no way to disable the acceration in games. I keep acceleration disabled at all times, and I find it much smoother. However, I have the mouse running at 800dpi. At 400dpi, I need to enable acceleration or it's too damn slow!


I agree, I hate acceleration too. However, I run my MX500 at 400DPI, and am using 'xset m 0 0' to disable acceleration, which is fine for me. :)
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Wed Feb 23, 2005 1:10 pm    Post subject: Reply with quote

Hi everyone!

I just wanted to say, that the patch now is included with the latest -mm. That's 2.6.11-rc4-mm1, if anyone is interested. :)
Back to top
View user's profile Send private message
mikeraach
Apprentice
Apprentice


Joined: 20 Jan 2003
Posts: 168

PostPosted: Thu Mar 17, 2005 7:47 am    Post subject: Reply with quote

darn...patch fails with latest (2.6.11) gentoo-dev-sources.
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Fri Mar 18, 2005 6:10 pm    Post subject: Reply with quote

mikeraach wrote:
darn...patch fails with latest (2.6.11) gentoo-dev-sources.


Which patch did you try to apply? This is the latest patch: http://lkml.org/lkml/2005/2/7/142.

Everyone, the patch is now in mainline's bk-repository, and has been in the 2.6.11 bitkeeper snapshots since -bk7. The patch will, of course, be in 2.6.12.

Thanks,
krejler :twisted:

EDIT:
And is in 2.6.12-rc1!
Back to top
View user's profile Send private message
MadEgg
l33t
l33t


Joined: 06 Jun 2002
Posts: 678
Location: Netherlands

PostPosted: Mon Mar 28, 2005 2:51 pm    Post subject: Reply with quote

Hmm. I just downloaded the logitech_applet and built it without problems. But it doesn't give me any feedback when I do: 'logitech_applet --get-res', and 'logitech_applet --set-res=xxx' only gives me feedback when I enter a wrong value.
Besides, the README says this:
Quote:

Model Description 400/800 SS CSR
M-BJ58 "Wheel Mouse Optical" Yes No No
...
C-BF16-MSE "MX700 Optical Mouse" No Yes* Yes
...


The MX700 doesn't support resolution switching? Does that mean the the driver is incomplete or that it is always set to 800 DPI?
_________________
Pentium 4 Prescott 3,2 GHz
Asus P4P800 SE, i865PE chipset
1024 MB PC3200 RAM
AOpen Aeolus GeForce 6800 Ultra 256 MB DDR2
Creative Audigy2 ZS
gentoo-sources-2.6.20-r7
nVidia-drivers version 9755
Back to top
View user's profile Send private message
zwergzonk
n00b
n00b


Joined: 06 Apr 2005
Posts: 5

PostPosted: Wed Apr 06, 2005 11:56 am    Post subject: Reply with quote

Ist it still included in 2.6.11-mm4 because I wasn't able to locate the option when configuring the kernel?
Then I additionally applied the patch:
Code:
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|This includes the kernel-parameters.txt-patch, and the hid-core.c-patch, without the extra else-statement.
|
|Thanks,
|Mikkel
|
|Signed-off-by: Mikkel Krautz <krautz@gmail.com>
|---
|--- clean/Documentation/kernel-parameters.txt
|+++ dirty/Documentation/kernel-parameters.txt
--------------------------
Patching file Documentation/kernel-parameters.txt using Plan A...
Hunk #1 succeeded at 74 (offset 1 line).
Hunk #2 succeeded at 1463 (offset 69 lines).
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- clean/drivers/usb/input/hid-core.c
|+++ dirty/drivers/usb/input/hid-core.c
--------------------------
Patching file drivers/usb/input/hid-core.c using Plan A...
Hunk #1 succeeded at 38 (offset 1 line).
Hunk #2 succeeded at 1624 with fuzz 2 (offset -78 lines).
Hmm...  Ignoring the trailing garbage.
done


It should be near "HID Input Layer Support" right? :oops:
Back to top
View user's profile Send private message
krejler
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2003
Posts: 142
Location: Denmark

PostPosted: Wed Apr 06, 2005 1:56 pm    Post subject: Reply with quote

MadEgg wrote:
Hmm. I just downloaded the logitech_applet and built it without problems. But it doesn't give me any feedback when I do: 'logitech_applet --get-res', and 'logitech_applet --set-res=xxx' only gives me feedback when I enter a wrong value.
Besides, the README says this:
Quote:

Model Description 400/800 SS CSR
M-BJ58 "Wheel Mouse Optical" Yes No No
...
C-BF16-MSE "MX700 Optical Mouse" No Yes* Yes
...


The MX700 doesn't support resolution switching? Does that mean the the driver is incomplete or that it is always set to 800 DPI?


I have no idea on that, but it seems like it doesn't.

zwergzonk wrote:
Ist it still included in 2.6.11-mm4 because I wasn't able to locate the option when configuring the kernel?
Then I additionally applied the patch:
Code:
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|This includes the kernel-parameters.txt-patch, and the hid-core.c-patch, without the extra else-statement.
|
|Thanks,
|Mikkel
|
|Signed-off-by: Mikkel Krautz <krautz@gmail.com>
|---
|--- clean/Documentation/kernel-parameters.txt
|+++ dirty/Documentation/kernel-parameters.txt
--------------------------
Patching file Documentation/kernel-parameters.txt using Plan A...
Hunk #1 succeeded at 74 (offset 1 line).
Hunk #2 succeeded at 1463 (offset 69 lines).
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- clean/drivers/usb/input/hid-core.c
|+++ dirty/drivers/usb/input/hid-core.c
--------------------------
Patching file drivers/usb/input/hid-core.c using Plan A...
Hunk #1 succeeded at 38 (offset 1 line).
Hunk #2 succeeded at 1624 with fuzz 2 (offset -78 lines).
Hmm...  Ignoring the trailing garbage.
done


It should be near "HID Input Layer Support" right? :oops:


Yes, it is already in 2.6.11-mm4, if memory serves me correctly. ;-)

Also, this version does not include a Kconfig option, but instead a boot/module-parameter. Consult Documentation/kernel-parameters.txt for more information, or if you have get into trouble, try reading earlier posts in this thread. :-)

If, however, you are dying to get a patch that re-adds the config option, then I made one a while ago: http://omfg.linux.dk/pub/chmp/.
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 Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 8 of 10

 
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