Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Moderators: 666philb, Forum moderators

Post Reply
mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by mow9902 »

Using Fossapup64 frugal install with kernel 5.4.53 on old DELL latitude laptop. All runs well

I realize I can change mouse sensitivity using the standard menu options ie Setup Mouse/keyboard, but the changes only apply for the current session. How can I make the setting permanent and also apply for future sessions?

Guidance appreciated - thanks

Last edited by bigpup on Wed Oct 05, 2022 6:11 pm, edited 2 times in total.
Reason: added info to subject to show this is a bug fix needed
Burunduk
Posts: 252
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: Command to Set Mouse Sensitivity?

Post by Burunduk »

mow9902 wrote: Mon Aug 22, 2022 11:08 pm

I realize I can change mouse sensitivity using the standard menu options ie Setup Mouse/keyboard, but the changes only apply for the current session.

You are probably talking about the "Input Wizard". The program tells you the settings are for this session only. This is not exactly true. They are stored in the /root/.xset.sh file and loaded when the X server starts. However, the "Input Wizard" in Fossapup64 has a problem and needs to be fixed.

If you want to fix the wizard, run this command in the terminal:

Code: Select all

sed -i 's/LANG=C dc ${MOUSEACCEL} 10 \\\* p/LANG=C dc -e "${MOUSEACCEL} 10 * 1 \/ p"/' /usr/sbin/input-wizard

Or edit the /root/.xset.sh file in a text editor. It should contain the xset m command. If not, add one:

Code: Select all

LANG=C xset m 50/10 4

where 50/10 = 5 -- Acceleration; 4 -- Threshold

@dimkr

There is a little problem with the input-wizard It has been fixed with this commit only partially. It calls dc one more time:

Code: Select all

203c203
< 		MOUSEACCX10=`LANG=C dc ${MOUSEACCEL} 10 \* p` #130209
---
> 		MOUSEACCX10=`LANG=C dc -e "${MOUSEACCEL} 10 * 1 / p"` #130209

Note: 1/ is added to get rid of trailing .0 This is needed because xset expects an integer:

Code: Select all

root# xset m 20.0/10 4
root# xset q
 ...
  acceleration:  20/1    threshold:  4
 ...
root# xset m 20/10 4
root# xset q
 ...
  acceleration:  20/10    threshold:  4
 ...
mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: Command to Set Mouse Sensitivity? - Solved

Post by mow9902 »

Thanks Burunduk

All good.

User avatar
peppyy
Posts: 330
Joined: Fri Jan 22, 2021 2:11 pm
Location: VT USA
Has thanked: 66 times
Been thanked: 28 times

Re: Command to Set Mouse Sensitivity? - Solved

Post by peppyy »

@Burunduk

Just got a new mouse and couldn't slow it down.
Your terminal command seems to have cured the problem in fossa-64. Thanks.

Puppy Linux. It just works!
Foassapup 9.5 64-(Frugal) Mobo, M5A99FX PRO - CPU, AMD FX-6300 6 core - mem,32GB - Storage
ssd 128GB M4 - ssd-256GB APS - ssd-1TB PNY - GPU GeForce GTX 1060 GAMING X 6G. Yes it's a Mutt.

bob93
Posts: 53
Joined: Fri Nov 25, 2022 8:29 am
Location: Fossapup64 9.5
Has thanked: 21 times
Been thanked: 1 time

Re: Command to Set Mouse Sensitivity?

Post by bob93 »

Burunduk wrote: Tue Aug 23, 2022 8:29 pm
mow9902 wrote: Mon Aug 22, 2022 11:08 pm

I realize I can change mouse sensitivity using the standard menu options ie Setup Mouse/keyboard, but the changes only apply for the current session.

You are probably talking about the "Input Wizard". The program tells you the settings are for this session only. This is not exactly true. They are stored in the /root/.xset.sh file and loaded when the X server starts. However, the "Input Wizard" in Fossapup64 has a problem and needs to be fixed.

If you want to fix the wizard, run this command in the terminal:

Code: Select all

sed -i 's/LANG=C dc ${MOUSEACCEL} 10 \\\* p/LANG=C dc -e "${MOUSEACCEL} 10 * 1 \/ p"/' /usr/sbin/input-wizard

Or edit the /root/.xset.sh file in a text editor. It should contain the xset m command. If not, add one:

Code: Select all

LANG=C xset m 50/10 4

where 50/10 = 5 -- Acceleration; 4 -- Threshold

@dimkr

There is a little problem with the input-wizard It has been fixed with this commit only partially. It calls dc one more time:

Code: Select all

203c203
< 		MOUSEACCX10=`LANG=C dc ${MOUSEACCEL} 10 \* p` #130209
---
> 		MOUSEACCX10=`LANG=C dc -e "${MOUSEACCEL} 10 * 1 / p"` #130209

Note: 1/ is added to get rid of trailing .0 This is needed because xset expects an integer:

Code: Select all

root# xset m 20.0/10 4
root# xset q
 ...
  acceleration:  20/1    threshold:  4
 ...
