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

"Error adding device" -- need to restart logid service to fix #156

Open
gobbedy opened this issue Nov 18, 2020 · 23 comments
Open

"Error adding device" -- need to restart logid service to fix #156

gobbedy opened this issue Nov 18, 2020 · 23 comments

Comments

@gobbedy
Copy link

gobbedy commented Nov 18, 2020

Hello and thank you for your wonderful driver.

This issue is related to the problem I described here but I thought I'd open my own issue rather than continue to hijack someone else's.

The following warning appears to be the problem:
[WARN] Error adding device /dev/hidraw2: std::exception

I always get the warning when I run sudo logid -v (asterisks are mine for emphasis):

[DEBUG] Unsupported device /dev/hidraw4 ignored
**[WARN] Error adding device /dev/hidraw2: std::exception**
[DEBUG] Unsupported device /dev/hidraw0 ignored
[INFO] Detected receiver at /dev/hidraw1
[INFO] Device found: Wireless Mouse MX Master 3 on /dev/hidraw1:1
[DEBUG] /dev/hidraw1:1 remappable buttons:
[DEBUG] CID  | reprog? | fn key? | mouse key? | gesture support?
[DEBUG] 0x50 |         |         | YES        | 
[DEBUG] 0x51 |         |         | YES        | 
[DEBUG] 0x52 | YES     |         | YES        | YES
[DEBUG] 0x53 | YES     |         | YES        | YES
[DEBUG] 0x56 | YES     |         | YES        | YES
[DEBUG] 0xc3 | YES     |         | YES        | YES
[DEBUG] 0xc4 | YES     |         | YES        | YES
[DEBUG] 0xd7 | YES     |         |            | YES
[DEBUG] Thumb wheel detected (0x2150), capabilities:
[DEBUG] timestamp | touch | proximity | single tap
[DEBUG] YES       | YES   | YES       | YES       
[DEBUG] Thumb wheel resolution: native (18), diverted (120)

The warning occurs no matter what my logid.cfg is; or indeed whether I have one or not.

Still, in case it matters, I got the above output with the following /etc/logid.cfg:

devices: (
{
    name: "Wireless Mouse MX Master 3";
    buttons: (
        {
            # Forward button
            cid: 0x56;
            action =
            {
                type :  "Keypress";
                keys: ["KEY_VOLUMEUP"];
            };
        }
    );
}
);

Note that when I run the above command (sudo logid -v), the warning appears to be harmless: the driver still works without issue.

However, when logid is started as a service, the same warning appears at random, and when it does, I get the scrolling issues described in the issue 148.

I then have to restart the service in order to get my mouse working properly again.

This happens on average every 2 hours or so, enough to be annoying lol.

I'd be grateful for any help resolving this issue.

Here is the output of my uname -v:
#1 SMP Debian 5.7.6-1kali2 (2020-07-01)

Thanks in advance!

@fastcat
Copy link

fastcat commented Oct 4, 2021

I have a very similar issue -- mine shows up when disconnecting & reconnecting the receiver ... which in my case is really when switching systems on my KVM, but the same thing happens if I manually unplug & re-plug the receiver.

I specifically see the "running it interactively with -v avoids the problem" ... and in fact I found that setting the systemd service to use -v also works around the issue!

Edit: correction: ... sometimes works around the issue ☹️

@gfarrell
Copy link

I have exactly the same problem -- breaks after suspend and reboot. Restarting the service with systemctl fixes it for me every time.

@leviable
Copy link

leviable commented Nov 5, 2021

I'm having the same or similar issue as @fastcat, specifically getting logid to work correctly with my Master 2S after using a KVM to switch between work stations. Bouncing the service rarely works, but manually running logid with -v makes it work most of the time.

I suspect there is some sort of timeout that needs to happen first. On this particular work station (Ubuntu 20.04.3), sometimes Ill remote desktop into it, and sometimes switch from RDP to the actual box with my KVM. If I don't wait ~20 seconds between killing the RDP session and logging into the box via the KVM, my sound wont work, as there is a 20 second timeout that needs to pop. I suspect something similar is occurring here.

@DimitriDaSilva
Copy link

I'm having the same issue. Restarting the service also fixes it for me

@araujorm
Copy link

Confirmed here too. MX Master 3, connected via bluetooth.

@hbarcelos
Copy link

hbarcelos commented Jul 29, 2022

Same issue here. MX Master 3, connected through bluetooth.

For context, here's the relevant part of journalctl -u logid:

-- Boot a48bf66ff9984ce9b0fcb50620cdda9b --
jul 29 16:58:29 henrique-a70mob systemd[1]: Started Logitech Configuration Daemon.
jul 29 14:01:12 henrique-a70mob logid[1027]: [WARN] Error adding device /dev/hidraw3: Invalid function ID
jul 29 14:01:12 henrique-a70mob logid[1027]: [WARN] Error adding device /dev/hidraw3: Invalid function ID
lines 1481-1521/1521 (END)

