Imwheel gives XError: Bad access when trying to run

Hi everyone!

I’ve been having some issues with my scroll wheel being painfully slow on certain applications (discord, obsidian) - Through some research I found an application called imwheel which seems to do exactly what I need. I’ve made a ~/.imwheelrc file with the contents

"^discord$"
    None, Up, Button4, 5
    None, Down, Button5, 5
"^obsidian$"
    None, Up, Button4, 5
    None, Down, Button5, 5

And run the application withimwheel -d --debug to view the debug logs. The problem is even if I run the application with or without sudo I get this error everytime

XError:
	serial      : 12
	error_code  : 10
	request_code: 28
	minor_code  : 0
	resourceid  : 486
	error string: BadAccess (attempt to access private resource denied)
XError:
	serial      : 13
	error_code  : 10
	request_code: 28
	minor_code  : 0
	resourceid  : 486
	error string: BadAccess (attempt to access private resource denied)

I’ve tried reinstalling, rebooting and running with QT_X11_NO_MITSHM=1 to no avail. I’m running EndeavourOS BSPWM community edition. Any help would be greatly appreciated!

Update: I’ve tried disabling picom but to no luck. I’ve spoken to others with BSPWM who have no issues so I’m sure it’s something to do with my specific setup

I have the same problem with an Aerox 3.

sudo imwheel -D -b '45
...
Grab buttons!
Grabbing Button 4...
Grabbing Button 5...
starting loop...
XError:
        serial      : 12
        error_code  : 10
        request_code: 28
        minor_code  : 0
        resourceid  : 1949
        error string: BadAccess (attempt to access private resource denied)
XError:
        serial      : 13
        error_code  : 10
        request_code: 28
        minor_code  : 0
        resourceid  : 1949
        error string: BadAccess (attempt to access private resource denied)

❯ xinput --list | grep "Steel"
⎜   ↳ SteelSeries SteelSeries Aerox 3 Keyboard  id=24   [slave  pointer  (2)]
⎜   ↳ SteelSeries SteelSeries Aerox 3           id=26   [slave  pointer  (2)]
    ↳ SteelSeries SteelSeries Aerox 3 Keyboard  id=25   [slave  keyboard (3)]

Doubt this is an issue with Endeavor OS specifically, though.

Are you sure you use the right window class string?
Maybe this will help

=== Getting the window class string ===
Run ‘‘xprop’’ to get the class string. The program will exit when a window is clicked.
xprop WM_CLASS | grep -o '"[^"]*"' | head -n 1
So for the document viewer ‘‘zathura’’, this will return the following:
“zathura”