Bug 389991 - Powerdevil global shortcuts not working after 5.12 config migration
Summary: Powerdevil global shortcuts not working after 5.12 config migration
Status: CLOSED FIXED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.12.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 389845 390059 390094 390667 390850 390930 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-02-07 07:31 UTC by lnxusr
Modified: 2018-04-16 05:24 UTC (History)
30 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.12.2


Attachments
kglobalshortcutsrc - Microphone Mute (Meta+F3) not working (14.07 KB, text/plain)
2018-02-12 14:28 UTC, confused
Details
kglobalshortcutsrc (13.42 KB, text/plain)
2018-02-12 14:30 UTC, Winston Nolan
Details
kglobalshortcutsrc (13.81 KB, text/plain)
2018-02-12 14:33 UTC, Franco Pellegrini
Details
kglobalshortcutsrc - keyboard brightness and sleep doesn't work (16.52 KB, text/plain)
2018-02-12 18:04 UTC, Luca Weiss
Details
Original file (15.71 KB, text/plain)
2018-02-13 07:29 UTC, jdvr.tacua
Details
Modified file following comment 22 (15.21 KB, text/plain)
2018-02-13 07:30 UTC, jdvr.tacua
Details
kglobalshortcutsrc (13.43 KB, text/plain)
2018-04-15 16:01 UTC, kdebugs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lnxusr 2018-02-07 07:31:22 UTC
After upgrading to Plasma 5.12, pressing the sleep key no longer initiates sleep mode.  There used to be a sleep action in the Standard Shortcuts, but it is no longer there.  In attempting to create a custom shortcut utilizing the sleep key, I get an error saying "The shortcut 'Sleep' conflicts with the following key combination: Shortcut 'Sleep' in Application KDE Daemon for action Suspend".

Looking around, I found a Power Management component under the Global Shortcuts that contains entries for Hibernate and Suspend, but trying to set either of them to their respective keys gives the same complaint about a conflict with the corresponding shortcut in Application KDE Daemon for action [Hibernate/Suspend].

If I reassign the key to the Power Management's Sleep action, the system sleeps as is should.  I can only assume this bug is in the KDE Damon somewhere, which I also assume is something new or changed in 5.12?
Comment 1 Kai Uwe Broulik 2018-02-08 08:00:40 UTC
*** Bug 390059 has been marked as a duplicate of this bug. ***
Comment 2 Kai Uwe Broulik 2018-02-08 16:03:44 UTC
*** Bug 389845 has been marked as a duplicate of this bug. ***
Comment 3 francisco_t 2018-02-08 17:54:21 UTC
In my case, I have several users on my system with different languages. The problem described here is with English language users, but it doesn't happen with Spanish language users.
Comment 4 qtm4ig 2018-02-08 19:31:03 UTC
Similar problem on arch linux
brightness keys (F11, F12) not work on plasma 5.12
Comment 5 rom.xpz17 2018-02-08 22:44:20 UTC
Similar problem on arch linux on my dell latitude, brightness keys (F11, F12) and mute microphone (F4) does not work on plasma 5.12
Comment 6 confused 2018-02-09 01:42:26 UTC
Looks like it's the same but as this one: https://bugs.kde.org/show_bug.cgi?id=390094

I can confirm this at least for "Mute Microphone". I don't have a dedicate key for that, so I set it to Meta+F3. It stopped working after upgrading to Plasma 5.12.

Plasma: 5.12.0
Frameworks: 5.42.0
Qt: 5.10.0
Distro: Arch
Comment 7 Erich Eickmeyer 2018-02-09 05:38:43 UTC
Upgraded Kubuntu to Plasma 5.12, had the same problem with the brightness keys (both screen and keyboard) on my 2011 MacBook Pro. Workaround fix was to fix the global keyboard shortcuts in power management by custom-assigning the respective functions to the correct keys. It pops up dialogs saying there's a conflict. Do it twice and it will realize that the button you're using is the default and assign it accordingly.

Seems as though the global shortcut mapping is getting confused between releases specifically as it comes to power management control.
Comment 8 FREDERIC BERIER 2018-02-10 18:06:47 UTC
Same behavior on my HP spectre X360: Brightness keys and power switch do not work any more since plasma 5.12 upgrade with kubuntu backport packages. 
Syslog message for brightness keys: 
atkbd serio0: Unknown key released (translated set 2, code 0xab on isa0060/serio0).
atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.