root# xset m 20/10 4
root# xset q
 ...
  acceleration:  20/10    threshold:  4
 ...

Hello, I'm new to Fossa and the mouse sensitivity is too fast, I use the input wizard to set acceleration and threshold to the lowest levels but it's still too fast. What can I do, is there a file I can edit or something to actually reduce the speed of the mouse? thanks a lot

Fossapup64 9.5

Burunduk
Posts: 252
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by Burunduk »

The input wizard doesn't work in Fossapup and probably some other puppy versions. Maybe @dimkr or someone else can fix the second dc command [↑] in this script in woof-ce. I don't have an account there.

The attached pet package includes the fixed version of the input wizard script.
Download and install it. After this try to use the wizard again.

Attachments
input-wizard-fix.pet
for Fossapup64 9.5
(4.28 KiB) Downloaded 81 times
dimkr
Posts: 2423
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 53 times
Been thanked: 1202 times

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by dimkr »

Please open a pull request to https://github.com/puppylinux-woof-CE/woof-CE with the fix, and open remaining issues in https://github.com/puppylinux-woof-CE/woof-CE/issues. I'm overloaded with requests for help with troubleshooting and guidance.

bob93
Posts: 53
Joined: Fri Nov 25, 2022 8:29 am
Location: Fossapup64 9.5
Has thanked: 21 times
Been thanked: 1 time

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by bob93 »

Burunduk wrote: Fri Nov 25, 2022 10:39 am

The input wizard doesn't work in Fossapup and probably some other puppy versions. Maybe @dimkr or someone else can fix the second dc command [↑] in this script in woof-ce. I don't have an account there.

The attached pet package includes the fixed version of the input wizard script.
Download and install it. After this try to use the wizard again.

Thank you, but it doesnt work. Its still just as fast

Fossapup64 9.5

User avatar
mikewalsh
Moderator
Posts: 6160
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by mikewalsh »

The way I've dealt with mouse speeds for years is to use a mouse with multiple levels of user-selectable DPI. This way, it makes no difference what sensitivity your Puppy's settings are stuck on, you can usually adjust things to a reasonable level via the mouse's DPI control.

(I know it's basically applying a band-aid as opposed to 'fixing' the cause, but hey! if it works..... ) :D

News to me that Fossapup64 has this problem. I can't say as I've actually noticed it.

(*shrug*)

Mike. ;)

bob93
Posts: 53
Joined: Fri Nov 25, 2022 8:29 am
Location: Fossapup64 9.5
Has thanked: 21 times
Been thanked: 1 time

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by bob93 »

mikewalsh wrote: Sun Dec 04, 2022 8:59 pm

The way I've dealt with mouse speeds for years is to use a mouse with multiple levels of user-selectable DPI. This way, it makes no difference what sensitivity your Puppy's settings are stuck on, you can usually adjust things to a reasonable level via the mouse's DPI control.

(I know it's basically applying a band-aid as opposed to 'fixing' the cause, but hey! if it works..... ) :D

News to me that Fossapup64 has this problem. I can't say as I've actually noticed it.

(*shrug*)

Mike. ;)

hmmm you give me an idea. Perhaps I should find out what dpi my generic mouse is and then get one with a lower dpi. Should be cheaper than buying an adjustable one. How do I find out my mouse dpi? it's a no name optical usb mouse. I'm having a look at hardinfo under usb devices and I can't find it

Fossapup64 9.5

Burunduk
Posts: 252
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by Burunduk »

bob93 wrote: Sun Dec 04, 2022 8:14 pm

Thank you, but it doesnt work. Its still just as fast

Could you elaborate how exactly it doesn't work? Can you use the input wizard to make the mouse pointer even faster? Or the settings you make there have absolutely no effect?
The input wizard is just a front-end for xset mouse command. You can try to run the command in the terminal to see if it works. For example, this makes the mouse pointer on my computer very slow:

Code: Select all

xset m 1/2 0

If the mouse is still not slow enough, you can try another command:

Code: Select all

xinput set-prop <mouse-id> 'Device Accel Constant Deceleration' 2.5

The higher is the number the slower is the mouse (2.5 is the default, set it to 5 or 10)
To find the <mouse-id> run the xinput list command. The detailed explanation is here
If this command works, put it in a script in the /root/Startup directory.

bob93
Posts: 53
Joined: Fri Nov 25, 2022 8:29 am
Location: Fossapup64 9.5
Has thanked: 21 times
Been thanked: 1 time

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by bob93 »

Burunduk wrote: Wed Dec 07, 2022 4:58 am

Could you elaborate how exactly it doesn't work? Can you use the input wizard to make the mouse pointer even faster? Or the settings you make there have absolutely no effect?
The input wizard is just a front-end for xset mouse command. You can try to run the command in the terminal to see if it works. For example, this makes the mouse pointer on my computer very slow:

Code: Select all

xset m 1/2 0

No noticeable change in Fossa. In Xenial I had it set to 0/10 0 which I think is the lowest. It made a little difference but was still too fast...

