awesomeWM / awesome

awesome window manager

Home Page:https://awesomewm.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

awful.key throws error on brightness keys but only when no client is in focus

code-IM-perfect opened this issue · comments

Output of awesome --version:

 • Compiled against Lua 5.4.6 (running with 0.9.2)
 • API level: 4
 • D-Bus support: yes
 • xcb-errors support: no
 • execinfo support: yes
 • xcb-randr version: 1.6
 • LGI version: /usr/share/lua/5.4/lgi/version.lua
 • Transparency enabled: yes
 • Custom search paths: no

How to reproduce the issue:
Set awful.key to grab "XF86MonBrightnessUp" or "XF86MonBrightnessDown" and try to use the bindings with no window in focus. I should also mention that this is a Lenovo Ideapad.

Actual result:
Bindings don't work and give an error in the logs-

2023-11-21 17:12:01 W: awesome: xerror:1058: X error: request=GrabKey (major 33, minor 0), error=BadAccess (10)
2023-11-21 17:12:01 W: awesome: xerror:1058: X error: request=GrabKey (major 33, minor 0), error=BadAccess (10)
2023-11-21 17:12:01 W: awesome: xerror:1058: X error: request=GrabKey (major 33, minor 0), error=BadAccess (10)
2023-11-21 17:12:01 W: awesome: xerror:1058: X error: request=GrabKey (major 33, minor 0), error=BadAccess (10)

one keypress = 4 lines of this error, the output is absolutely same for both the keys.

Expected result:
The keybinding to work as usual.

Drive by comment: According to https://www.x.org/releases/X11R7.6/doc/xproto/x11protocol.html#requests:GrabKey

An Access error is generated if some other client has issued a GrabKey with the same key combination on the same window.

So, something else has already grabbed this brightness buttons. No idea how to find that other program. Sorry. Welcome to X11.

Thanks for looking into it!
I have installed awesome over KDE so probably some KDE program grabs the brightness key in the background, I guess I can manage focusing on some program while adjusting the brightness lol

It's kglobalaccel5 and you can disable this in systemsettings. I am closing this since it is a configuration issue rather than a bug within AwesomeWM code.

@Elv13 I'm sorry for disturbing you for kind of my personal issue but I just ran kill kglobalaccel5 and that didn't work do you have any idea what else it could be?