Hope that helps!
Thank you for your support
Comment 9 gbyte.dev 2018-02-10 21:36:47 UTC
Confirming, for me FN+Brightness up/down and also power button stopped working, even though I have it configured to suspend the computer in the energy saving module. Microphone mute works however.

Lenovo Thinkpad T470
Arch Linux
kernel 4.15.2-2
Comment 10 Kai Uwe Broulik 2018-02-12 12:17:05 UTC
*** Bug 390094 has been marked as a duplicate of this bug. ***
Comment 11 piotr 2018-02-12 12:26:24 UTC
Confirm - Thinkpad X220, KDE Neon (Plasma 5.12.0) - Screen brightness up/down and microphone mute combos (e.g. FN+Home/End)
Comment 12 David Edmundson 2018-02-12 14:20:34 UTC
Can someone attach their ~/.config/kglobalshortcutsrc in the broken state please
Comment 13 confused 2018-02-12 14:28:18 UTC
Created attachment 110559 [details]
kglobalshortcutsrc - Microphone Mute (Meta+F3) not working
Comment 14 Winston Nolan 2018-02-12 14:30:26 UTC
Created attachment 110560 [details]
kglobalshortcutsrc
Comment 15 Franco Pellegrini 2018-02-12 14:33:43 UTC
Created attachment 110561 [details]
kglobalshortcutsrc

coming from bug #390094
Comment 16 Luca Weiss 2018-02-12 18:04:25 UTC
Created attachment 110570 [details]
kglobalshortcutsrc - keyboard brightness and sleep doesn't work
Comment 17 Albert Astals Cid 2018-02-12 19:11:06 UTC
David, in case you're not seen the problem yet, the problem is that the powerdevil_move_shortcuts.upd script is broken, it copied the keys instead of moving them, at this point i'm not sure this is fixable other than people manually fixing their broken kglobalshortcutsrc.
Comment 18 Albert Astals Cid 2018-02-12 19:21:20 UTC
Now that i think about it, maybe we can actually fix the kglobalshortcutsrc in an update.

It seems the old values are still in kded5, so we should provide a file that moves (instead of copies) the shortcuts from kded5 to org_kde_powerdevil? Maybe even do it a bit smarter and only if the shortcut in org_kde_powerdevil is none? (which i guess ended up as none because kglobalaccel said "nope, no two keys for different shortcuts and assigned the second one to none)
Comment 19 Franco Pellegrini 2018-02-12 21:04:43 UTC
What would be the best way to manually update? move the file somewhere else, logout and login, and then compare the old file with the new one that gets generated?
Comment 20 David Edmundson 2018-02-12 21:36:54 UTC
>David, in case you're not seen the problem yet, the problem is that the powerdevil_move_shortcuts.upd script is broken, it copied the keys instead of moving them, at this point i'm not sure this is fixable other than people manually fixing their broken kglobalshortcutsrc.

I'm pretty sure it's moving the entry correctly when tested locally. But because kconf scripts run as soon as they detect a file. It moves the entries whilst kglobalaccel is still running, so then when that later syncs we get our duplicates
Comment 21 Denis Lisov 2018-02-12 21:51:00 UTC
Note for other readers: the problem with the mute microphone and mic volume keys is likely a separate one (#390161, fixed in plasma-pa 5.12.1).
Comment 22 Albert Astals Cid 2018-02-12 22:35:38 UTC
(In reply to Franco Pellegrini from comment #19)
> What would be the best way to manually update? move the file somewhere else,
> logout and login, and then compare the old file with the new one that gets
> generated?

If you want to fix this manually, you can try doing this

cd $HOME
cp .config/kglobalshortcutsrc kglobalshortcutsrc.backup
cp .config/kglobalshortcutsrc kglobalshortcutsrc
kate kglobalshortcutsrc

remove from the [org_kde_powerdevil] subsection the lines starting with 
Hibernate
PowerOff
Sleep
Decrease Keyboard Brightness
Decrease Screen Brightness
Increase Keyboard Brightness
Increase Screen Brightness
Toggle Keyboard Backlight

Move from the [kded5] subsection to the [org_kde_powerdevil] subsection the lines starting with 
Hibernate
PowerOff
Sleep
Decrease Keyboard Brightness
Decrease Screen Brightness
Increase Keyboard Brightness
Increase Screen Brightness
Toggle Keyboard Backlight


cp kglobalshortcutsrc .config/kglobalshortcutsrc

Log out and log in again and it should be fixed.

If all is fine you can delete kglobalshortcutsrc.backup
Comment 23 Albert Astals Cid 2018-02-12 23:09:47 UTC
(In reply to David Edmundson from comment #20)
> >David, in case you're not seen the problem yet, the problem is that the powerdevil_move_shortcuts.upd script is broken, it copied the keys instead of moving them, at this point i'm not sure this is fixable other than people manually fixing their broken kglobalshortcutsrc.
> 
> I'm pretty sure it's moving the entry correctly when tested locally. 

You're right the documentation i read is wrong, it moves by default instead of coying

> But
> because kconf scripts run as soon as they detect a file. It moves the
> entries whilst kglobalaccel is still running, so then when that later syncs
> we get our duplicates

It's weird, i've been reading the kglobalaccel code and it seems like it should not sync unless you add/register/unregister shortcuts. But yeah your explanation seems the be what happened.
Comment 24 jdvr.tacua 2018-02-13 07:29:08 UTC
(In reply to Albert Astals Cid from comment #22)
> (In reply to Franco Pellegrini from comment #19)
> > What would be the best way to manually update? move the file somewhere else,
> > logout and login, and then compare the old file with the new one that gets
> > generated?
> 
> If you want to fix this manually, you can try doing this
> 
> cd $HOME
> cp .config/kglobalshortcutsrc kglobalshortcutsrc.backup
> cp .config/kglobalshortcutsrc kglobalshortcutsrc
> kate kglobalshortcutsrc
> 
> remove from the [org_kde_powerdevil] subsection the lines starting with 
> Hibernate
> PowerOff
> Sleep
> Decrease Keyboard Brightness
> Decrease Screen Brightness
> Increase Keyboard Brightness
> Increase Screen Brightness
> Toggle Keyboard Backlight
> 
> Move from the [kded5] subsection to the [org_kde_powerdevil] subsection the
> lines starting with 
> Hibernate
> PowerOff
> Sleep
> Decrease Keyboard Brightness
> Decrease Screen Brightness
> Increase Keyboard Brightness
> Increase Screen Brightness
> Toggle Keyboard Backlight
> 
> 
> cp kglobalshortcutsrc .config/kglobalshortcutsrc 
> 
> Log out and log in again and it should be fixed.
> 
> If all is fine you can delete kglobalshortcutsrc.backup

This doesn't work for me... I have tried twice but nothing. I attached the modified and the original version.
Comment 25 jdvr.tacua 2018-02-13 07:29:52 UTC
Created attachment 110597 [details]
Original file
Comment 26 jdvr.tacua 2018-02-13 07:30:36 UTC
Created attachment 110598 [details]
Modified file following comment 22
Comment 27 Winston Nolan 2018-02-13 07:45:12 UTC
(In reply to Albert Astals Cid from comment #22)
> (In reply to Franco Pellegrini from comment #19)
> > What would be the best way to manually update? move the file somewhere else,
> > logout and login, and then compare the old file with the new one that gets
> > generated?
> 
> If you want to fix this manually, you can try doing this
> 
> cd $HOME
> cp .config/kglobalshortcutsrc kglobalshortcutsrc.backup
> cp .config/kglobalshortcutsrc kglobalshortcutsrc
> kate kglobalshortcutsrc
> 
> remove from the [org_kde_powerdevil] subsection the lines starting with 
> Hibernate
> PowerOff
> Sleep
> Decrease Keyboard Brightness
> Decrease Screen Brightness
> Increase Keyboard Brightness
> Increase Screen Brightness
> Toggle Keyboard Backlight
> 
> Move from the [kded5] subsection to the [org_kde_powerdevil] subsection the
> lines starting with 
> Hibernate
> PowerOff
> Sleep
> Decrease Keyboard Brightness
> Decrease Screen Brightness
> Increase Keyboard Brightness
> Increase Screen Brightness
> Toggle Keyboard Backlight
> 
> 
> cp kglobalshortcutsrc .config/kglobalshortcutsrc
> 
> Log out and log in again and it should be fixed.
> 
> If all is fine you can delete kglobalshortcutsrc.backup

This worked for me. Brightness works, volume, and power button press to suspend. I have not tested the lid yet
Comment 28 Albert Astals Cid 2018-02-13 08:38:23 UTC
(In reply to jdvr.tacua from comment #24)
> (In reply to Albert Astals Cid from comment #22)
> > (In reply to Franco Pellegrini from comment #19)
> > > What would be the best way to manually update? move the file somewhere else,
> > > logout and login, and then compare the old file with the new one that gets
> > > generated?
> > 
> > If you want to fix this manually, you can try doing this
> > 
> > cd $HOME
> > cp .config/kglobalshortcutsrc kglobalshortcutsrc.backup
> > cp .config/kglobalshortcutsrc kglobalshortcutsrc
> > kate kglobalshortcutsrc
> > 
> > remove from the [org_kde_powerdevil] subsection the lines starting with 
> > Hibernate
> > PowerOff
> > Sleep
> > Decrease Keyboard Brightness
> > Decrease Screen Brightness
> > Increase Keyboard Brightness
> > Increase Screen Brightness
> > Toggle Keyboard Backlight
> > 
> > Move from the [kded5] subsection to the [org_kde_powerdevil] subsection the
> > lines starting with 
> > Hibernate
> > PowerOff
> > Sleep
> > Decrease Keyboard Brightness
> > Decrease Screen Brightness
> > Increase Keyboard Brightness
> > Increase Screen Brightness
> > Toggle Keyboard Backlight
> > 
> > 
> > cp kglobalshortcutsrc .config/kglobalshortcutsrc 
> > 
> > Log out and log in again and it should be fixed.
> > 
> > If all is fine you can delete kglobalshortcutsrc.backup
> 
> This doesn't work for me... I have tried twice but nothing. I attached the
> modified and the original version.

Your original file doesn't have a shortcut for PowerOff, so your modified one doesn't either. you'll have to fix that with systemsettings.
Comment 29 jdvr.tacua 2018-02-14 07:15:00 UTC
(In reply to Albert Astals Cid from comment #28)
> (In reply to jdvr.tacua from comment #24)
> > (In reply to Albert Astals Cid from comment #22)
> > > (In reply to Franco Pellegrini from comment #19)
> > > > What would be the best way to manually update? move the file somewhere else,
> > > > logout and login, and then compare the old file with the new one that gets
> > > > generated?
> > > 
> > > If you want to fix this manually, you can try doing this
> > > 
> > > cd $HOME
> > > cp .config/kglobalshortcutsrc kglobalshortcutsrc.backup
> > > cp .config/kglobalshortcutsrc kglobalshortcutsrc
> > > kate kglobalshortcutsrc
> > > 
> > > remove from the [org_kde_powerdevil] subsection the lines starting with 
> > > Hibernate
> > > PowerOff
> > > Sleep
> > > Decrease Keyboard Brightness
> > > Decrease Screen Brightness
> > > Increase Keyboard Brightness
> > > Increase Screen Brightness
> > > Toggle Keyboard Backlight
> > > 
> > > Move from the [kded5] subsection to the [org_kde_powerdevil] subsection the
> > > lines starting with 
> > > Hibernate
> > > PowerOff
> > > Sleep
> > > Decrease Keyboard Brightness
> > > Decrease Screen Brightness
> > > Increase Keyboard Brightness
> > > Increase Screen Brightness
> > > Toggle Keyboard Backlight
> > > 
> > > 
> > > cp kglobalshortcutsrc .config/kglobalshortcutsrc 
> > > 
> > > Log out and log in again and it should be fixed.
> > > 
> > > If all is fine you can delete kglobalshortcutsrc.backup
> > 
> > This doesn't work for me... I have tried twice but nothing. I attached the
> > modified and the original version.
> 
> Your original file doesn't have a shortcut for PowerOff, so your modified
> one doesn't either. you'll have to fix that with systemsettings.

you're right. I added the shortcut on system settings and now it works.

Thanks.
Comment 30 David Edmundson 2018-02-14 20:08:46 UTC
Can someone with the bug please copy and paste the following into a terminal and report back:

dbus-send --dest=org.kde.kglobalaccel /kglobalaccel org.kde.KGlobalAccel.unregister string:kded5 "string:Hibernate"
dbus-send --dest=org.kde.kglobalaccel /kglobalaccel org.kde.KGlobalAccel.unregister string:kded5 "string:PowerOff"
dbus-send --dest=org.kde.kglobalaccel /kglobalaccel org.kde.KGlobalAccel.unregister string:kded5 "string:Sleep"
dbus-send --dest=org.kde.kglobalaccel /kglobalaccel org.kde.KGlobalAccel.unregister string:kded5 "string:Decrease Keyboard Brightness"
dbus-send --dest=org.kde.kglobalaccel /kglobalaccel org.kde.KGlobalAccel.unregister string:kded5 "string:Decrease Screen Brightness"
dbus-send --dest=org.kde.kglobalaccel /kglobalaccel org.kde.KGlobalAccel.unregister string:kded5 "string:Increase Keyboard Brightness"
dbus-send --dest=org.kde.kglobalaccel /kglobalaccel org.kde.KGlobalAccel.unregister string:kded5 "string:Increase Screen Brightness"
dbus-send --dest=org.kde.kglobalaccel /kglobalaccel org.kde.KGlobalAccel.unregister string:kded5 "string:Toggle Keyboard Backlight"
Comment 31 francisco_t 2018-02-14 21:34:01 UTC
(In reply to David Edmundson from comment #30)
> Can someone with the bug please copy and paste the following into a terminal
> and report back:
> 
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Hibernate"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:PowerOff"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Sleep"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Decrease Keyboard
> Brightness"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Decrease Screen
> Brightness"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Increase Keyboard
> Brightness"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Increase Screen
> Brightness"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Toggle Keyboard
> Backlight"

Nothing happens here. In Spanish or English users.
Comment 32 Luca Weiss 2018-02-14 21:35:30 UTC
Ran those dbus-send commands and the keys still don't work.
Comment 33 gbyte.dev 2018-02-15 08:21:23 UTC
(In reply to David Edmundson from comment #30)
> Can someone with the bug please copy and paste the following into a terminal
> and report back:
> 
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Hibernate"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:PowerOff"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Sleep"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Decrease Keyboard
> Brightness"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Decrease Screen
> Brightness"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Increase Keyboard
> Brightness"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Increase Screen
> Brightness"
> dbus-send --dest=org.kde.kglobalaccel /kglobalaccel
> org.kde.KGlobalAccel.unregister string:kded5 "string:Toggle Keyboard
> Backlight"

Ran the commands, rebooted, no luck.

(In reply to Albert Astals Cid from comment #22)
> (In reply to Franco Pellegrini from comment #19)
> > What would be the best way to manually update? move the file somewhere else,
> > logout and login, and then compare the old file with the new one that gets
> > generated?
> 
> If you want to fix this manually, you can try doing this
> 
> cd $HOME
> cp .config/kglobalshortcutsrc kglobalshortcutsrc.backup
> cp .config/kglobalshortcutsrc kglobalshortcutsrc
> kate kglobalshortcutsrc
> 
> remove from the [org_kde_powerdevil] subsection the lines starting with 
> Hibernate
> PowerOff
> Sleep
> Decrease Keyboard Brightness
> Decrease Screen Brightness
> Increase Keyboard Brightness
> Increase Screen Brightness
> Toggle Keyboard Backlight
> 
> Move from the [kded5] subsection to the [org_kde_powerdevil] subsection the
> lines starting with 
> Hibernate
> PowerOff
> Sleep
> Decrease Keyboard Brightness
> Decrease Screen Brightness
> Increase Keyboard Brightness
> Increase Screen Brightness
> Toggle Keyboard Backlight
> 
> 
> cp kglobalshortcutsrc .config/kglobalshortcutsrc
> 
> Log out and log in again and it should be fixed.
> 
> If all is fine you can delete kglobalshortcutsrc.backup

Apparently upon logging in .config/kglobalshortcutsrc gets reverted to the erroneous state and hotkeys still do not work.
Comment 34 Matt Scheirer 2018-02-16 23:17:26 UTC
(In reply to gbyte.co from comment #33)
> Apparently upon logging in .config/kglobalshortcutsrc gets reverted to the
> erroneous state and hotkeys still do not work.

You can use the GUI editor to do this and it works persistently through sessions. Just set the kded brightness keybinds to None and the Power Management ones to the function keys.
Comment 35 Antonio Rojas 2018-02-18 09:54:08 UTC
*** Bug 390667 has been marked as a duplicate of this bug. ***
Comment 36 Michał Dybczak 2018-02-18 13:23:15 UTC
I have the same problem after upgrading Manjaro from Plasma 5.11.5 to 5.12.1.

Power button stopped working, also brightness keys doesn't work anymore (brigness down fn+f9 and brightness down fn+f10).

I did manual fix as advised in comment 22 but it didn't help at all. Previously I had in [org_kde_powerdevil]:

PowerOff=none,Power Off,Wyłącz


After the fix:

PowerOff=Power Off,Power Off,Wyłącz

Still Power Off is not happening (I have assigned power button to power off).

Similar changes were made on other lines but they didn't work either.
Comment 37 ulusu 2018-02-18 19:23:50 UTC
(In reply to gbyte.co from comment #33)
> Apparently upon logging in .config/kglobalshortcutsrc gets reverted to the
> erroneous state and hotkeys still do not work.

It was the same here. Then I edited .config/kglobalshortcutsrc with kate and switched the content from both sections.

Moved all the lines from section [kded5] to [org_kde_powerdevil] and vice versa. So in section [kded5] there are all the lines with the ending =none and in section [org_kde_powerdevil] are all the lines with the good configuration.

Best regards,
ulusu
Comment 38 Michal Hlavac 2018-02-19 07:45:30 UTC
Can we move this issue to CONFIRMED status?
Comment 39 Michał Dybczak 2018-02-19 17:11:23 UTC
Thanks, @ulusu, it now makes more sense. However, I switched [kded5] lines with [org_kde_powerdevil] but it still doesn't work. After I log off/log in, old lines (or at least some of them) get restored. I did edit it with GUI editor (kwrite).
How can I prevent restoring old, bugged settings? Why doesn't it stick?
Comment 40 ulusu 2018-02-19 17:38:53 UTC
I edited the original file. Not like in the procedure. I don't know if this has something to do with it.

Regards,
ulusu
Comment 41 Michał Dybczak 2018-02-19 19:13:44 UTC
Unfortunately not. I edited original ~/.config/kglobalshortcutsrc file with kwrite and still the same - it gets overwritten with every logoff/ login so it never works :(.
I checked permissions and I had oddly 0777 on original file so I lowered it to 0755 but still no luck, it gets overwritten. What gives?
Comment 42 David Edmundson 2018-02-19 19:55:47 UTC
A secondary migration will be in 5.12.2

>What gives?

Same reason as my original update script didn't work; kglobalaccel is still running whilst you're editing it.
Comment 43 ulusu 2018-02-19 20:58:41 UTC
I don't know. Maybe the fact that I'm running Manjaro KDE. I edited the original file and logged out and in. Then to be sure I rebooted. Still with brightness keys working since yesterday evening. Rechecked my ~/.config/kglobalshortcutsrc. Still the same.

<>
....
[kded5]
Decrease Keyboard Brightness=none,Keyboard Brightness Down,Decrease Keyboard Brightness
Decrease Screen Brightness=none,Monitor Brightness Down,Decrease Screen Brightness
Hibernate=none,Hibernate,Hibernate
Increase Keyboard Brightness=none,Keyboard Brightness Up,Increase Keyboard Brightness
Increase Screen Brightness=none,Monitor Brightness Up,Increase Screen Brightness
PowerOff=none,Power Off,Power Off
Show System Activity=none,Ctrl+Esc,Show System Activity
Sleep=none,Sleep,Suspend
Toggle Keyboard Backlight=none,Keyboard Light On/Off,Toggle Keyboard Backlight
_k_friendly_name=KDE Daemon
display=none,Display\tMeta+P,Switch Display
....
[org_kde_powerdevil]
Decrease Keyboard Brightness=Keyboard Brightness Down,Keyboard Brightness Down,Decrease Keyboard Brightness
Decrease Screen Brightness=Monitor Brightness Down,Monitor Brightness Down,Decrease Screen Brightness
Hibernate=Hibernate,Hibernate,Hibernate
Increase Keyboard Brightness=Keyboard Brightness Up,Keyboard Brightness Up,Increase Keyboard Brightness
Increase Screen Brightness=Monitor Brightness Up,Monitor Brightness Up,Increase Screen Brightness
PowerOff=Power Off,Power Off,Power Off
Show System Activity=Ctrl+Esc,Ctrl+Esc,Show System Activity
Sleep=Sleep,Sleep,Suspend
Toggle Keyboard Backlight=Keyboard Light On/Off,Keyboard Light On/Off,Toggle Keyboard Backlight
_k_friendly_name=Power Management
display=Display\tMeta+P,Display\tMeta+P,Switch Display
</>

Regards,
ulusu
Comment 44 Michał Dybczak 2018-02-19 21:33:36 UTC
(In reply to David Edmundson from comment #42)
> A secondary migration will be in 5.12.2
> 
> >What gives?
> 
> Same reason as my original update script didn't work; kglobalaccel is still
> running whilst you're editing it.

Thanks! I switched to LXQt session, made the changes, relogged to Plasma and now it works! Power button and screen brightness work as intended. That is the peace of the advice that is missing in comment 22.
Comment 45 Christoph Feck 2018-02-19 22:49:57 UTC
Proposed patch at https://phabricator.kde.org/D10668

With immediate positive feedback, this could land in Plasma 5.12.2.
Comment 46 David Edmundson 2018-02-20 12:26:58 UTC
Git commit 4ae36ddddaee91a23dcb0736418295269da14152 by David Edmundson.
Committed on 20/02/2018 at 12:26.
Pushed by davidedmundson into branch 'Plasma/5.12'.

Fix PowerDevil shortcuts migration

Summary:
5.11 -> 5.12 migrated shortcuts from kded5 to the correct component name
org_kde_powerdevil for good reasons
However, despite a kconfupdate script working correctly and moving the
old keys, kglobalaccel is running whilst we update and it syncs the old
values later. On future loads it detects the duplication and removes the
powerdevil entries.

This patch removes the old powermanagent entries in the kded5 component
at powerdevil startup which is at runtime where we can talk to
kglobalaccel, but before powerdevil has registered the new actions.

This should handle both users that haven't upgraded to 5.12 yet, as well
as users who hit the previous config script.

Ideally kconf_update needs to be patched to do migration at appropriate
times.
FIXED-IN: 5.12.2

Test Plan:
"broke" my config by putting in values in the old place with a custom shortcut for poweroff
Restarted kglobalaccel
Ran powerdevil
Shortucts worked
Cleanly quit kglobalaccel
Config stayed synced

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, fvogt, aacid, cfeck, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10668

M  +0    -2    CMakeLists.txt
M  +55   -0    daemon/powerdevilapp.cpp
M  +1    -0    daemon/powerdevilapp.h
D  +0    -1    kconf_update/CMakeLists.txt
D  +0    -12   kconf_update/powerdevil_move_shortcuts.upd

https://commits.kde.org/powerdevil/4ae36ddddaee91a23dcb0736418295269da14152
Comment 47 francisco_t 2018-02-20 16:37:09 UTC
(In reply to David Edmundson from comment #46)
> Git commit 4ae36ddddaee91a23dcb0736418295269da14152 by David Edmundson.
> Committed on 20/02/2018 at 12:26.
> Pushed by davidedmundson into branch 'Plasma/5.12'.
> 
> Fix PowerDevil shortcuts migration
> 
> Summary:
> 5.11 -> 5.12 migrated shortcuts from kded5 to the correct component name
> org_kde_powerdevil for good reasons
> However, despite a kconfupdate script working correctly and moving the
> old keys, kglobalaccel is running whilst we update and it syncs the old
> values later. On future loads it detects the duplication and removes the
> powerdevil entries.
> 
> This patch removes the old powermanagent entries in the kded5 component
> at powerdevil startup which is at runtime where we can talk to
> kglobalaccel, but before powerdevil has registered the new actions.
> 
> This should handle both users that haven't upgraded to 5.12 yet, as well
> as users who hit the previous config script.
> 
> Ideally kconf_update needs to be patched to do migration at appropriate
> times.
> FIXED-IN: 5.12.2
> 
> Test Plan:
> "broke" my config by putting in values in the old place with a custom
> shortcut for poweroff
> Restarted kglobalaccel
> Ran powerdevil
> Shortucts worked
> Cleanly quit kglobalaccel
> Config stayed synced
> 
> Reviewers: #plasma, broulik
> 
> Reviewed By: #plasma, broulik
> 
> Subscribers: broulik, fvogt, aacid, cfeck, plasma-devel
> 
> Tags: #plasma
> 
> Differential Revision: https://phabricator.kde.org/D10668
> 
> M  +0    -2    CMakeLists.txt
> M  +55   -0    daemon/powerdevilapp.cpp
> M  +1    -0    daemon/powerdevilapp.h
> D  +0    -1    kconf_update/CMakeLists.txt
> D  +0    -12   kconf_update/powerdevil_move_shortcuts.upd
> 
> https://commits.kde.org/powerdevil/4ae36ddddaee91a23dcb0736418295269da14152

Will the fix work for multiple users with different languages?
The last update updated my spanish (root) user, but not in the english users.
Comment 48 ulusu 2018-02-20 19:02:04 UTC
Manjaro linux just received "powerdevil 5.12.1-1.1" update. Problem solved.

Regards,
ulusu
Comment 49 Nate Graham 2018-02-20 21:22:26 UTC
*** Bug 390795 has been marked as a duplicate of this bug. ***
Comment 50 Pete Theisen 2018-02-21 15:04:15 UTC
After the update last night update, and a reboot, it is working. Thanks.
Comment 51 Kai Uwe Broulik 2018-02-21 16:32:21 UTC
*** Bug 390850 has been marked as a duplicate of this bug. ***
Comment 52 stanislavb 2018-02-22 07:22:05 UTC
Hello,
after update to the latest version I can lower the brightness of the screen but can not increase it with use of keyboar shortcuts Fn+F11 and Fn+F12 (before the update nothing worked). I use Dell Latitude E5550.  I think it wasn't fully fixed. Thank you.
Comment 53 Kai Uwe Broulik 2018-02-23 08:48:39 UTC
*** Bug 390930 has been marked as a duplicate of this bug. ***
Comment 54 David Edmundson 2018-02-23 13:18:27 UTC
@stan, please provide your ~/.local/share/kglobalshortcutsrc

Did you touch the settings manually between 5.12.0 and 5.12.32?

also ideally the output of running dbus-monitor then pressing the shortcut
Comment 55 stanislavb 2018-02-23 13:27:44 UTC
@David, Today I was able to solve my issue after reading comment from bug 390930. I have reverted all global shortcuts to their default values and now it works. But I am not aware that I would change anything in shortcuts settings before.
Comment 56 kdebugs 2018-04-14 12:40:29 UTC
Hi folks,

Still experiencing this on a Dell laptop. The brightness can't be controlled from either the keyboard or the Battery and Brightness widget. What information can I provide to start troubleshooting?
Comment 57 David Edmundson 2018-04-14 17:56:15 UTC
please provide your ~/.local/share/kglobalshortcutsrc
Comment 58 Salvo "LtWorf" Tomaselli 2018-04-15 06:50:43 UTC
This seems like a different issue to me.

I have the same on my work laptop, I can't control the brightness with the app, so i had to write a shell script to do it. However it is not a problem with the shortcuts since the slider in the app is missing too.

I tried asking in IRC but nobody had a clue on what could be the issue, since the files in /sys to control it exist, and the slider to control the keyboard brightness is present.
Comment 59 kdebugs 2018-04-15 16:01:06 UTC
Created attachment 112046 [details]
kglobalshortcutsrc

The kglobalshortcutsrc file is attached but it wasn't in ~/.local/share, it was in ~/.config/

I'm running Neon 16.04.
Comment 60 David Edmundson 2018-04-15 16:02:27 UTC
Your settings have migrated fine.  This bug remains fixed.
Comment 61 Nate Graham 2018-04-15 16:04:59 UTC
kdebugs@d3801741e.33mail.com, though it looks like *this* bug is fixed, since you're nevertheless still experiencing an issue, that means it must be caused by something else. Please file a new bug to track that.
Comment 62 kdebugs 2018-04-15 16:07:39 UTC
Alright, I filed https://bugs.kde.org/show_bug.cgi?id=391633 previously but got no response.
Comment 63 Salvo "LtWorf" Tomaselli 2018-04-16 05:23:22 UTC
that is closed too
Comment 64 Salvo "LtWorf" Tomaselli 2018-04-16 05:24:36 UTC
Ah my fault ignore that, it's confirmed (so it had a reply) but still open