waycrate / swhkd

Sxhkd clone for Wayland (works on TTY and X11 too)
https://git.sr.ht/~shinyzenith/swhkd
BSD 2-Clause "Simplified" License
667 stars 47 forks source link

`/dev/input/mouse1`: Inappropriate ioctl for device #230

Open foxjaw opened 7 months ago

foxjaw commented 7 months ago

Version Information:

Describe the bug:

$[~]$ pkexec swhkd -d
[2023-12-20T11:19:27Z TRACE swhkd] Logger initialized.
[2023-12-20T11:19:27Z TRACE swhkd] Invoking UID: 1000
[2023-12-20T11:19:27Z TRACE swhkd] Setting process umask.
[2023-12-20T11:19:27Z ERROR swhkd] XDG_RUNTIME_DIR has not been set.
[2023-12-20T11:19:27Z TRACE swhkd] Reading /run/swhkd/swhkd_1000.pid file and checking for running instances.
[2023-12-20T11:19:27Z DEBUG swhkd] Previous PID: 28297
[2023-12-20T11:19:27Z WARN  swhkd] Running swhkd as root!
[2023-12-20T11:19:27Z DEBUG swhkd::perms] Setting initgroups...
[2023-12-20T11:19:27Z DEBUG swhkd::perms] Setting EGID...
[2023-12-20T11:19:27Z DEBUG swhkd::perms] Setting EUID...
[2023-12-20T11:19:27Z ERROR swhkd] XDG_CONFIG_HOME has not been set.
[2023-12-20T11:19:27Z DEBUG swhkd] Using config file path: "/etc/swhkd/swhkdrc"
[2023-12-20T11:19:27Z DEBUG swhkd::perms] Setting EGID...
[2023-12-20T11:19:27Z DEBUG swhkd::perms] Setting EUID...
[2023-12-20T11:19:27Z DEBUG swhkd::perms] Setting initgroups...
[2023-12-20T11:19:27Z TRACE swhkd] Attempting to find all keyboard file descriptors.
[2023-12-20T11:19:27Z TRACE swhkd] Other: Sleep Button
[2023-12-20T11:19:27Z TRACE swhkd] Other: Power Button
[2023-12-20T11:19:27Z TRACE swhkd] Other: Power Button
[2023-12-20T11:19:27Z TRACE swhkd] Other: Logitech M350
[2023-12-20T11:19:27Z DEBUG swhkd] Keyboard: Logitech K230
[2023-12-20T11:19:27Z TRACE swhkd] Other: PC Speaker
[2023-12-20T11:19:27Z TRACE swhkd] Other: Eee PC WMI hotkeys
[2023-12-20T11:19:27Z TRACE swhkd] Other: HDA NVidia HDMI/DP,pcm=3
[2023-12-20T11:19:27Z TRACE swhkd] Other: HDA NVidia HDMI/DP,pcm=7
[2023-12-20T11:19:27Z TRACE swhkd] Other: HDA NVidia HDMI/DP,pcm=8
[2023-12-20T11:19:27Z TRACE swhkd] Other: HDA NVidia HDMI/DP,pcm=9
[2023-12-20T11:19:27Z TRACE swhkd] Other: HDA Intel PCH Front Mic
[2023-12-20T11:19:27Z TRACE swhkd] Other: HDA Intel PCH Rear Mic
[2023-12-20T11:19:27Z TRACE swhkd] Other: HDA Intel PCH Line
[2023-12-20T11:19:27Z TRACE swhkd] Other: HDA Intel PCH Line Out
[2023-12-20T11:19:28Z TRACE swhkd] Other: HDA Intel PCH Front Headphone
[2023-12-20T11:19:28Z DEBUG swhkd] 1 Keyboard device(s) detected.
[2023-12-20T11:19:28Z ERROR swhkd] XDG_RUNTIME_DIR has not been set.
[2023-12-20T11:19:28Z ERROR swhkd] Could not open evdev device at /dev/input/mouse1: Inappropriate ioctl for device (os error 25)
...

Mouse works fine, not sure what this issue is.

foxjaw commented 7 months ago

Is it related to #137. Caz I run Logitech K230+M350 with the same unifying receiver.

Shinyzenith commented 6 months ago

I do not have a unifying receiver so I don't think I can test this. If anyone with this hardware can send a patch, that would be amazing.

foxjaw commented 6 months ago

I'm willing to --ignore-device /dev/input/mouse1 would that work ?

Shinyzenith commented 6 months ago

I'm not too sure since I don't have that kind of hardware. Only a trial and error can suffice.

lukelex commented 5 months ago

+1 for this.

I'm currently using an ELECOM HUGE Trackball Mouse and it gets swallowed by swhkd, making it unusable atm.

I'd be willing to test out any available branch and report back.

foxjaw commented 5 months ago

Being author of this issue I couldn't help you caz right now I've stopped using swhkd, because of the reasons for stubborn pkexec daemon. Now I only rely on my compositor (sway) for inputs. Couldn't justify why I should use swhkd.

Shinyzenith commented 5 months ago

+1 for this.

I'm currently using an ELECOM HUGE Trackball Mouse and it gets swallowed by swhkd, making it unusable atm.

I'd be willing to test out any available branch and report back.

Hi we have a flag to ignore particular devices I believe. Can you try that?

Shinyzenith commented 5 months ago

Being author of this issue I couldn't help you caz right now I've stopped using swhkd, because of the reasons for stubborn pkexec daemon. Now I only rely on my compositor (sway) for inputs. Couldn't justify why I should use swhkd.

You're absolutely correct and I understand your pain point, it's part of our gsoc program.

lukelex commented 5 months ago

Hi we have a flag to ignore particular devices I believe. Can you try that?

@Shinyzenith Would you point me in the direction of the docs that describe how to use the flag? The --help section doesn't include that.

Shinyzenith commented 5 months ago

I believe you can just pass the name of the device. The names are emitted after: "attempting to find all keyboard file descriptors" in the logs.