@jandresfg
Copy link

Same issue here. MX Master 3, connected through bluetooth. This keeps me from launching successfully at startup, gotta always restart the service manually for it to work...

@NoChance777
Copy link

Same here. The device is MX 3 Master 3 Mac, connected via Bluetooth. Adding 'After=bluetooth.target' in service file does not solve the problem.

@gnos28
Copy link

gnos28 commented Aug 17, 2022

same issue for me as well
mx master 3 bluetooth / ubuntu 22

very likely because bluetooth mouse isn't automatically paired when system boot (you have to click any mouse button to "activate it")

might be solved with a tweak in service file like @NoChance777 said but I'm not enough comfortable to play with that

@wmbruckner
Copy link

Having the same issue here when starting (Kubuntu 22.04), modified logid.service did not fix it.
However, if I do not touch the mouse for like some 20 secs after booting to desktop, logid runs just fine.

@dszmaj
Copy link

dszmaj commented Nov 24, 2022

same problem here with master 3 on fedora 37

@im-calvin
Copy link

Just to bump this thread I'm running into the same issue with Mx Master 3 on Fedora 37 using exclusively Bluetooth.

I've tried some of the fixes in the linked thread but the main issue is that when the laptop goes to sleep / mouse goes to sleep I run into the following error: [WARN] Error adding device /dev/hidraw1: Invalid function ID.
This error doesn't show up when I either restart or fully shut down the system, only when something goes to sleep.

#204 (comment)

@im-calvin
Copy link

I fixed the issue by removing the Solaar package which I had already installed on my system. I presume the issue was that they were both fighting for the mouses' config.
Hope this helps others!

@fastcat
Copy link

fastcat commented Apr 27, 2023

I fixed the issue by removing the Solaar package

You're my hero for today :)

I still see the [WARN] Error adding device /dev/hidraw13: std::exception error in the logs ... but the mouse still gets properly reconfigured on insert now.

@im-calvin
Copy link

Yeah I get that same error as well, seems like the drivers work though.

I initially installed Solaar to monitor the battery life, kinda sucks that they aren't compatible with each other. Maybe a potential improvement?

@fastcat
Copy link

fastcat commented Apr 28, 2023

I maybe spoke too soon yesterday. Disabling/removing solaar does make things better, but it doesn't fix everything. When switching away & back with my KVM, I'm now getting the button-remapping working right where it sometimes wouldn't before, but my scroll wheel is sometimes not getting reconfigured for the correct scrolling speed (but sometimes is).

@im-calvin
Copy link

I'll look into it when I get a chance, I haven't actually had a chance to use my Linux device all that much but I'll see if I get the same behaviour.

@im-calvin
Copy link

Following up, I've been seeing some buggy behaviour with the service. Sometimes when the service is not on none of my binds are working (including scroll wheel which I guess used to be fixed with the Solaar package). Not too sure what the fix is atm.
Seems to be reproducible whenever I turn my Bluetooth on my device on / off? When I power cycle the mouse it fixed it.
When I set my device to suspend then it also stops working.

@im-calvin
Copy link

I seem to have possibly fixed the issue by changing hirresscroll: { hires: false } to true in my config file.
Not sure if this is a permanent fix but I found the solution through #116

@raymondshiner
Copy link

Any updates on this? I am having the same problem. As far as i can tell, i have uninstalled Solaar, but it still wont work on reboot. I have to restart service via CLI to get gesture button func.

@raymondshiner
Copy link

So not a fix, but a workaround. The AI Overlord suggested I make a seperate timer service to restart logid shortly after restart. It works now i have gestures after logging in, without having to manually restart.

https://chat.openai.com/share/1393c511-d92b-41f8-b019-742d9cda2ef4

@arthurbarros
Copy link

So not a fix, but a workaround. The AI Overlord suggested I make a seperate timer service to restart logid shortly after restart. It works now i have gestures after logging in, without having to manually restart.

https://chat.openai.com/share/1393c511-d92b-41f8-b019-742d9cda2ef4

Worked for me, not a fix but I will take the workaround. @raymondshiner thank you

@c-kr
Copy link

c-kr commented Jan 11, 2024

Had the same problem with MX Master 3 via bluetooth. A better approach instead of starting with a delay is a udev rule that starts logid after the hidraw device appears:

cat /etc/udev/rules.d/50-restart_logid.rules 
ACTION=="add", KERNEL=="hidraw0", RUN+="/usr/bin/systemctl --no-block restart logid.service"

This allows to disable the logid.service and have the daemon just started once, right after connection without a need to restart.

Tested on arch with the logiops AUR package

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