Lock screen uses last active window's language instead of default keyboard language

Bug #1286910 reported by Mikhail V. Golubev on 2014-03-02
This bug affects 87 people
Affects Status Importance Assigned to Milestone
GNOME Screensaver
Ubuntu GNOME
unity (Ubuntu)

Bug Description

Lock screen (gnome-screensaver) uses last active window's language (keyboard layout) instead of default keyboard language.

Steps to reproduce this bug:
1. In the system Text Entry settings:
  1a. add two or more languages to the input sources list, e.g. English (as first and default) and Russian (as second);
  1b. Set hotkeys to switch sources (e.g. Ctrl+Shift or CapsLock).
  1c. Select "Allow different sources for each window" radio button.
  1d. Select "New windows use the default source" radio button.
2. Run any application (e.g. gedit) and switch keyboard to second input language (Russian).
3. Lock the screen (Ctrl+Alt+L) or just wait idle time.
4. See what language set by default for password input in the lock screen.

Expected: lock screen uses first input language (English) by default.
What happened instead: lock screen uses last active window's language (Russian).

Ubuntu versions affected: Ubuntu 13.10, Ubuntu 14.04 (daily builds)
gnome-screensaver versions: 3.6.1-0ubuntu7, 3.6.1-0ubuntu9

affects: unity-greeter → unity
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-screensaver (Ubuntu):
status: New → Confirmed
ivan (funivan) wrote :


I have the same problem.

Ubuntu 14.04

Linux ivan 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

gnome-screensaver version 3.6.1

Andrea Azzarone (azzar1) on 2014-05-28
tags: added: lockscreen
removed: lock-screen
Stanislav (stanislav-schmidt) wrote :

I can confirm this too.

I don't have the option "Allow different sources for each window" enable, but the bug still works. My setup is:
 - two keyboard layouts: English and Russian
 - Alt+LShift to change between layouts.
 - Use the same input source for all windows enabled.

I switch the layout to Russian, then lock the screen via Ctrl+Alt+L. Result: the lock screen keyboard layout is set to Russian instead of the default English layout.

An additional commend: the lock screen inherits the keyboard layout from the desktop, but the converse is not true: the layout of the desktop is the same as it was before the screen was locked, independently of whether it has been changed in the lock screen.

Linux stan-ThinkPad-T530 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
gnome-screensaver 3.6.1-0ubuntu13 (trusty)

mingToM (mingtom) wrote :

I can confirm this

Stan (sergienko-stanislav) wrote :

i have the same problem with en and ru layouts.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed

The solution in https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/1240198/comments/19 for other bug seems to affect this one as well.

Mikhail V. Golubev (mvgolubev) wrote :

This sulution (https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/1240198/comments/19) doesn't work for me (Ubuntu 14.04 LTS).

CONSTantius (constantius9) wrote :
ihoru (ihor-polyakov) wrote :

I have the same problem

ihoru (ihor-polyakov) wrote :

 Ubuntu 14.10
gnome-screensaver 3.6.1

Andrea Azzarone (azzar1) on 2015-09-21
Changed in unity:
status: New → Confirmed
importance: Undecided → Medium
Changed in unity (Ubuntu):
importance: Undecided → Medium
no longer affects: gnome-screensaver (Ubuntu)
Seth Johnson (sethj) wrote :

As part of the big bug review for 16.04 LTS I have tested this on 15.10 and the bug is still there. I was able to reproduce it 2 out of 6 tries, so it doesn't seem to always happen every time, but it does happen.

tags: added: desktop-bugscrub-triaged
Yura Pakhuchiy (yura-p) wrote :

Exactly the same issue with GNOME in Ubuntu 16.04

affects: ubuntu-gnome → gnome-screensaver
Ya'ar Hever (yhever) wrote :

Same issue here on GNOME 3 in Ubuntu 16.04.

uwe (maabdulhaq) wrote :