Burunduk wrote: Wed Dec 07, 2022 4:58 am

If the mouse is still not slow enough, you can try another command:

Code: Select all

xinput set-prop <mouse-id> 'Device Accel Constant Deceleration' 2.5

The higher is the number the slower is the mouse (2.5 is the default, set it to 5 or 10)
To find the <mouse-id> run the xinput list command. The detailed explanation is here

That command made no change either, no matter the value. However this one worked for me:

Code: Select all

xinput --set-prop 7 'Coordinate Transformation Matrix' 0.5 0 0 0 0.5 0 0 0 1

where the key number is the 0.5. The lower the decimal the slower.

Now I just have to switch to Fossa (I'm in Xenial atm), use the same command and make it permanent. Wouldn't have found it if you had not hinted me. Now I don't have to spend on a fancy adjustable DPI mouse! Thanks a lot

Fossapup64 9.5

bob93
Posts: 53
Joined: Fri Nov 25, 2022 8:29 am
Location: Fossapup64 9.5
Has thanked: 21 times
Been thanked: 1 time

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by bob93 »

Burunduk wrote: Wed Dec 07, 2022 4:58 am

If this command works, put it in a script in the /root/Startup directory.

I'm sorry I'm such a noob. How do I go about making that script? I went to /root/Startup > right click > New > Script, named it, and then edited it and put this in it

Code: Select all

#!/bin/sh

exec urxvt xinput --set-prop 10 'Coordinate Transformation Matrix' 0.3 0 
0 0 0.3 0 0 0 1

Also tried without 'exec urvxt' at the beginning

I tested wether it works by going to Exit > Restart graphical server.
It doesn't work. I must be missing something pretty basic here. What is it?

Fossapup64 9.5

Burunduk
Posts: 252
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by Burunduk »

The command that works in the terminal should also work in a script.

exec urxvt is not needed and the whole command should be on the same line.

Code: Select all

#!/bin/sh

xinput --set-prop 10 'Coordinate Transformation Matrix' 0.3 0 0 0 0.3 0 0 0 1

To test the script you can just click it in the rox window. Or run /root/Startup/your-script-name in the terminal to see if it throws some errors.

bob93
Posts: 53
Joined: Fri Nov 25, 2022 8:29 am
Location: Fossapup64 9.5
Has thanked: 21 times
Been thanked: 1 time

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by bob93 »

oh, now I see.
In trying to enable word wrap in geany I had changed something else that was causing the lines to actually split. Fixed it and now the script works on startup. Good stuff, thanks

Fossapup64 9.5

bob93
Posts: 53
Joined: Fri Nov 25, 2022 8:29 am
Location: Fossapup64 9.5
Has thanked: 21 times
Been thanked: 1 time

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by bob93 »

Coming back to this thread for one little thing. The mouse has worked nicely after adding the command to startup folder.
However, if I unplug the mouse and plug it again, it goes back to not working properly. So the question is how can I make this command run automatically not only when the system starts, but when the mouse is plugged in? Hopefully there's a way

Fossapup64 9.5

User avatar
MochiMoppel
Posts: 1236
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 439 times

Re: Command to Set Mouse Sensitivity?

Post by MochiMoppel »

bob93 wrote: Sun Oct 08, 2023 2:55 am

So the question is how can I make this command run automatically not only when the system starts, but when the mouse is plugged in? Hopefully there's a way

Automatically?
If you are ready to invest some work it may be possible: How to Execute a Shell Script When a USB Device Is Plugged

Manually and considerably easier:
Drag the script you have created for the startup folder to the desktop and click on the desktop icon whenever you have reconnected your mouse.

User avatar
rockedge
Site Admin
Posts: 6543
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2624 times
Contact:

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by rockedge »

The XFCE4 desktop has a volume manager that can be configured to run shell scripts or other commands when a USB drive is plugged in.

Perhaps there is a way to look at the Puppy Linux's volume manager to do something similar when a plug in event occurs?

User avatar
MochiMoppel
Posts: 1236
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 439 times

Re: Command to Set Mouse Sensitivity? - Solved with bug fix for Input Wizard

Post by MochiMoppel »

rockedge wrote: Mon Oct 09, 2023 2:28 pm

The XFCE4 desktop has a volume manager that can be configured to run shell scripts or other commands when a USB drive is plugged in.
Perhaps there is a way to look at the Puppy Linux's volume manager to do something similar when a plug in event occurs?

Should be possible. For example Puppy's event manager adds a drive icon to the ROX desktop whenever a new USB drive is plugged in. IIRC it also checks free storage space every 4 sec. and updates the freemem icon, so it may well be tweaked to handle other events.

From the configuration file /etc/eventmanager:

# * configuration file for 'events' in Puppy.
# * this file is read/written by /usr/sbin/eventmanager.
# * hotplug events are triggered by a rule in /etc/udev/rules.d/50-udev-puppy-basic.rules
# * events are handled by the /usr/local/pup_event/frontend_* scripts
# * /sbin/pup_event_frontend_d calls frontend_startup

Post Reply

Return to “Fossapup64”