Mouse sensitivity?
-
Playing Starcraft through the RetroPie-Extra script. Works great -- mouse is quite jumpy. It plays through
wine
-- I don't knowwine
. Is there a way in wine and/or Linux to adjust the mouse sensitivity & slow it down a bit? I must be googling wrong because all my results just say "no you're wrong, wine doesn't have mouse acceleration." I didn't search for "acceleration", I just want to reduce the sensitivity. -
I find this info to disable mouse acceleration but i haven't test it:
To disable mouse acceleration completely:
1)Open
/boot/cmdline.txt
in a text editor
2)Add to the command lineusbhid.mousepoll=0
3)Reboot -
@windg that's...a little better? Maybe? Hard to tell, still pretty fast. Really I just want to slow the whole thing down. Any "acceleration" (I'm using that right, right? That means, like, that the mouse pointer onscreen moves more pixels-per-inch drug across my table when I move it fast, than when I move it slow, right?) that can actually stay, I'm not too concerned with that aspect...I just want the whole thing to go more slower all of the time.
-
@sleve_mcdichael Look into
xset
/xinput
to control the mouse acceleration/sensitivity - see https://wiki.archlinux.org/title/Mouse_acceleration. -
2.2 Using xinput
This looks like probably what I need, but...
$ xinput list -bash: xinput: command not found $ sudo apt install xinput [ ... ] $ xinput list Unable to connect to X server
I guess I need to be inside the X environment to make this work? Not sure where to go from here. How do I test and, ultimately, implement this? Do I need to have the full desktop and do it in a console window? For applying it, that link suggests putting the commands in
~/.xinitrc
, but what if I only want it for some games, or different settings per game, will that be possible? -
Aren't you already running
starcraft
viawine
from the desktop ? -
@mitu said in Mouse sensitivity?:
Aren't you already running
starcraft
viawine
from the desktop ?No, I'm launching it by runcommand with a helper script (adapted from the scripts at RetroPie-Extra):
starcraft = "XINIT:/opt/retropie/ports/starcraft/starcraftr.sh"
starcraftr.sh
:#!/bin/bash xset -dpms s off s noblank matchbox-window-manager -use_titlebar no & cd "/opt/retropie/ports/starcraft/data" && ./starcraft.sh
starcraft.sh
:#!/bin/bash LD_LIBRARY_PATH=. setarch linux32 -L wine libscr_sa_arm.exe.so
-
@sleve_mcdichael The 1st script starts a minimal desktop env from X11. You can add the
xset
/xinput
commands in the 1st script, before starting Starcraft. -
Huzzah! After a little bit of
grep
and quite some trial-and-error, I found:$ xinit -- vt1 -keeptty
(Side note: while this works, it uses a small corner of the screen. How to make this full screen?)
With that, I was able to use
xinput list
andlist-prop
and get the device name and properties unique to my setup. This led me to:$ xinput set-prop 'USB Optical Mouse' 'libinput Accel Speed' -0.25
This immediately slows the on-screen pointer by roughly 25% (acceptable values seem to range -1.0 to 1.0, and default is 0.0).
Alternatively:
$ xinput set-prop 6 275 -0.25
...also works, if I were confident the device number won't ever change. I don't know what happens if I reboot, or plug/unplug additional devices etc., though, so I stick with using the name.
Now,
starcraftr.sh
:#!/bin/bash xset -dpms s off s noblank xinput --set-prop 'USB Optical Mouse' 'libinput Accel Speed' -0.25 matchbox-window-manager -use_titlebar no & cd "/opt/retropie/ports/starcraft/data" && ./starcraft.sh
(The trailing
&
used in the example was not necessary)This worked, but still a little fast and so I dropped it down again to
-0.5
. Now that feels more like what I'm used to.Now, let's say I am a user who can't or don't want to alter the root-owned
starcraftr.sh
in the install folder. Or, maybe I just don't want to lose my custom setting to a reinstall. So I copy it into config dir at/opt/retropie/configs/ports/starcraft/starcraftr-slowmouse.sh
, make the edits there, and then editemulators.cfg
like:default = "starcraft-slowmouse" starcraft-slowmouse = "XINIT:/opt/retropie/configs/ports/starcraft/starcraftr-slowmouse.sh"
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.