Solved Keymap changed on resume

Crivens

Administrator
Staff member
Administrator
Moderator
Hi all.
Since my machine now S3-s fine, I got aware of the keymap being qwerty on resume. Am I the only one? And - how to fix it? The keymap is set in /etc/rc.conf as by installer.
 
Important point: this happens when there is a USB keyboard when resuming.
 
I might be of very little help here as I only recently starting using FreeBSD in a desktop environment but might still be worth a shot: I have this in my ~/.xinitrc:
Code:
setxkbmap us intl
(Adapt to the keymap of your choosing)

Resuming from S3 works fine and they keymap remains the same.
 
Maybe forcing a keyboard configuration with something like that in /usr/local/etc/X11/xorg.conf.d:

Code:
Section "InputClass"       
    Identifier "system-keyboard"       
    MatchIsKeyboard "on"       
    Option "XkbLayout" "us"       
    Option "XkbModel" "logitech_g15"       
    Option "XkbVariant" "intl"
EndSection
 
Ah, it is not resume messing up. It is the attaching of a keyboard that does it.
Press key: Z
Attach keyboard
Same key: Y
 
Last edited:
I have no idea how to handle this correctly but one thing that comes to mind is writing a devd rule which will invoke setxkbmap upon receiving the corresponding notification.
 
I tried that with the resume script. The problem is that you can't control the X server from there.
Cannot open display "default display"
 
Maybe forcing a keyboard configuration with something like that in /usr/local/etc/X11/xorg.conf.d:

Code:
Section "InputClass"      
    Identifier "system-keyboard"      
    MatchIsKeyboard "on"      
    Option "XkbLayout" "us"      
    Option "XkbModel" "logitech_g15"      
    Option "XkbVariant" "intl"
EndSection
That did it. I didn't even need to change the model :)
 
Back
Top