Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magic Mouse Scrolling not working in Ubuntu 19.04 #38

Open
ddalida opened this issue May 2, 2019 · 43 comments
Open

Magic Mouse Scrolling not working in Ubuntu 19.04 #38

ddalida opened this issue May 2, 2019 · 43 comments

Comments

@ddalida
Copy link

ddalida commented May 2, 2019

I had this module working in 18.04 with the 4.20... kernel without issues. I know it has been implemented into the release but the scrolling isn't working. I've tried rmmod and insmod under the 5.0.0-13 kernel with 19.04 but no joy. This is with the Magic Mouse 2 and not the trackpad.

Am I missing something? Any info that could be relevant I can provide?

@ddalida
Copy link
Author

ddalida commented May 2, 2019

This is what gets loaded at startup (lsmod | grep hid):

hid_apple 16384 0
hidp 28672 2
hid_generic 16384 0
bluetooth 557056 40 btrtl,hidp,btintel,btbcm,bnep,btusb,rfcomm
usbhid 53248 0
mac_hid 16384 0
hid_magicmouse 20480 0
hid 126976 5 hidp,usbhid,hid_apple,hid_generic,hid_magicmouse

@stubbulon5
Copy link

(--Moving from a closed issue--)

@romanAbrahamovic how much work would supporting Magic Mouse 2 take? (Enabling scrolling, that is)

I recon there would be many Linux users happy to buy you a coffee if you got this working...

@djhoese
Copy link

djhoese commented Sep 5, 2019

I found that there is a branch in @rohitpid's fork that is at least a start on getting MM2 to work, but I haven't tested it: https://github.com/rohitpid/Linux-Magic-Trackpad-2-Driver/tree/magicmouse2

@mrdev023
Copy link

It work i tested

@stubbulon5
Copy link

It work i tested

You mean Magi Mouse 2 scrolling with the above repository link?

@stubbulon5
Copy link

I found that there is a branch in @rohitpid's fork that is at least a start on getting MM2 to work, but I haven't tested it: https://github.com/rohitpid/Linux-Magic-Trackpad-2-Driver/tree/magicmouse2

I tested it today, and it worked! thanks @rohitpid

@jeffywu
Copy link

jeffywu commented Jan 2, 2020

Hi, wondering if anyone can help with debugging an issue on this magicmouse2 driver. I'm using the fork from @rohitpid, unfortunately there's no way to file issues on that repo so I'm commenting here. The mouse connects over bluetooth successfully every time but the scroll wheel does not work until I reload the driver using:

sudo rmmod hid_magicmouse
sudo insmod /lib/modules/5.3.0-7625-generic/updates/dkms/hid-magicmouse.ko

These are the logs in ~/.local/share/xorg/Xorg.1.log:

[    30.156] (II) config/udev: Adding input device Home Mouse (/dev/input/mouse1)
[    30.156] (II) No input driver specified, ignoring this device.
[    30.156] (II) This device may have been added with another device file.
[    30.212] (II) config/udev: Adding input device Home Mouse (/dev/input/event14)
[    30.212] (**) Home Mouse: Applying InputClass "libinput pointer catchall"
[    30.212] (II) Using input driver 'libinput' for 'Home Mouse'
[    30.213] (II) systemd-logind: got fd for /dev/input/event14 13:78 fd 60 paused 0
[    30.213] (**) Home Mouse: always reports core events
[    30.213] (**) Option "Device" "/dev/input/event14"
[    30.213] (**) Option "_source" "server/udev"
[    30.217] (II) event14 - Home Mouse: is tagged by udev as: Mouse
[    30.217] (EE) event14 - Home Mouse: libinput bug: kernel fuzz of 4 but LIBINPUT_FUZZ_35 is missing
[    30.217] (EE) event14 - Home Mouse: libinput bug: kernel fuzz of 4 but LIBINPUT_FUZZ_36 is missing
[    30.217] (II) event14 - Home Mouse: device is a pointer
[    30.218] (II) event14 - Home Mouse: device removed
[    30.218] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/bluetooth/hci0/hci0:256/0005:004C:0269.0001/input/input23/event14"
[    30.218] (II) XINPUT: Adding extended input device "Home Mouse" (type: MOUSE, id 12)
[    30.220] (**) Option "AccelerationScheme" "none"
[    30.221] (**) Home Mouse: (accel) selected scheme none/0
[    30.221] (**) Home Mouse: (accel) acceleration factor: 2.000
[    30.221] (**) Home Mouse: (accel) acceleration threshold: 4
[    30.224] (II) event14 - Home Mouse: is tagged by udev as: Mouse
[    30.224] (EE) event14 - Home Mouse: libinput bug: kernel fuzz of 4 but LIBINPUT_FUZZ_35 is missing
[    30.224] (EE) event14 - Home Mouse: libinput bug: kernel fuzz of 4 but LIBINPUT_FUZZ_36 is missing
[    30.225] (II) event14 - Home Mouse: device is a pointer
[    61.796] (II) config/udev: removing device Home Mouse
[    61.796] (**) Option "fd" "60"
[    61.796] (II) event14 - Home Mouse: device removed
[    61.803] (II) UnloadModule: "libinput"
[    61.803] (II) systemd-logind: releasing fd for 13:78
[    61.830] (II) config/udev: Adding input device Home Mouse (/dev/input/mouse1)
[    61.831] (II) No input driver specified, ignoring this device.
[    61.831] (II) This device may have been added with another device file.
[    61.875] (II) config/udev: Adding input device Home Mouse (/dev/input/event14)
[    61.876] (**) Home Mouse: Applying InputClass "libinput pointer catchall"
[    61.876] (II) Using input driver 'libinput' for 'Home Mouse'
[    61.889] (EE) systemd-logind: failed to take device /dev/input/event14: No such device
[    61.889] (**) Home Mouse: always reports core events
[    61.889] (**) Option "Device" "/dev/input/event14"
[    61.889] (**) Option "_source" "server/udev"
[    61.889] (EE) xf86OpenSerial: Cannot open device /dev/input/event14
	Permission denied.
[    61.889] (II) event14: opening input device '/dev/input/event14' failed (Permission denied).
[    61.889] (II) event14 - failed to create input device '/dev/input/event14'.
[    61.889] (EE) libinput: Home Mouse: Failed to create a device for /dev/input/event14
[    61.889] (EE) PreInit returned 2 for "Home Mouse"
[    61.889] (II) UnloadModule: "libinput"
[    61.891] (II) config/udev: Adding input device Home Mouse (/dev/input/event15)
[    61.891] (II) No input driver specified, ignoring this device.
[    61.891] (II) This device may have been added with another device file.
[    61.984] (II) config/udev: Adding input device Home Mouse (/dev/input/mouse1)
[    61.984] (II) No input driver specified, ignoring this device.
[    61.984] (II) This device may have been added with another device file.
[    62.060] (II) config/udev: Adding input device Home Mouse (/dev/input/event14)
[    62.060] (**) Home Mouse: Applying InputClass "libinput pointer catchall"
[    62.060] (II) Using input driver 'libinput' for 'Home Mouse'
[    62.066] (II) systemd-logind: got fd for /dev/input/event14 13:78 fd 68 paused 0
[    62.066] (**) Home Mouse: always reports core events
[    62.066] (**) Option "Device" "/dev/input/event14"
[    62.066] (**) Option "_source" "server/udev"
[    62.069] (II) event14 - Home Mouse: is tagged by udev as: Mouse
[    62.069] (EE) event14 - Home Mouse: libinput bug: kernel fuzz of 4 but LIBINPUT_FUZZ_35 is missing
[    62.069] (EE) event14 - Home Mouse: libinput bug: kernel fuzz of 4 but LIBINPUT_FUZZ_36 is missing
[    62.070] (II) event14 - Home Mouse: device is a pointer
[    62.070] (II) event14 - Home Mouse: device removed
[    62.070] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/bluetooth/hci0/hci0:256/0005:004C:0269.0001/input/input26/event14"
[    62.070] (II) XINPUT: Adding extended input device "Home Mouse" (type: MOUSE, id 12)
[    62.072] (**) Option "AccelerationScheme" "none"
[    62.074] (**) Home Mouse: (accel) selected scheme none/0
[    62.074] (**) Home Mouse: (accel) acceleration factor: 2.000
[    62.074] (**) Home Mouse: (accel) acceleration threshold: 4
[    62.077] (II) event14 - Home Mouse: is tagged by udev as: Mouse
[    62.077] (EE) event14 - Home Mouse: libinput bug: kernel fuzz of 4 but LIBINPUT_FUZZ_35 is missing
[    62.077] (EE) event14 - Home Mouse: libinput bug: kernel fuzz of 4 but LIBINPUT_FUZZ_36 is missing
[    62.077] (II) event14 - Home Mouse: device is a pointer

