Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key combination for keyboard layout is reset to default one on every reboot. #2556

Open
vodolaz095 opened this issue Apr 18, 2024 · 4 comments

Comments

@vodolaz095
Copy link

Expected Behavior

Combination for changing keyboard input layout is not reset to default one after system is rebooted.
In my case i want it to be Ctrl*Space as i have set.

Current Behavior

Combination for changing keyboard input layout is reset to default one (Alt+Space) after system is rebooted

Possible Solution

Seems like it doesn't read config files from ~/.config/lxqt/... when system is started.

Steps to Reproduce (for bugs)
  1. Open application to set settings for input method
    2024-04-18-185537_729x400_scrot
  2. Change key combination for switching layout to different one (from ALT+Shift to Ctrl + Space)
  3. Ensure you have Russian, English and Polish keyboard layouts enabled, or, at least any two of them.
  4. Press "Apply" and ensure keyboard layout was changed by typing something in terminal, or editor and so on.
  5. Work some time, and then reboot computer by usual means (Start Button -> Reboot)
  6. Open any text editor, terminal (etc) when device is booted
  7. Combination to change layout has not changed from Alt+Shift to Ctrl + Space.

it is worth notice i have stack Fedora 39 LXQT setup, no ibus and other keyboard changing applications as mentioned in warning are running.

Context

I need to loose some time to set keyboard layout every time i turn on my PC.
I want keyboard layout settings to persist.

System Information
  • Distribution & Version: Fedora 39 LXQT spin
  • Kernel: 6.8.6-200.fc39.x86_64
  • Qt Version: stack
  • liblxqt Version: 1.3.0
  • Package version: 1.3.0
@tsujan
Copy link
Member

tsujan commented Apr 18, 2024

Not reproducible.

If you find more info that you think may make it reproducible, please add it.

@vodolaz095
Copy link
Author

i'll research this bug more, is there any way to enable verbose logging, like LXDE does with ~/.xsession-errors?

@vodolaz095
Copy link
Author

vodolaz095 commented Apr 19, 2024

this is how i fixed it:

  1. consider your login is user1
  2. login as different user user2
  3. become root by su/sudo - you need to edit config files of user1 without authorizing as it
  4. edit file /home/user1/.config/lxqt/session.conf in order to make it have this contents - notice [Keyboard] section - all other sections were untouched.
[General]
__userfile__=true

[Environment]
GTK_CSD=0
GTK_OVERLAY_SCROLLING=0

[Keyboard]
layout="us,ru,pl"
model=pc105
options=grp:ctrl_space_toggle, grp:ctrl_space_toggle
variant=","

yes, options=grp:ctrl_space_toggle, grp:ctrl_space_toggle - two times, when i have set parameter via gui it worked this way, and was changed to default one when there was single occurrence. It can be wise to set layout="us,ru,pl" to the ones you wish

  1. reboot machine
  2. now key combination Ctrl+Space changes layout
  3. Wszystko działa!
  4. И слава Тебе, Господи, слава Тебе!

i assume origin of this issue and related ones
#2358 (and so on) is somehow related to loading/saving configuration files.
Either system cannot catch fsnotify events when file is changed, or there are a lot of edge conditions in logic for working for configuration files persistence and refreshing.

All configuration not saved issues seems to be fixed by editing user's configs in ~/.config/lxqt/... while user is offline.

@Bluey26
Copy link

Bluey26 commented Apr 19, 2024

Hello.

I recall having an issue like this in the past. The keyboard layout settings (the languages) were not saved. For this, i decided to use localectl instead of the default lxqt layout method, with a command like this one:

localectl --no-convert set-x11-keymap latam,ru,gr pc105 deadtilde,phonetic, grp:lwin_toggle

This depends on X11. I am not sure if the problem was the same as this one, but i recall that the issue may be something as Archlinux 'resetting the keyboard layouts after an upgrade of the system' . I do not recall if it was also changed between reboots, but i guess so. (If i recall correctly, there is a hook that sets keyboard settings on kernel updates).

The command is just an utility, but inside session.conf i obtain the desired result, and it is conserved between reboots:

[Keyboard]
layout="latam,ru,gr"
model=pc105
options=grp:lwin_toggle, grp:lwin_toggle
variant="deadtilde,phonetic,"

More info about the command can be found on: https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Using_X_configuration_files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants