You are not logged in.

#1 2017-03-02 19:00:43

bieniekmat
Member
Registered: 2014-07-27
Posts: 21

Keyboard layout lost after systemctl suspend with xscreensaver

I've configured everything and still occasionally my keyboard layout is lost. Whether it is the fault of systemctl suspension or the xscreensaver, I am not sure. The keyboard layout is set to US in both, xorg and the terminal.

/etc/vconsole.conf:
KEYMAP=uk

.xinitrc and .profile contain:
setxkbmap gb

/etc/locale.gen
en_GB.UTF-8 UTF-8

/etc/X11/xorg.conf.d
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "gb"
EndSection

Do you have any suggestions? Thanks

Offline

#2 2017-03-02 19:18:03

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Keyboard layout lost after systemctl suspend with xscreensaver

What's the output of...

localectl

...before and after suspending?

How do you start X?

What DE are you using? If it's Gnome are you using X or Wayland?

Last edited by Slithery (2017-03-02 19:19:10)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-03-02 19:40:17

bieniekmat
Member
Registered: 2014-07-27
Posts: 21

Re: Keyboard layout lost after systemctl suspend with xscreensaver

So that's another issue. I cannot easily reproduce this problem. If I start xscreensaver myself which I use a lot to lock the screen, this does not happen. The sleep itself in short periods of time does not do it either (it also does not start xscreensaver if the period of sleep is too short).

Right now localectl gives the correct settings. I'll update the post once the problem happens again. This is the correct layout:
   System Locale: LANG=en_GB.UTF-8
       VC Keymap: uk
      X11 Layout: gb


My DE is Awesome WM with Xorg, which on arch wiki says that the keyboard configuration in Xorg is used.

Thanks

Last edited by bieniekmat (2017-03-02 19:41:13)

Offline

#4 2017-03-02 19:57:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,182

Re: Keyboard layout lost after systemctl suspend with xscreensaver

.xinitrc and .profile contain:
setxkbmap gb

Why? It sounds as if the keyboard gets removed and re-added w/ the STR , if the layout isn't successfully configured by the xorg snippet (check the xorg log and dmesg for the pot. keyboard re-addition) but only the setxkbmap  calls (of which one should be superfluous), you'll end up with a US keyboard.

Notice:if "/etc/X11/xorg.conf.d" is a file (as your post suggests) - that won't work. /etc/X11/xorg.conf.d is supposed to be a directory which contains several files (eg. 11-keyboard.conf / root:root, 644)

Offline

#5 2017-03-02 20:27:28

bieniekmat
Member
Registered: 2014-07-27
Posts: 21

Re: Keyboard layout lost after systemctl suspend with xscreensaver

I added the laytout setting to .profile despite .xinitrc a few days ago as a simple test.

Of course the path is a directory as you noticed. The correct path is /etc/X11/xorg.conf.d/00-keyboard.conf

The next time it happens I'll investigate the logs.

Thanks

Offline

#6 2017-03-02 20:40:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,182

Re: Keyboard layout lost after systemctl suspend with xscreensaver

so the xinitrc call is required? the xorg configlet isn't sufficient (for basic usage, ignoring the issue of this thread)?

Offline

#7 2017-03-02 20:49:35

bieniekmat
Member
Registered: 2014-07-27
Posts: 21

Re: Keyboard layout lost after systemctl suspend with xscreensaver

The .xinitrc is sufficient, I've added the other settings later on to see if that removes the occasional problem.

After rebooting the system the layout is configured fine. It is only occasionally that the settings are lost and that could be linked to system suspension.

Offline

#8 2017-03-02 20:53:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 79,182

Re: Keyboard layout lost after systemctl suspend with xscreensaver

the point is that /etc/X11/xorg.conf.d/00-keyboard.conf should suffice and any setxkbmap calls should be unrequired entirely.

Offline

#9 2017-03-02 20:57:08

bieniekmat
Member
Registered: 2014-07-27
Posts: 21

Re: Keyboard layout lost after systemctl suspend with xscreensaver

Of course. This was just quick tests to see if this changes anything with hopes that whichever configuration is picked up, it will be the one I want.

Offline

Board footer

Powered by FluxBB