@djhoese
Copy link

djhoese commented Jan 2, 2020

I had the same issue and my mouse would randomly disconnect. I ended up getting rid of my magic mouse and switched to a logitech bluetooth mouse after I couldn't find a solution to the scrolling issue. You may have luck with the "unstable" branch mentioned above.

@RicardoEPRodrigues
Copy link

RicardoEPRodrigues commented Feb 3, 2020

Hello, I have been scrolling through several of these issues and found some solutions, I decided to pick some of them up and compiled them. Can you please try my solution out?

https://github.com/RicardoEPRodrigues/Linux-Magic-Trackpad-2-Driver

This should fix 2 problems: Magic Mouse 2 driver not loading after reconnection and random Bluetooth disconnections.

@jeffywu
Copy link

jeffywu commented Feb 5, 2020

@RicardoEPRodrigues, thanks! I tested out your instructions and they worked well. A couple minor suggestions. This udev configuration works well for me, in your version the second line is missing a comma and a backslash I believe.

SUBSYSTEMS=="input", \
    ATTRS{name}=="XXX", \
    ACTION=="add", \
    SYMLINK+="input/magicmouse", \
    RUN+="/opt/magic-mouse-fix/magic-mouse-2-add.sh"

I was able to view the properties on the mouse via dbus:
dbus-send --system --print-reply --type=method_call --dest=org.bluez / org.freedesktop.DBus.ObjectManager.GetManagedObjects

@RicardoEPRodrigues
Copy link

Hello, thank you for the input! I updated the udev rule. I hope it now works correctly:

SUBSYSTEMS=="usb", \
    ATTRS{idProduct}=="e300", \
    ACTION=="add", \
    SYMLINK+="input/magicmouse", \
    RUN+="/opt/magic-mouse-fix/magic-mouse-2-add.sh"

Correct me if I'm wrong, but I think this rule goes like: "if an usb device with the product id of e300 is detected (the ID is the one from the Magic Mouse) then load an input driver for that device".

I read more info on the device based on this command udevadm info -a -p $(udevadm info -q path -n /dev/input/eventXX). Change the /dev/input/eventXX with the correct device in your OS.

@RicardoEPRodrigues
Copy link

Hello again, sorry for the SPAM.

My solution doesn't work as is. The way I was trying to do things was to read an id from usb1/X-X which is specific to the PC and not the mouse.

I trying to find a solution. If we can find a Magic Mouse 2 ID in the udev info then we can change the rule and the solution should work for everyone.

If not, then I'm trying to find an ID in the Bluetooth info, with that we can have a script running every time an input device is plugged in, but that script will only load the drive if that device is a Magic Mouse 2.

You can help me by posting a file with the output of this command udevadm info -a -p $(udevadm info -q path -n /dev/input/eventXX), where you need to change the /dev/input/eventXX with the XX corresponding with the Magic Mouse 2.

@RicardoEPRodrigues
Copy link

Ok, I figured it out.

I rewrote the rule to catch all the Magic Mouse 2. FINALLY. Check this out:

SUBSYSTEM=="input", \
    KERNEL=="mouse*", \
    KERNELS=="0005:004C:0269*", \
    ACTION=="add", \
    SYMLINK+="input/magicmouse-%k", \
    RUN+="/opt/magic-mouse-fix/magic-mouse-2-add.sh"

Remember to try my ./install in my repo. Any input is good input.

@jeffywu
Copy link

jeffywu commented Feb 10, 2020

The second rule works for me. Thanks for your effort!

@ralphsc
Copy link

ralphsc commented Jun 11, 2020

This isn't working on Elementary OS 5.1.5. Here's the steps I'm taking. Move the original kernel driver hid-magicmouse.ko from my 5.3.0-59-generic kernel and running "depmod -a" then reboot. After the system comes back up I'm following the install instructions (git clone and then running the install.sh as root) and reboot. When the system is back up and I click the mouse it is seen and paired but the pointer doesn't move, the track-pad still works though. Here's the output from my xorg.log:

[ 546.767] (II) config/udev: Adding input device (unnamed) (/dev/input/mouse0)
[ 546.767] (II) No input driver specified, ignoring this device.
[ 546.767] (II) This device may have been added with another device file.
[ 609.625] (EE) event16 - bcm5974: kernel bug: Touch jump detected and discarded.
See https://wayland.freedesktop.org/libinput/doc/1.10.4/touchpad_jumping_cursor.html for details
[ 692.303] (II) config/udev: Adding input device Magic Mouse 2 (/dev/input/event7)
[ 692.303] () Magic Mouse 2: Applying InputClass "libinput pointer catchall"
[ 692.303] (II) Using input driver 'libinput' for 'Magic Mouse 2'
[ 692.303] (
) Magic Mouse 2: always reports core events
[ 692.303] () Option "Device" "/dev/input/event7"
[ 692.303] (
) Option "_source" "server/udev"
[ 692.322] (EE) xf86OpenSerial: Cannot open device /dev/input/event7
No such device.
[ 692.322] (II) event7: opening input device '/dev/input/event7' failed (No such device).
[ 692.322] (II) event7 - failed to create input device '/dev/input/event7'.
[ 692.322] (EE) libinput: Magic Mouse 2: Failed to create a device for /dev/input/event7
[ 692.322] (EE) PreInit returned 2 for "Magic Mouse 2"
[ 692.322] (II) UnloadModule: "libinput"

Please let me know if you need more info from me.
Thanks,
Ralph

@RicardoEPRodrigues
Copy link

@ralphsc did you try my fork?

https://github.com/RicardoEPRodrigues/Linux-Magic-Trackpad-2-Driver

