Bug 449002 - Keyboard layout that was modified using `xmodmap` gets reset after system wakeup
Summary: Keyboard layout that was modified using `xmodmap` gets reset after system wakeup
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.23.5
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL: https://superuser.com/questions/11739...
Keywords: X11-only
Depends on:
Blocks:
 
Reported: 2022-01-23 10:49 UTC by Cruz Enrique
Modified: 2025-05-05 03:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cruz Enrique 2022-01-23 10:49:27 UTC
SUMMARY
I have created a auto start scrip [1] to modify my keyboard distribution (laptop keyboard without menu key, in fact is a KDE slimbook with Neon). At startup, it works fine but after any suspend event, the configuration is lost. I am using X11 and have not tested with wayland (not sure if the script works anymore in wayland, although). The bug seems to exists from some time [2] and happens to more people than me. 

[1] xmodmap -e "keycode 105 = Menu"
[2] https://superuser.com/questions/1173979/how-to-run-programs-in-kde-after-suspend-wakeup

STEPS TO REPRODUCE
1. Trigger any suspend actions
2. Configuration is lost
3. If I manually execute the code, the configuration is restored

OBSERVED RESULT


EXPECTED RESULT
Configuration is keep after suspend events

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Neon
(available in About System)
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Nicolas Fella 2022-01-23 11:26:23 UTC
What do you mean with "configuration is lost"?

Autostart scripts are run at *Start*, they are not supposed to run on wakeup
Comment 2 Cruz Enrique 2022-01-23 11:33:25 UTC
(In reply to Nicolas Fella from comment #1)
> What do you mean with "configuration is lost"?

The effect of the script is lost. I mean, "somewhere" , "something" is re running the configuration of xmodmap when I think it should not be done. I assume that other configurations (probably, related to screens) are also executed (and this is why we have a lot of screen flicker when we restart from suspend). Could this be a side effect of kscreen trying to hard to reconfigure the xserver?
 
> Autostart scripts are run at *Start*, they are not supposed to run on wakeup

Yes, this is a good point. In that case, I am not sure if this is a bug or a new feature to be added
Comment 3 Nate Graham 2022-01-23 22:02:40 UTC
Indeed, autostart scripts only run on startup, not wakeup.

The real bug here is that waking up the system undoes your xmodmap modification. Not sure what does that but it'd definitely not the KCM; moving to plasmashell. It might even be an X server thing.
Comment 4 Nate Graham 2025-04-05 20:40:53 UTC
Are you still seeing this on a recent Plasma version like 6.3, Cruz? At this point I'm pretty sure it's not a Plasma issue FWIW.
Comment 5 Cruz Enrique 2025-04-05 20:46:20 UTC
I have moved to wayland in that laptop and I am not sure as I hardly use it anymore. If I manage to start a X session, I will try tomorrow afternoon.
Comment 6 Bug Janitor Service 2025-04-20 03:47:05 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2025-05-05 03:47:12 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.