how to set `xinput set-prop` permanently after connected device event
I get the mouse scrolling issue (namely the scrolling is doesn't work) after connected Apple Magic Mouse 2 to my laptop. So I have found one-line workaround:xinput set-prop 14 300 0 0 1
, which comes from:
$ xinput list idanko@mbp
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ bcm5974 id=13 [slave pointer (2)]
⎜ ↳ Illia Danko’s Mouse id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Sleep Button id=10 [slave keyboard (3)]
↳ FaceTime HD Camera (Built-in): id=11 [slave keyboard (3)]
↳ Apple Inc. Apple Internal Keyboard / Trackpad id=12 [slave keyboard (3)
$ xinput list-props 14 idanko@mbp
Device 'Illia Danko’s Mouse':
Device Enabled (149): 1
Coordinate Transformation Matrix (151): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (295): 0
libinput Natural Scrolling Enabled Default (296): 0
libinput Scroll Methods Available (299): 0, 0, 1
libinput Scroll Method Enabled (300): 0, 0, 0
libinput Scroll Method Enabled Default (301): 0, 0, 0
libinput Button Scrolling Button (628): 3
libinput Button Scrolling Button Default (629): 3
libinput Accel Speed (307): -0.525180
libinput Accel Speed Default (308): 0.000000
libinput Accel Profiles Available (630): 1, 1
libinput Accel Profile Enabled (631): 1, 0
libinput Accel Profile Enabled Default (632): 1, 0
libinput Left Handed Enabled (309): 0
libinput Left Handed Enabled Default (310): 0
libinput Send Events Modes Available (272): 1, 0
libinput Send Events Mode Enabled (273): 0, 0
libinput Send Events Mode Enabled Default (274): 0, 0
Device Node (275): "/dev/input/event11"
Device Product ID (276): 76, 617
libinput Drag Lock Buttons (311): <no items>
libinput Horizontal Scroll Enabled (312): 1
but it works only manually and resets all the time when the device is reconnected. So I tried to add the /usr/share/X11/xorg.conf.d/50-magicmouse.conf
with the following content:
Section "InputClass"
Identifier "Apple Magic Mouse" # This can be anything
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
MatchProduct "Illia Danko’s Mouse" # Product name from 'xinput list'
Driver "libinput" # From '.local/share/xorg/Xorg.0.log' after mouse connected
Option "Scroll Method" "edge"
EndSection
but it doesn't work, please point me out what could be wrong
xorg mouse
add a comment |
I get the mouse scrolling issue (namely the scrolling is doesn't work) after connected Apple Magic Mouse 2 to my laptop. So I have found one-line workaround:xinput set-prop 14 300 0 0 1
, which comes from:
$ xinput list idanko@mbp
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ bcm5974 id=13 [slave pointer (2)]
⎜ ↳ Illia Danko’s Mouse id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Sleep Button id=10 [slave keyboard (3)]
↳ FaceTime HD Camera (Built-in): id=11 [slave keyboard (3)]
↳ Apple Inc. Apple Internal Keyboard / Trackpad id=12 [slave keyboard (3)
$ xinput list-props 14 idanko@mbp
Device 'Illia Danko’s Mouse':
Device Enabled (149): 1
Coordinate Transformation Matrix (151): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (295): 0
libinput Natural Scrolling Enabled Default (296): 0
libinput Scroll Methods Available (299): 0, 0, 1
libinput Scroll Method Enabled (300): 0, 0, 0
libinput Scroll Method Enabled Default (301): 0, 0, 0
libinput Button Scrolling Button (628): 3
libinput Button Scrolling Button Default (629): 3
libinput Accel Speed (307): -0.525180
libinput Accel Speed Default (308): 0.000000
libinput Accel Profiles Available (630): 1, 1
libinput Accel Profile Enabled (631): 1, 0
libinput Accel Profile Enabled Default (632): 1, 0
libinput Left Handed Enabled (309): 0
libinput Left Handed Enabled Default (310): 0
libinput Send Events Modes Available (272): 1, 0
libinput Send Events Mode Enabled (273): 0, 0
libinput Send Events Mode Enabled Default (274): 0, 0
Device Node (275): "/dev/input/event11"
Device Product ID (276): 76, 617
libinput Drag Lock Buttons (311): <no items>
libinput Horizontal Scroll Enabled (312): 1
but it works only manually and resets all the time when the device is reconnected. So I tried to add the /usr/share/X11/xorg.conf.d/50-magicmouse.conf
with the following content:
Section "InputClass"
Identifier "Apple Magic Mouse" # This can be anything
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
MatchProduct "Illia Danko’s Mouse" # Product name from 'xinput list'
Driver "libinput" # From '.local/share/xorg/Xorg.0.log' after mouse connected
Option "Scroll Method" "edge"
EndSection
but it doesn't work, please point me out what could be wrong
xorg mouse
1
I'd say more sensible solution would be to create a udev rule that triggersxinput
or have a watchdog script launched upon your GUI login that watches for plug event, and performsxinput
command.
– Sergiy Kolodyazhnyy
May 27 at 20:37
add a comment |
I get the mouse scrolling issue (namely the scrolling is doesn't work) after connected Apple Magic Mouse 2 to my laptop. So I have found one-line workaround:xinput set-prop 14 300 0 0 1
, which comes from:
$ xinput list idanko@mbp
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ bcm5974 id=13 [slave pointer (2)]
⎜ ↳ Illia Danko’s Mouse id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Sleep Button id=10 [slave keyboard (3)]
↳ FaceTime HD Camera (Built-in): id=11 [slave keyboard (3)]
↳ Apple Inc. Apple Internal Keyboard / Trackpad id=12 [slave keyboard (3)
$ xinput list-props 14 idanko@mbp
Device 'Illia Danko’s Mouse':
Device Enabled (149): 1
Coordinate Transformation Matrix (151): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (295): 0
libinput Natural Scrolling Enabled Default (296): 0
libinput Scroll Methods Available (299): 0, 0, 1
libinput Scroll Method Enabled (300): 0, 0, 0
libinput Scroll Method Enabled Default (301): 0, 0, 0
libinput Button Scrolling Button (628): 3
libinput Button Scrolling Button Default (629): 3
libinput Accel Speed (307): -0.525180
libinput Accel Speed Default (308): 0.000000
libinput Accel Profiles Available (630): 1, 1
libinput Accel Profile Enabled (631): 1, 0
libinput Accel Profile Enabled Default (632): 1, 0
libinput Left Handed Enabled (309): 0
libinput Left Handed Enabled Default (310): 0
libinput Send Events Modes Available (272): 1, 0
libinput Send Events Mode Enabled (273): 0, 0
libinput Send Events Mode Enabled Default (274): 0, 0
Device Node (275): "/dev/input/event11"
Device Product ID (276): 76, 617
libinput Drag Lock Buttons (311): <no items>
libinput Horizontal Scroll Enabled (312): 1
but it works only manually and resets all the time when the device is reconnected. So I tried to add the /usr/share/X11/xorg.conf.d/50-magicmouse.conf
with the following content:
Section "InputClass"
Identifier "Apple Magic Mouse" # This can be anything
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
MatchProduct "Illia Danko’s Mouse" # Product name from 'xinput list'
Driver "libinput" # From '.local/share/xorg/Xorg.0.log' after mouse connected
Option "Scroll Method" "edge"
EndSection
but it doesn't work, please point me out what could be wrong
xorg mouse
I get the mouse scrolling issue (namely the scrolling is doesn't work) after connected Apple Magic Mouse 2 to my laptop. So I have found one-line workaround:xinput set-prop 14 300 0 0 1
, which comes from:
$ xinput list idanko@mbp
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ bcm5974 id=13 [slave pointer (2)]
⎜ ↳ Illia Danko’s Mouse id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Sleep Button id=10 [slave keyboard (3)]
↳ FaceTime HD Camera (Built-in): id=11 [slave keyboard (3)]
↳ Apple Inc. Apple Internal Keyboard / Trackpad id=12 [slave keyboard (3)
$ xinput list-props 14 idanko@mbp
Device 'Illia Danko’s Mouse':
Device Enabled (149): 1
Coordinate Transformation Matrix (151): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (295): 0
libinput Natural Scrolling Enabled Default (296): 0
libinput Scroll Methods Available (299): 0, 0, 1
libinput Scroll Method Enabled (300): 0, 0, 0
libinput Scroll Method Enabled Default (301): 0, 0, 0
libinput Button Scrolling Button (628): 3
libinput Button Scrolling Button Default (629): 3
libinput Accel Speed (307): -0.525180
libinput Accel Speed Default (308): 0.000000
libinput Accel Profiles Available (630): 1, 1
libinput Accel Profile Enabled (631): 1, 0
libinput Accel Profile Enabled Default (632): 1, 0
libinput Left Handed Enabled (309): 0
libinput Left Handed Enabled Default (310): 0
libinput Send Events Modes Available (272): 1, 0
libinput Send Events Mode Enabled (273): 0, 0
libinput Send Events Mode Enabled Default (274): 0, 0
Device Node (275): "/dev/input/event11"
Device Product ID (276): 76, 617
libinput Drag Lock Buttons (311): <no items>
libinput Horizontal Scroll Enabled (312): 1
but it works only manually and resets all the time when the device is reconnected. So I tried to add the /usr/share/X11/xorg.conf.d/50-magicmouse.conf
with the following content:
Section "InputClass"
Identifier "Apple Magic Mouse" # This can be anything
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
MatchProduct "Illia Danko’s Mouse" # Product name from 'xinput list'
Driver "libinput" # From '.local/share/xorg/Xorg.0.log' after mouse connected
Option "Scroll Method" "edge"
EndSection
but it doesn't work, please point me out what could be wrong
xorg mouse
xorg mouse
edited May 27 at 20:27
asked May 27 at 15:25
ilyuha21st
213
213
1
I'd say more sensible solution would be to create a udev rule that triggersxinput
or have a watchdog script launched upon your GUI login that watches for plug event, and performsxinput
command.
– Sergiy Kolodyazhnyy
May 27 at 20:37
add a comment |
1
I'd say more sensible solution would be to create a udev rule that triggersxinput
or have a watchdog script launched upon your GUI login that watches for plug event, and performsxinput
command.
– Sergiy Kolodyazhnyy
May 27 at 20:37
1
1
I'd say more sensible solution would be to create a udev rule that triggers
xinput
or have a watchdog script launched upon your GUI login that watches for plug event, and performs xinput
command.– Sergiy Kolodyazhnyy
May 27 at 20:37
I'd say more sensible solution would be to create a udev rule that triggers
xinput
or have a watchdog script launched upon your GUI login that watches for plug event, and performs xinput
command.– Sergiy Kolodyazhnyy
May 27 at 20:37
add a comment |
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040926%2fhow-to-set-xinput-set-prop-permanently-after-connected-device-event%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040926%2fhow-to-set-xinput-set-prop-permanently-after-connected-device-event%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I'd say more sensible solution would be to create a udev rule that triggers
xinput
or have a watchdog script launched upon your GUI login that watches for plug event, and performsxinput
command.– Sergiy Kolodyazhnyy
May 27 at 20:37