Same issue here, but I'm not sure its unity specific, I'm using gnome shell and getting issues unlocking the screen, i can (supposedly) switch language from the unlock screen dialogue, but it actually does not change the language, I'm using arabic as the second input language, and even when I set the language to english in that dialogue, It seems to input arabic characters (try to use b or B or T; corresponding to two characters ﻻ, ﻵ and ﻹ . and will show two dots; I use it as indicator for what language is beint input.

uwe (maabdulhaq) wrote :

It might be bug 1244548 in my case, as gnome-screensaver is indeed the process running, but maybe they share a common base.

Vizvamitra (vizvamitra) wrote :

Same for me.

Ubuntu 16.04 x64, en and ru locales, solution with ibus-setup doesn't work for me.

Also pressing alt+shift on a login screen to change keybord layout from ru to en doesn't work too: screen blinks, shows me my desktop with running apps for a second or less and then shows login screen again, with ru layout set.

Hopefully keybord layout selector does work...

Yura Pakhuchiy (yura-p) wrote :

I believe this is not duplicate bug. And it is definitely not in case if GNOME shell in use, not compiz.

Andrey Paskal (andrey.paskal) wrote :

How many years this bug will live?

atimonin (atimonin) wrote :


Aleksandr (ishvarko) wrote :

16.04.1 - all the same.

Anton Vodonosov (avodonosov) wrote :

What makes this issue sever is that you should restart your computer, killing all programs - there is no other way.

@avodonosov there is a way to workaround this, at least with GTK Greeter: one can "Switch User" on the lock screen => the language is reset, it is possible to login with the same user => all the applications are running as before the lock screen operation.

I had the problem of sometimes having to use an alternative XKB keyboard back in 12.04 Precise, but then I could simply choose my default keyboard.

In 16.04 Xenial, there seems to be the subtlety that the display says I have the first keyboard (the default UK English keyboard from XKB), but I suspect that that it is not the active keyboard. If IBus keyboard selection is working, switching applications throws me into my first IBus-dependent keyboard, which is not my default keyboard, but the keyboard indicator shows my default keyboard, the XKB UK English keyboard. Attempting to use the US English keyboard does not work.

I use a variant of orange-buffalo's solution of 2016-12-13. I switch to an unpassworded account and then switch back to my account. As my password is accepted, a message flashes up in red which appears to say that my password is invalid. However, it is too fast for to me read it accurately.

The message is, "Invalid password. Please try again." Orange-buffalo's simpler solution also works for me, with the same spurious message.

Pamela Fong (katsiki) wrote :

I have the same problem with 16.04.2 (64-bit). Neither workaround using "Switch User" works for me. When I do try "Switch User" with the same account, it momemtarily displays my desktop, but the account is still locked.

maxp (maxp) wrote :


Oto Šťáva (oto-stava) wrote :

This affects me on Ubuntu GNOME 17.04 with GDM's lock screen.

Changed in ubuntu-gnome:
status: New → Confirmed
Changed in ubuntu-gnome:
assignee: nobody → Amir Asaad (amir-pro-2010)
Hatem (hatemben) wrote :

17.04 also concerned

Hatem (hatemben) wrote :

Until this bug get fixed, you can switch to console mode and disable gnome screen saver :
$gnome-screensaver-command -d

This still affects me in Ubuntu 16.04.3 LTS

gacux (gacuxz) wrote :

Several times on Kubuntu 17.04 I've been able to login:
I've logged-in as same user into new session -> logged out -> logged into virtual console through Alt+Ctrl+F1 -> logged-in here -> logged-out with exit command -> came back to login screen with Alt+Ctrl+F7 -> tried several times to log-in into first session with no success -> after waiting 4-5 minutes I logged in at last. Do not know it's working all the time.

Tamer Hassan (tamer.hassan) wrote :

This still affects me in Ubuntu 18.04

$ apt policy gnome-screensaver
  Installed: 3.6.1-8ubuntu3
  Candidate: 3.6.1-8ubuntu3
  Version table:
 *** 3.6.1-8ubuntu3 500
        500 http://de.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

Artem Kamshilin (arkamax2k) wrote :

Same here on Ubuntu 18.04, same info as above. For clarity:

