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
changed keyboard layout does not survive reboot #4
Comments
The problem is that for some reason, the command to reload the saved keyboard when X starts up does not seem to be automatically running in every case. There is a fix for this which involves running the keyboard settings reload in the general autostart settings rather than those in the session manager; this has been tested and found to work, and will be pushed in the next update. |
If you want to try the fix, create the file /home/pi/.config/autostart/lxkeymap.desktop, with the following content: [Desktop Entry] It would be great if you could confirm whether or not that works on your system - many thanks. |
yes, that made the change...
so it works. |
Thanks for testing; we'll include it in the next release. |
a recent update with "sudo apt-get -y upgrade" broke the de-DE key layout settings again, now even with the workaround you showed me before (lxkeymap.desktop). |
maybe not the update is now the issue... |
I have the same problem as beta-tester. In my specific case, I use a KVM switch to connect to the RPi. The selected language doesn't matter. Upon reconnecting the keyboard to the RPi, keyboard layout setting goes back to "United Kingdom - English (UK)". |
i opened a new issue for the unplug/plug issue. |
spl237, what do you mean by "next release"? Does it mean that this will be fixed in Raspbian Stretch that will be released in about two years? You know, this is not an advanced feature, but a basic feature that should no question work without a slightest issue. |
We make several releases of Raspbian each year. The fix for this will be in the next one. If you can't wait that long, then it is already in apt and can be downloaded from there using apt-get upgrade, or you can simply apply the fix described in my posting above. If none of that is acceptable to you, then given the educational aims of the Raspberry Pi project and the free and open-source nature of Raspbian, why not try contributing to the community by fixing it yourself? |
Well, I have already done apt-get upgrade, but the misbehaviour still continues. The keyboard layout set from raspi-config seems to persist reboots, but the one set from lxde settings per-user basis does not. Does Raspbian's X11 somehow use the console's keyboard layout by default, or how does it work?
Unfortunately I find your answer lacking in internal consistency. The fix should be already committed, but on the other hand I should become a programmer and submit a fix for it? I'm sorry but now I don't understand. |
You say "The keyboard layout set from raspi-config seems to persist reboots, but the one set from lxde settings per-user basis does not." What exactly do you mean by "the one set from lxde settings per-user basis"? Are you referring to the keyboard setting dialog accessed from the Raspberry Pi Configuration dialog (whose setting does persist across reboots if you have the bug fix referred to above) or something else? Settings made in any fashion other than through the keyboard settings dialog accessed from Raspberry Pi Configuration or from the Mouse and Keyboard Settings application are not supported. Does your /home/pi/.config/autostart/ directory contain an lxkeymap.desktop file? Or is there one in /etc/xdg/autostart? If not, then you haven't upgraded correctly from apt - if there is, then a keyboard setting made in the Raspberry Pi Configuration application should be persisting over a reboot - this has been extensively tested and is known to work. |
Now it started to function. I had to run apt-get upgrade multiple times for some reason. I used the Mouse and Keyboard Settings from the menu. |
Just running apt-get upgrade didn't work on my pi, but according to the output the raspberrypi-ui-mods package got held back. Running apt-get dist-upgrade fixed it. |
I just found the same issue with raspbian 2016-02-09. Running apt-get upgrade did not help me. But after some investigation the file /home/pi/.config/lxkeymap.cfg was found. This file caused the issue with changing keyboard layout after reboot. I removed lxkeymap.cfg (back-up first) and everything started to work. |
I had the same problem and running apt-get dist-upgrade fixed it. |
spl237, Your solution worked perfectly here....tested with Brazilian layout and a Raspberry Pi 2 B running Raspbian Jessie. Thanks ! |
I have followed your solution of writing lxkeymap.desktop file in Raspberypi3 but it didnt worked. |
Hi everyone, An update: in the new version of Raspbian, this issue seems to be fixed without the need for scripts. I've tested the 2016-03-18-raspbian-jessie.img with success available in: |
Hey there, It's 2017, I am on a Raspberry Pi 3B and just installed a virgin Raspian Jessie with Pixel (Release 2017-01-11) and am still facing the issue. I did all updates and upgrades. A shutdown followed by a regular start keeps the keyboard settings at de_DE. I am using a bluetooth keyboard. It re-connects automatically after reboot. Only the language settings are being changed back to English. Any other ideas? What I could do? Thanks very much |
Same issues as Frank, though I'll add that my BT kb is being reset to UK QWERTY from US Dvorak not just on reboot, but every time it powersaves and reconnects, no pi reboot needed. |
OK, looks as if there may be an issue with how Bluetooth keyboards interact with the driver - I'll have a look when I get a chance. |
Quick update: since posting yesterday I've installed RetroPi (via the installer script for raspbian, not a drive image) and if set using retropi's config tool, the setting sticks through reboots and k.b. powersaves. Little drastic as a workaround, but i figured it might be useful info while investigating. |
I can set my keyboard to US English 104 key via With a wired keyboard and a wireless mouse, I was having issues with it switching to a UK keyboard every reboot. For me, the thing that fixed it was editing the file /home/pi/.config/lxkeymap.cfg and removing the text "intl" from the "variant =" option. After that, it worked like a charm. |
I believe I have found the issue here. The keymap is loaded by a call to lxkeymap --autostart on boot, but the keymap seems to be lost as soon as a keyboard is disconnected; at initial boot, a Bluetooth keyboard is probably disconnected as it has not yet been woken from sleep, so no keymap loads. I've modified the Bluetooth plugin for lxpanel (which manages all Bluetooth connections for the desktop) so that lxkeymap --autostart is run whenever a BT keyboard connects. In my testing here, this retains BT keyboard maps over a reboot and when a keyboard sleeps and is rewoken. We'll push this change out into apt in the near future - if anyone wants it before then, feel free to check out and rebuild lxpanel from the raspberrypi-ui GitHub repo. |
After changing the layout, I typed ~ in terminal and it worked well. But if I changed window to Text Editor immediately and type ~, it was not ~ any more. Is this the same issue? |
still have this issue on stretch ... am I alone? |
No, I have the same problem! Every other setting in the Raspberry setting panel is remembered, but not the keyboard layout. I use Stretch from the Google AIYproject. EDIT: after a reboot or 3 the problem solved itself. I already updated an upraded, but I guess updating and rebooting once more did the trick. Or maybe I have a non-recognised keyboard, I use different keyboards sometimes. |
Same here... fresh install of stretch and i noticed that keyboard layout selection is not loaded after reboot. |
I've just checked this on the current image - if you use the Keyboard Settings dialog (accessed from either the Localisation page on Raspberry Pi Configuration, or the Keyboard tab in Mouse and Keyboard Settings), the setting is saved over reboot and correctly reloaded. The fixes above were all integrated; if this doesn't work on your image, I suspect you are either setting the keyboard language by some method other than the dialog mentioned above, or something in your startup is broken and no longer loading the keymap at startup. I am not surprised that this doesn't work in the AIY version of Stretch; that's a pretty hacked-about release of Raspbian with known problems. |
I have configured the keyboard layout via raspiconfig on a fresh install of raspbian stretch downloaded from the official website. hardware is a raspberry pi 3. this does look like a bug. |
raspi-config is not the correct way to configure the keyboard for the desktop - you need to use the Keyboard Settings dialog, as described above. |
Indeed, i could work this around by setting the layout via the graphical interface (Main menu > Preferences > Mouse and Keyboard Settings > Keyboard > Keyboard Layout...) |
But why raspi-config does not work? |
Probably because, like a lot of the code in raspi-config, this particular option is old and ought to be deprecated. raspi-config is only really provided for backward compatibility in the console environment, but it isn't actively maintained - the GUI tool does everything raspi-config does, and is the recommended method for configuration. |
I am sorry, this method does not work as well, at least for me on Stretch.
…On Sat, Feb 24, 2018 at 12:19 PM, peentoon ***@***.***> wrote:
Indeed, i could work this around by setting the layout via the graphical
interface (Main menu > Preferences > Mouse and Keyboard Settings > Keyboard
> Keyboard Layout...)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI8aNWaRCodK2hdhHk0ud3Wc4wSzZigJks5tX_BbgaJpZM4GIj0f>
.
|
In that case, something is broken in your image - this method has been repeatedly tested on the Stretch image and it definitely works. Try downloading the latest clean image and see if it works on there; if it does, some change you have made to your image is breaking it. |
thanks for this input, but are you suggesting "format c: and reboot" like
in MS windows? sorry but there must be a way (just I do not know it, sorry
for my ignorance) to log what is going on at boot time and see why the US
keyboard is loaded instead of my local one. any idea in this sense?
any how, this is "the" image of stretch from raspberry pi website
https://www.raspberrypi.org/downloads/raspbian/ , no hacks as far as I
know. maybe I have done something to set it incorrectly/inconsistently,
still I was hoping to solve the problem not to format the SD card to solve
it.
…On Sat, Feb 24, 2018 at 1:28 PM, Simon Long ***@***.***> wrote:
In that case, something is broken in your image - this method has been
repeatedly tested on the Stretch image and it definitely works. Try
downloading the latest clean image and see if it works on there; if it
does, some change you have made to your image is breaking it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI8aNYdtfGL_h-kymgQTFGuxSZVCnd05ks5tYABkgaJpZM4GIj0f>
.
|
I have a brand new pure install of |
SOLUTION: Had to edit my config file directly.
and change Upon reboot I'm now good to go. |
I noticed that it is still not working properly after so many updates, since the "Close" button at the "Keyboard Layout Handler" does not mean OK, SAVE AND CLOSE the window. My solution was to add two Keyboard Layout Handler to the Taskbar. One of them was set up, so that "Keep System Layouts" was ticked, one was with "Do not Reset Existing Options". In the meantime the one with the "Do not Reset Existing Options" ticked had been filled up with the proper languages I wanted, the other one left as is. Windows closed with Alt + F4 instead of Close button. I also went to Preferences/Keyboard and Mouse menu and changed the Keyboard layout there, so the first and second icon changed, but when pressing the Ctrl + Shift + CapsLock only the second icon changed. That means the application works, so I hit the key combinations until the first icon showed some text EVDEV or something, then removed it from the task bar. In the same time I added a spacer after the Keyboard Layout Handler and closed it. The thing got saved and survived rebooting. |
Thank you, Problematician, that trick worked (nothing else did). I got buster: I suspect this has something to do with the fact that clicking "Close" in the "Keyboard Layout Handler" dialog, doesn't do anything. You have to click "x" in the top right corner. |
The lxpanel plugin xkb seems to not save it's config correctly for us. I resorted to edit the config manually. Edit Find the xkb plugin entry. Mine on rpi400/RaspberryPiOS looked like this:
Update it with whatever you want, for me I want display as text instead of flags, and two keyboard layout:
I deduces the key/value from reading the code at https://github.com/lxde/lxpanel/tree/master/plugins/xkb. |
according to https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=122060
if i install Raspbian Jessie and use the "Raspberry Pi Configuration" and change the keyboard layout from en-UK to de-DE, the keyboard layout is changed only temporary.
as soon i reboot the Raspberry Pi, all keyboard layout changes gone lost, i made with "Raspberry Pi Configuration"
i have install Raspbian Jessie via NOOBS v1.4.2 and via NOOBS lite v1.4 on a RPi1B and RPi2B.
if i change in NOOBS the keyboard layout, and install Raspbian, then this changed keyboard layout takes affect in the OS - that works and survive reboots
(it is a one-time change via /boot/os_config.json and init.d).
if i change the keyboard layout via raspi-config afterwards the installation of Raspbian, that works as well and survive reboots.
but if i change the keyboard layout via "Raspberry Pi Configuration" the keyboard layout is gone and is back to what ever it was bafore i used "Raspberry Pi Configuration".
The text was updated successfully, but these errors were encountered: