2

I have recently performed an update on my Dell XPS 15.

Before the update, the keyboard layout as much as the keyboard shortcuts were working: my German keyboard was recognized, I could switch between keyboard layouts using Super+Space and the Keyboard Shortcuts using the Super key defined in Settings->Devices->Keyboard were working.

After the update, the Super key alone is switching between different Keyboard layouts and NONE tested Keyboard Shortcuts using the Super are working including those that I erased and defined again. Hence, I can not switch between the keyboard layouts using Super+Space.

The responsible update seems to be one of the following (from /var/log/apt/history.log)

Start-Date: 2018-07-31  01:09:58
Commandline: packagekit role='update-packages'
Upgrade: papirus-icon-theme:amd64 (20180723-2516+pkg18~ubuntu18.04.1, 20180728-2528+pkg18~ubuntu18.04.1), console-setup-linux:amd64 (1.178ubuntu2.2, 1.178ubuntu2.3), console-setup:amd64 (1.178ubuntu2.2, 1.178ubuntu2.3), keyboard-configuration:amd64 (1.178ubuntu2.2, 1.178ubuntu2.3)
End-Date: 2018-07-31  01:10:24

Start-Date: 2018-07-31  09:50:32
Commandline: aptdaemon role='role-commit-packages' sender=':1.142'
Install: hunspell-en-gb:amd64 (1:6.0.3-3), hunspell-en-za:amd64 (1:6.0.3-3), hyphen-en-ca:amd64 (0.10), hyphen-en-gb:amd64 (1:6.0.3-3), libreoffice-l10n-en-gb:amd64 (1:6.0.3-0ubuntu1), libreoffice-l10n-en-za:amd64 (1:6.0.3-0ubuntu1), thunderbird-locale-en-gb:amd64 (1:52.9.1+build3-0ubuntu0.18.04.1), mythes-en-au:amd64 (2.1-5.4), libreoffice-help-en-gb:amd64 (1:6.0.3-0ubuntu1), hunspell-en-au:amd64 (1:2017.08.24), hunspell-en-ca:amd64 (1:2017.08.24)
End-Date: 2018-07-31  09:50:35

Attempted solution: As described here How to permanently configure keyboard I executed

sudo dpkg-reconfigure keyboard-configuration

Selecting "keyboard model: Dell Inspiron 6000/8000 laptop, origin of the keyboard: German, keyboard layout: German, function as AltGr " The default..., No compose key, and no key for X server termination" gives

WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
WARNING: Unknown X keysym "dead_belowmacron"
Your console font configuration will be updated the next time your system
boots. If you want to update it now, run 'setupcon' from a virtual console.
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.130ubuntu3.1) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-29-generic

After this, everything is working as before the update as described above.

Problem Suprisingly (update-initramfs was called and it was mentioned in the link that this would stick) the changes disappear after reboot. In addition, if I add or remove a keyboard layout via Settings->Region&Language I am also back with my old problems.

I also tried changing /etc/default/keyboard by hand which does not change anything.

Commands and output as suggested by Gunnar Hjalmarsson :

  1. cat /etc/default/keyboard

    XKBLAYOUT="de"
    BACKSPACE="guess"
    XKBVARIANT=""
    XKBMODEL="inspiron"
    XKBOPTIONS=""
    
  2. gsettings get org.gnome.desktop.input-sources xkb-options

    GLib-GIO-Message: 10:49:09.149: Using the 'memory' GSettings backend.  
    Your settings will not be saved or shared with other applications.
    @as []  
    
  3. setxkbmap -query -v 10

    Setting verbose level to 10
    locale is C
    Trying to load rules file ./rules/evdev...
    Trying to load rules file /usr/share/X11/xkb/rules/evdev...
    Success.
    Applied rules from evdev:
    rules:      evdev
    model:      inspiron
    layout:     de,us,us
    variant:    ,,
    options:    grp:lwin_toggle,grp_led:scroll
    Trying to build keymap using the following components:
    keycodes:   evdev+aliases(qwertz)
    types:      complete
    compat:     complete+ledscroll(group_lock)
    symbols:    pc+de+us:2+us:3+inet(evdev)+group(lwin_toggle)
    geometry:   pc(pc104)
    rules:      evdev
    model:      inspiron
    layout:     de,us,us
    variant:    ,,
    options:    grp:lwin_toggle,grp_led:scroll
    

On checking whether dconf database might be corrupted via

cd ~/.config/dconf
mv user user.bak

and re-login, I can change the Keyboard shortcuts under Settings->Devices->Keyboard and I can switch between layouts via Super+Space. Everything still works after reboot. Obviously all my settings are gone with this approach and I would need to reinstall all my gnome extensions etc. Is there a way to fix the dconf database (which parameters to change)?

  • 1
    Can you please edit your question and show us the output of these commands: 1. cat /etc/default/keyboard 2. gsettings get org.gnome.desktop.input-sources xkb-options 3. setxkbmap -query -v 10 – Gunnar Hjalmarsson Jul 31 '18 at 23:52
1

I could fully resolve the issue by changing dconf as follows: Install dconf editor:

sudo apt install dconf-editor

Open the editor in command line by

dconf-editor

Then go to

/org/gnome/desktop/input-sources/xkb-options

Here I turned off option "Use default value"

This resolved all issues described above. Thanks to @Gunnar Hjalmarsson for pointing me to dconf. This link was helpful for dconf with a picture.

0

I see from the setxkbmap command that the option grp:lwin_toggle is set, which probably explains why only pressing the Super key switches layout. At the same time /etc/default/keyboard does not include any XKBOPTIONS, neither does the desktop setting (the gsettings command).

Based on that info, a reboot should fix it.

But then you say that adding/removing some layout from Region & Language messes it up. I notice a warning message when you run the gsettings command, and wonder if your dconf database might be corrupted. To find out, you may want to try these commands:

cd ~/.config/dconf
mv user user.bak

and relogin.

  • Thanks you for all your help! Do you know whether it is possible to fix the config file? – dgruending Aug 6 '18 at 7:19
  • @dgruending: Since you ask, did that renaming idea help? I'm not aware of a way to fix a corrupted dconf database. (Not saying it can't be done.) – Gunnar Hjalmarsson Aug 6 '18 at 7:43
  • I edited the question - the keyboard problem seems to be gone, but with the renaming approach I will have to reinstall gnome extensions, background and whatever else is stored in that file. So your answer solves the basic issue -> accepted – dgruending Aug 6 '18 at 13:19
  • @dgruending: You may want to ask a separate question about how to fix the database. Otherwise few will see that part of your question. – Gunnar Hjalmarsson Aug 6 '18 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.