$ apt policy gnome-screensaver
  Installed: 3.6.1-8ubuntu3
  Candidate: 3.6.1-8ubuntu3
  Version table:
 *** 3.6.1-8ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

dimi (dbogdanov) wrote :

Same here, Ubuntu 18.04.

Same thing happened to me on 18.04.
Had to disable through console as per ~hatemben 's comment.

Serhii Levchyk (slevchyk) wrote :

18.04 Ubuntu + Unity the same bug

Kirill Bogdanov (sco7689) wrote :

18.04 + Unity.
Still not fixed, and even more severe now that language change shortcut doesn't work on Unity lock screen.

Snaker (snaker.me) wrote :

The same bug on Ubuntu 18.04 and GNOME Shell 3.28.3.

Changed in ubuntu-gnome:
assignee: Amir Asaad (amir-pro-2010) → nobody
Changed in gnome-shell:
status: New → Confirmed
Aleksey (evenfrost) wrote :

Same for me on Ubuntu 18.04 and GNOME Shell 3.28.3. I've got 2 input methods on my machine, EN and RU. When locking the screen with last window's language set to RU, I cannot log back in as password input always uses RU language despite of the language toggler state in password modal.

$ killall gnome-screensaver

This one ^^ in console session unlocks Gnome fine on 18.04. However, it would be great to unlock screen in more usual way.

Yeah, that is the workaround we all use. However, it does not solve the bug.

Dmitry Batiievskyi (0rc) wrote :

issue is still there after updating to 18.10

Stanislav Fadeev (stas.fadeev) wrote :

How many years this bug will live?
Confirmed on Ubuntu 18.04.2

Still got this issue on ubuntu 18.04 .
22nd of April, 2019
extremely irritates
issue raised on 2014
for how long would it be unfixed?

Andrii Lavr (andrts) wrote :

Confirmed on Ubuntu 16.04 and Debian 9.9
For En (as first and default language) and Ua
Also extremely irritates!

Georgios (pontifikas) wrote :

Same problem with Ubuntu 18.04.2 LTS with En, Gr keyboards.

Lefteris Pavlou (lepa-22) wrote :

I have this bug on Ubuntu 18.04 with Gnome. My keyboard layout is ["en", "gr"].

As a workaround I am using the following bash script that changes the keyboard layout to the first language in the keyboards layout list, i.e "en" (index "0" in inputSources), before activating the gnome-screensaver. I am running this script using a custom keyboard shortcut, set to "Super + L", after deactivating the default one.

Bash script:

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell \
--method org.gnome.Shell.Eval \

gnome-screensaver-command -l

After 6 years this problem is still available and was not fixed...

Iman Zolanvari (imnz) wrote :

I have this issue, too. Please have a look into that and fix it. It can be really annoying and lost the unsaved work as the person cannot login and need to reboot the ubuntu. Thanks

ahmed samer (ahmed-samer) wrote :

Upgrading to the latest 2020.04 LTS, Seems to fix this issue finally ¯\_(ツ)_/¯

Roland Bertolom (bertolom-1) wrote :

Can't agree with ahmed samer (ahmed-samer): I have 20.04 and the issue still can be reproduced.

Sly_tom_cat (slytomcat) wrote :

I have the same problem on fresh Xubuntu 20.04

It seems that bug has traveled into xfce4-screensaver

Sly_tom_cat (slytomcat) wrote :

... I have ability to change the keyboard layout (by key combination and by mouse click) but it is very annoying to switch layout in some random cases. I'd prefer that password language was always English.

But "caféfaçade" isn't very secure - and still might not work, as you could conceivably be thrown into an ASCII keyboard. I'm not even sure that the concept of a password keyboard could work. I'm still on 16.04.3, but I haven't suffered the problem for a long time. I gave up on iBus and switched to fcitx (patched to enable altGr). Fcitx has the annoying habit of forgetting to employ the current keyboard and switches to the default keyboard (which is an X keyboard) - which may be what saves me.

At least I assume I don't have the problem. I do have trouble typing my password, and it's conceivable that the problem with the interfaces and not my finger control, as second time usually works. (I've also wondered if there's some form of keylogger on my system.)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers