Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-02-12 16:15:13

opafix
Member
Registered: 2018-02-12
Posts: 5

[SOLVED] Power Manager steals brightness keys

Problem

I have disabled the handling of brightness keys and the brightness popup in the Power Manager settings and added keyboard shortcuts for light (from AUR):

light -A 5    |    XF86MonBrightnessUp
light -U 5    |    XF86MonBrightnessDown

However, when I press the shortcuts

Fn + F12 (XF86MonBrightnessUp)
Fn + F11 (XF86MonBrightnessDown)

nothing happens.

I have checked that the commands work by mapping the shortcut to other keys and I know that the keymapping is correct because the keyboard settings menu handles the input correctly when creating the shortcut.

I suspect that the Power Manager still steals the keypresses, but doesn't process them. How can I fix this?

Many thanks,

Opafix

EDIT: Solution
  1. Quit XFCE4 Power Manager using

     xfce4-power-manager -q
  2. Check shortcuts now work

  3. Restart XFCE4 Power Manager (using desktop icon, whisker menu, commands etc)

Additionally,

xfce4-power-manager --no-daemon --debug

can be used to check which keypresses XFCE4 Power Manager grabs.

Bug Reported

Reported to bugzilla.xfce.org (Bug ID 14226)

Credit to ToZ for all their help.

Last edited by opafix (2018-02-17 16:55:50)

Offline

#2 2018-02-12 20:33:08

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,660

Re: [SOLVED] Power Manager steals brightness keys

Hello and welcome.

I suspect that the Power Manager still steals the keypresses, but doesn't process them.

Yes it does. This while running xfce4-power-manager in debug mode:

TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 244 : ((XfpmButtonKey) BUTTON_BATTERY)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 238 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_UP)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 237 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_DOWN)

How can I fix this?

There should be an option to turn off the handling of brightness keys in the Power Manager settings.

Offline

#3 2018-02-12 21:03:39

opafix
Member
Registered: 2018-02-12
Posts: 5

Re: [SOLVED] Power Manager steals brightness keys

Thank you for your response.


To clarify, I have set the "Handle Display Brightness Keys" to off in the power manager settings and am still having this problem.

Thanks.

Offline

#4 2018-02-12 21:38:17

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,660

Re: [SOLVED] Power Manager steals brightness keys

I can't test this myself right now, but with the setting unchecked, run the following commands in a terminal window:

xfce4-power-manager -q

Do the keys work now?

Then run:

xfce4-power-manager --no-daemon --debug

Does the output still show that the keys are being grabbed?
And what gets displayed when you press the keys?

Offline

#5 2018-02-13 09:29:26

opafix
Member
Registered: 2018-02-12
Posts: 5

Re: [SOLVED] Power Manager steals brightness keys

That fixed it! Thank you very much!

What exactly does the -q flag do, out of inerest?

Offline

#6 2018-02-13 11:26:57

alcornoqui
Member
Registered: 2014-07-28
Posts: 305

Re: [SOLVED] Power Manager steals brightness keys

I think -q is the same as --quit:

man xfce4-power-manager

--quit Causes any running instance of xfce4-power-manager to exit.

Offline

#7 2018-02-13 11:31:11

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,660

Re: [SOLVED] Power Manager steals brightness keys

opafix wrote:

That fixed it! Thank you very much!

What exactly does the -q flag do, out of inerest?

But now you don't have the power manager running. Did you try the second part of that, running in debug mode? If it still captures the brightness keys, even after you've specified for it not to, then you have a found a bug and you shuold report it as so.

Offline

#8 2018-02-17 13:41:40

opafix
Member
Registered: 2018-02-12
Posts: 5

Re: [SOLVED] Power Manager steals brightness keys

After further investigation, if I make any changes to my power manager settings (changing effect of closing lid etc) then it starts to steal the keys again but doesn't register that it does so when I run the debug command.

However, if I run

xfce4-power-manager -q

to quit the power manager then restart it (through commands or restarting device or through desktop GUI) then it no longer steals the keys and my shortcuts work as intended.

Thank you for your help.

Opafix

Offline

#9 2018-02-17 14:12:03

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 982

Re: [SOLVED] Power Manager steals brightness keys

opafix wrote:

After further investigation, if I make any changes to my power manager settings (changing effect of closing lid etc) then it starts to steal the keys again but doesn't register that it does so when I run the debug command.

Yes, that definitely reads like a bug description.

ToZ wrote:

If it still captures the brightness keys, even after you've specified for it not to, then you have a found a bug and you shuold report it as so.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#10 2018-02-17 16:15:51

opafix
Member
Registered: 2018-02-12
Posts: 5

Re: [SOLVED] Power Manager steals brightness keys

MountainDewManiac wrote:

Yes, that definitely reads like a bug description.

ToZ wrote:

If it still captures the brightness keys, even after you've specified for it not to, then you have a found a bug and you shuold report it as so.

Thanks, reported to bugzilla.xfce.org (Bug ID 14226)

Offline

Board footer

Powered by FluxBB