I have a pending pull-request (rohitpid#1) where some discussion has been going on. It might help.

@ralphsc
Copy link

ralphsc commented Jun 12, 2020 via email

@ralphsc
Copy link

ralphsc commented Jun 12, 2020 via email

@ralphsc
Copy link

ralphsc commented Jun 12, 2020 via email

@RicardoEPRodrigues
Copy link

@ralphsc Unfortunately I don't have a lot of time to try to debug this issue, but here are my thoughts.

The Magic Mouse 2 creates 2 devices, one /dev/input/eventX (the touchpad) and a /dev/input/mouseX (the mouse and buttons). libinput picks up any mouseX event and loads a driver for it, that is why by default you have a mouse with no scroll.

What my repo does is to load the driver for the eventX that knows how to deal with the touchpad.

I believe that for some reason, either the rule isn't being called and that is why you have a mouse moving and no scroll, or the udev rules are removing the mouseX, but still loading the driver, which results in the touchpad working, but not the mouse.

If you have some time, please read through 0xABAD repo where the process to get the driver loaded is described. My repo is inspired and improves on his work.

@ralphsc
Copy link

ralphsc commented Jun 15, 2020 via email

@ralphsc
Copy link

ralphsc commented Jun 18, 2020 via email

@RicardoEPRodrigues
Copy link

RicardoEPRodrigues commented Jun 18, 2020

@ralphsc Great to know you got it working!

I tried to use your udev rule and it didn't work for me. I don't have any parent with DRIVERS=="hid-generic". I made some changes, can you try to run this version and check if it works?

SUBSYSTEM=="input", \
    KERNEL=="mouse*", \
    DRIVER=="", \
    SUBSYSTEMS=="hid", \
    KERNELS=="0005:004C:0269*", \
    DRIVERS=="hid-generic|magicmouse", \
    ACTION=="add", \
    SYMLINK+="input/magicmouse-%k", \
    RUN+="/opt/magic-mouse-fix/magic-mouse-2-add.sh"

Thank you!

@ralphsc
Copy link

ralphsc commented Jun 18, 2020 via email

@RicardoEPRodrigues
Copy link

Can you show me the output of udevadm info -a -p $(udevadm info -q path -n /dev/input/mouseX) where mouseX is the connected magic mouse?

I edited my previous answer to have DRIVERS=="hid-generic|magicmouse", you used that one right?

Can you try the following option (I removed the DRIVER=="") :

SUBSYSTEM=="input", \
    KERNEL=="mouse*", \
    SUBSYSTEMS=="hid", \
    KERNELS=="0005:004C:0269*", \
    DRIVERS=="hid-generic|magicmouse", \
    ACTION=="add", \
    SYMLINK+="input/magicmouse-%k", \
    RUN+="/opt/magic-mouse-fix/magic-mouse-2-add.sh"

Also, what is the version of you udev? You can check it with apt show udev.

@ralphsc
Copy link

ralphsc commented Jun 18, 2020

udev:
Version: 237-3ubuntu10.41
xinput:
Version: 1.6.2-1build1

@ralphsc
Copy link

ralphsc commented Jun 18, 2020

It didn't work with that rule either. It seems that if I have "magicmouse" as a driver it fails to function.
Here's the hid drivers I have loaded when the mouse is working:

lsmod | grep hid
hid_magicmouse 20480 0
hidp 28672 2
bluetooth 573440 42 btrtl,hidp,btintel,btbcm,bnep,btusb,rfcomm
mac_hid 16384 0
hid_apple 16384 0
hid_generic 16384 0
usbhid 53248 0
hid 126976 5 hidp,usbhid,hid_apple,hid_generic,hid_magicmouse

@RicardoEPRodrigues
Copy link

Can you show me the output of udevadm info -a -p $(udevadm info -q path -n /dev/input/mouseX) where mouseX is the connected magic mouse?

@ralphsc
Copy link

ralphsc commented Jun 19, 2020 via email

@RicardoEPRodrigues
Copy link

This is going to be a long text. Sorry in advance.

So, the DRIVERS=="hid-generic" changes to DRIVERS=="magicmouse" when the driver is loaded. My guess is that for some reason on ElementaryOS when the driver changes it no longer loads the generic mouse driver.

I think you can try this out the following way:

  1. Turn off the mouse
  2. Use your udev rule with the DRIVERS=="hid-generic" or my udev rule with the DRIVERS=="hid-generic|magicmouse"
  3. sudo ./install-fix.sh
  4. Reboot the system
  5. Turn on the mouse and it should connect and work correctly
  6. Turn the mouse off and on and the mouse connects
  7. If you used your udev rule, the mouse should work without scrolling
  8. If you used my udev rule, the mouse should not work except for scrolling

Sorry for the work, but can you check if this happens?


Another thing also came to mind from your previous comments. First off, it seems you only have one mouse connect and it is the magic mouse (because the mouse is assigned mouse0), correct?

Second, lsmod | grep hid seems similar when it is working, I want to see the output of this when the scrolling works, but the mouse doesn't. Can you get it for me?

Why am I asking these questions? I think that when the magicmouse driver is loaded it no longer loads the hid-generic if no more mice are connected, thus the mouse doesn't work but the scroll does. Therefore, if you have an extra mouse around can you give this a try? Plug in that mouse and then (with my udev rule) connect the magic mouse. Let's see what happens.

@RicardoEPRodrigues
Copy link

Sorry for the spam.

I now believe this is not an ElementaryOS issue, but rather I believe this is an issue that happens only when you don't have another mouse connected. (Can you give me the output of ls /dev/input)

I made a commit to my repo. Before loading the magic mouse driver, the script now also loads the hid-generic driver. @ralphsc can you please give it a try?

🤞Let's hope it works!

@ralphsc
Copy link

ralphsc commented Jun 19, 2020 via email

@ralphsc
Copy link

ralphsc commented Jun 19, 2020

I only have one mouse and of course the trackpad on the laptop. I don't have another mouse at the moment. I tried your changes to the script, mine looks like this now:

#!/bin/sh

FILE=/tmp/magicmouse-driveload

reload() {
if [ ! -f "$FILE" ]; then
touch $FILE

    modprobe -r hid_magicmouse
    modprobe -a hid-generic
    sleep 2
    insmod /opt/magic-mouse-fix/hid-magicmouse.ko \
        scroll_acceleration=1 \
        scroll_speed=35 \
        emulate_scroll_wheel=1 \
        emulate_3button=0 \
        middle_click_3finger=0

    sleep 2
    rm -f "$FILE"

fi

}

reload &

The udev rule just will not load the driver with "magicmouse" in it. my current working rule is this:

SUBSYSTEM=="input",
KERNEL=="mouse*",
DRIVER=="",
SUBSYSTEMS=="hid",
KERNELS=="0005:004C:0269*",
DRIVERS=="hid-generic",
ACTION=="add",
SYMLINK+="input/magicmouse-%k",
RUN+="/opt/magic-mouse-fix/magic-mouse-2-add.sh"

Thanks for all your help with this.

@RicardoEPRodrigues
Copy link

Use my udev rule. With the `DRIVERS=="hid-generic|magicmouse".

@ralphsc
Copy link

ralphsc commented Jun 19, 2020

I've tried it that way, it fails to load the driver.

@RicardoEPRodrigues
Copy link

I believe your version of udev doesn't accept the |, but I can't be sure. I suggest creating 2 rules, one with DRIVERS=="hid-generic" and another with DRIVERS=="magicmouse". The rest would be the same. Can you try it out?

Also, can you get to the situation where the mouse connects but does nothing and send me the lsmod | grep hid?

@earlofhemsley
Copy link

earlofhemsley commented Oct 24, 2020

I have fought this for a day. I've managed to get basically nowhere. I've tried every reasonable variation I can think of, but ultimately, this just isn't working for me. I tried removing the line where hid-generic is added to the kernel modules. I tried altering the udev rule like this: hid-generic|magicmouse --> magicmouse, and also hid-generic. I tried making two rules. I restarted my system so many times. I'm pretty much at my wits end.

I'm on ubuntu 18.04, kernel version 5.4.0-52-generic. My mouse is recognized on my system as Landon Hemsley's Mouse.

I have a lot of different outputs, but this one seems to be the one that is most common. Nothing at all works with the mouse, neither motion nor scrolling. I am using the udev rule and the shell script at the head of the magicmouse2 branch of this repo. Here's the output when I connect the mouse, having run install-fix.sh.

[   412.262] (II) config/udev: Adding input device Landon Hemsley’s Mouse (/dev/input/event29)
[   412.262] (**) Landon Hemsley’s Mouse: Applying InputClass "libinput pointer catchall"
[   412.262] (II) Using input driver 'libinput' for 'Landon Hemsley’s Mouse'
[   412.287] (EE) systemd-logind: failed to take device /dev/input/event29: No such device
[   412.288] (**) Landon Hemsley’s Mouse: always reports core events
[   412.288] (**) Option "Device" "/dev/input/event29"
[   412.288] (**) Option "_source" "server/udev"
[   412.288] (EE) client bug: Invalid path /dev/input/event29
[   412.288] (EE) libinput: Landon Hemsley’s Mouse: Failed to create a device for /dev/input/event29
[   412.288] (EE) PreInit returned 2 for "Landon Hemsley’s Mouse"
[   412.288] (II) UnloadModule: "libinput"
[   416.795] (II) config/udev: Adding input device (unnamed) (/dev/input/mouse3)
[   416.796] (II) No input driver specified, ignoring this device.
[   416.796] (II) This device may have been added with another device file.

Disconnecting and reconnecting without changing anything results in this similar log output:

[  2259.783] (II) config/udev: Adding input device Landon Hemsley’s Mouse (/dev/input/event29)
[  2259.783] (**) Landon Hemsley’s Mouse: Applying InputClass "libinput pointer catchall"
[  2259.783] (II) Using input driver 'libinput' for 'Landon Hemsley’s Mouse'
[  2259.784] (II) systemd-logind: got fd for /dev/input/event29 13:93 fd 91 paused 0
[  2259.784] (**) Landon Hemsley’s Mouse: always reports core events
[  2259.784] (**) Option "Device" "/dev/input/event29"
[  2259.784] (**) Option "_source" "server/udev"
[  2259.784] (II) event29 - Landon Hemsley’s Mouse: is tagged by udev as: Mouse
[  2259.784] (II) event29 - Landon Hemsley’s Mouse: device is a pointer
[  2259.784] (II) event29 - Landon Hemsley’s Mouse: device removed
[  2259.784] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14:1.0/bluetooth/hci0/hci0:256/0005:004C:0269.0006/input/input1198/event29"
[  2259.784] (II) XINPUT: Adding extended input device "Landon Hemsley’s Mouse" (type: MOUSE, id 21)
[  2259.785] (**) Option "AccelerationScheme" "none"
[  2259.785] (**) Landon Hemsley’s Mouse: (accel) selected scheme none/0
[  2259.785] (**) Landon Hemsley’s Mouse: (accel) acceleration factor: 2.000
[  2259.785] (**) Landon Hemsley’s Mouse: (accel) acceleration threshold: 4
[  2259.786] (II) event29 - Landon Hemsley’s Mouse: is tagged by udev as: Mouse
[  2259.786] (II) event29 - Landon Hemsley’s Mouse: device is a pointer
[  2264.034] (II) config/udev: Adding input device (unnamed) (/dev/input/mouse3)
[  2264.034] (II) No input driver specified, ignoring this device.
[  2264.034] (II) This device may have been added with another device file.
[  2264.035] (II) config/udev: removing device Landon Hemsley’s Mouse
[  2264.036] (**) Option "fd" "91"
[  2264.036] (II) event29 - Landon Hemsley’s Mouse: device removed
[  2264.039] (II) UnloadModule: "libinput"
[  2264.039] (II) systemd-logind: releasing fd for 13:93
[  2264.039] (EE) systemd-logind: failed to release device: Device not taken

This is the udevadm info on this device:

  looking at device '/devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14:1.0/bluetooth/hci0/hci0:256/0005:004C:0269.0005/input/input866/mouse3':
    KERNEL=="mouse3"
    SUBSYSTEM=="input"
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14:1.0/bluetooth/hci0/hci0:256/0005:004C:0269.0005/input/input866':
    KERNELS=="input866"
    SUBSYSTEMS=="input"
    DRIVERS==""
    ATTRS{phys}=="28:7f:cf:94:dc:01"
    ATTRS{properties}=="0"
    ATTRS{uniq}=="30:d9:d9:8a:27:47"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14:1.0/bluetooth/hci0/hci0:256/0005:004C:0269.0005':
    KERNELS=="0005:004C:0269.0005"
    SUBSYSTEMS=="hid"
    DRIVERS=="hid-generic"
    ATTRS{country}=="00"
.
.
.
.
etc.

I have verified that in the /dev/input folder, a listing for magicmouse-mouse3 exists, and its a symlink to mouse3.
Best I can tell is that the rule is triggered, but something in the shell script isn't playing nice for me. (PreInit returned 2 is the biggest clue for me on that front)

I'm not using anything special in terms of system configuration. My system is pretty vanilla. I can't help but wonder if it's because I'm still on 18.04. I learned earlier today that ubuntu 20.04.1 LTS is available. I can't now, but at some point in the near future, I'll upgrade the OS and maybe try again. If there's anything y'all know of or can suggest or recommend, I would appreciate it.

@earlofhemsley
Copy link

Sorry for spam. I also found this. Perhaps I should look at altering my xorg conf files to recogize this particular device?

https://unix.stackexchange.com/questions/422126/xorg-reports-no-input-driver-specified-ignoring-this-device-am-i-using-the

@RicardoEPRodrigues
Copy link

RicardoEPRodrigues commented Oct 25, 2020

@landon-hemsley you might be on to something. I know it works on newer systems, but I also have complaints about it not working on ElementaryOS 5 which is based on Ubuntu 18.04 if I'm not wrong.

After a quick search I found this sentence online:

Unless xorg.conf has manual configuration, X.org uses udev for detecting input devices, and udev properties for configuring them.

It come from Kubuntu Wiki and it is a worthy read.

I tested it on Pop_OS 20.04 and even with an X.org file it works fine, yet my guess is that it does not apply to older X.org versions.


In the same page, I also found this section interesting:

Driver assignment

Most input devices like simple mice, keyboards, lid switches, etc. are supported by the general "evdev" X.org input driver, so /lib/udev/rules.d/65-xorg-evdev.rules sets ENV{x11_driver}="evdev" by default.

Later rules (i. e. with a prefix higher than 65) can change the property to use a different driver. 66-xorg-synaptics.rules is a prominent example for using the "synaptics" driver for touchpads and setting ENV{x11_driver}="synaptics" for devices which have ID_INPUT_TOUCHPAD.

Which got me thinking if changing the name of the udev file from 10-magicmouse.rules to 90-magicmouse.rules would make a difference in your systems.

PS: I'm no expert and I'm learning as I go, so for me it is a lot of trial and error. I wish I knew more to be able to great an actual great driver.

(Just placing a useful URL for later use regarding mouse X.org rules)

@earlofhemsley
Copy link

FWIW, and just to close the loop on this, I upgraded my system to 20.04.1, went through the process of re-installing the driver and applied @RicardoEPRodrigues 's fix. It worked! So, my recommendation: Upgrade! lol.

@akozyreva
Copy link

trying on Manjaro - scrolling worked fine ~ 5 hours and after that doesn't work again. I followed all steps from instruction from forked README. @RicardoEPRodrigues any ideas, what can be wrong?

@RicardoEPRodrigues
Copy link

@akozyreva hey! I don't know if I commented this or not, but normally after some OS updates the drivers stops working and I have to "reinstall" it.

Normally running sudo ./install-fix.sh and rebooting does the job.

@KristijanZic
Copy link

It worked for me too but I find that often the right mouse button is registered as a left mouse button or some time both.
I noticed that when browsing the web in Firefox. If I right click a link to show the context menu and go "open in a new tab" and left click it, it opens it both in the current one and in a new tab. Often times when I right click the link it just follows it immediately as if I clicked the left button.

Also when selecting text and trying to right click it. It just deselects it and moves the text cursor just as a left click would.

I'm on Ubuntu 20.04 is anybody able to reproduce this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants