RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Mouse sensitivity?

    Scheduled Pinned Locked Moved Help and Support
    linuxwinemousespeed
    9 Posts 3 Posters 786 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sleve_mcdichael
      last edited by

      Playing Starcraft through the RetroPie-Extra script. Works great -- mouse is quite jumpy. It plays through wine -- I don't know wine. 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.

      1 Reply Last reply Reply Quote 0
      • windgW
        windg
        last edited by windg

        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 line usbhid.mousepoll=0
        3)Reboot

        My English isn't at a good level.

        S 1 Reply Last reply Reply Quote 0
        • S
          sleve_mcdichael @windg
          last edited by sleve_mcdichael

          @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.

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @sleve_mcdichael
            last edited by

            @sleve_mcdichael Look into xset/xinput to control the mouse acceleration/sensitivity - see https://wiki.archlinux.org/title/Mouse_acceleration.

            S 1 Reply Last reply Reply Quote 1
            • S
              sleve_mcdichael @mitu
              last edited by sleve_mcdichael

              @mitu

              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?

              1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator
                last edited by

                Aren't you already running starcraft via wine from the desktop ?

                S 1 Reply Last reply Reply Quote 0
                • S
                  sleve_mcdichael @mitu
                  last edited by sleve_mcdichael

                  @mitu said in Mouse sensitivity?:

                  Aren't you already running starcraft via wine 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
                  
                  
                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @sleve_mcdichael
                    last edited by

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • S
                      sleve_mcdichael
                      last edited by sleve_mcdichael

                      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 and list-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 edit emulators.cfg like:

                      default = "starcraft-slowmouse"
                      starcraft-slowmouse = "XINIT:/opt/retropie/configs/ports/starcraft/starcraftr-slowmouse.sh"
                      
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      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.