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

Bug #1286910 reported by Mikhail V. Golubev
432
This bug affects 94 people
Affects Status Importance Assigned to Milestone
GNOME Screensaver
New
Undecided
Unassigned
GNOME Shell
Confirmed
Undecided
Unassigned
Ubuntu GNOME
Confirmed
Undecided
Unassigned
Unity
Confirmed
Medium
Unassigned
gdm
New
Undecided
Unassigned
lightdm (Ubuntu)
Confirmed
Undecided
Unassigned
unity (Ubuntu)
Confirmed
Medium
Unassigned

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
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-screensaver (Ubuntu):
status: New → Confirmed
Revision history for this message
ivan (funivan) wrote :

Confirm.

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)
tags: added: lockscreen
removed: lock-screen
Revision history for this message
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)

Revision history for this message
mingToM (mingtom) wrote :

I can confirm this

Revision history for this message
Stan (sergienko-stanislav) wrote :

confirm!
i have the same problem with en and ru layouts.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
George Karakostas (gckarakostas) wrote :

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

Revision history for this message
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).

Revision history for this message
CONSTantius (constantius9) wrote :
Revision history for this message
ihoru (ihor-polyakov) wrote :

I have the same problem

Revision history for this message
ihoru (ihor-polyakov) wrote :

 Ubuntu 14.10
gnome-screensaver 3.6.1

Andrea Azzarone (azzar1)
Changed in unity:
status: New → Confirmed
importance: Undecided → Medium
Changed in unity (Ubuntu):
importance: Undecided → Medium
no longer affects: gnome-screensaver (Ubuntu)
Revision history for this message
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
Revision history for this message
Yura Pakhuchiy (yura-p) wrote :

Exactly the same issue with GNOME in Ubuntu 16.04

affects: ubuntu-gnome → gnome-screensaver
Revision history for this message
Ya'ar Hever (yhever) wrote :

Same issue here on GNOME 3 in Ubuntu 16.04.

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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...

Revision history for this message
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.

Revision history for this message
Andrey Paskal (andrey.paskal) wrote :

How many years this bug will live?

Revision history for this message
atimonin (atimonin) wrote :

Confirm!

Revision history for this message
Aleksandr (ishvarko) wrote :

16.04.1 - all the same.

Revision history for this message
Anton Vodonosov (avodonosov) wrote :

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

Revision history for this message
orange-buffalo (orange-buffalo) wrote :

@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.

Revision history for this message
Richard Wordingham (richard-wordingham) wrote :

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.

Revision history for this message
Richard Wordingham (richard-wordingham) wrote :

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

Revision history for this 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.

Revision history for this message
maxp (maxp) wrote :

Confirm.

Revision history for this message
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)
Revision history for this message
Hatem (hatemben) wrote :

17.04 also concerned

Revision history for this message
Hatem (hatemben) wrote :

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

Revision history for this message
Carl-Johan Kjellander (x-carljohan) wrote :

This still affects me in Ubuntu 16.04.3 LTS

Revision history for this message
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.

Revision history for this message
Tamer Hassan (tamer.hassan) wrote :

This still affects me in Ubuntu 18.04

$ apt policy gnome-screensaver
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

Revision history for this message
Artem Kamshilin (arkamax2k) wrote :

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

$ apt policy gnome-screensaver
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

Revision history for this message
dimi (dbogdanov) wrote :

Same here, Ubuntu 18.04.

Revision history for this message
CarpeDiemIsrael (carpediemisrael) wrote :

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

Revision history for this message
Serhii Levchyk (slevchyk) wrote :

18.04 Ubuntu + Unity the same bug

Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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.

Revision history for this message
Victor Istomin (victor.istomin) wrote :

$ 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.

Revision history for this message
Carl-Johan Kjellander (x-carljohan) wrote :

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

Revision history for this message
Dmitry Batiievskyi (0rc) wrote :

issue is still there after updating to 18.10

Revision history for this message
Stanislav Fadeev (stas.fadeev) wrote :

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

Revision history for this message
Dmitriy Chistokhodov (em-dmitriyace) wrote :

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?

Revision history for this message
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!

Revision history for this message
Georgios (pontifikas) wrote :

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

Revision history for this message
BeastOfCaerbannog (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:

#!/bin/bash
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell \
--method org.gnome.Shell.Eval \
"imports.ui.status.keyboard.getInputSourceManager().inputSources[0].activate()"

gnome-screensaver-command -l

Revision history for this message
Amir Hossein Karimi (amirhossein-karimi) wrote :

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

Revision history for this message
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

Revision history for this message
ahmed samer (ahmed-samer) wrote :

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

Revision history for this message
Roland Bertolom (bertolom-1) wrote :

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

Revision history for this message
Sly_tom_cat (slytomcat) wrote :

I have the same problem on fresh Xubuntu 20.04

It seems that bug has traveled into xfce4-screensaver

Revision history for this message
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.

Revision history for this message
Richard Wordingham (richard-wordingham) wrote :

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.)

Revision history for this message
yotama9 (yotama9) wrote :

Hi, I seem to have a similar issue. When I log into the machine I'm force to type in my keyring password. Sometimes, the keyboard layout is not set to English but other language that I have and I cannot change it. This is on Ubuntu 20.10

Revision history for this message
tarik walid (takizeee) wrote :

This affects me too on lightdm.
cannot try any suggested fix
- can't login from tty because cannot type english

Revision history for this message
Aleksey (evenfrost) wrote :

This started happening again for me after the upgrade to Ubuntu 22.10 and GNOME 43.1. Now switcher doesn't work at all with the keyboard, and I have to use the mouse to switch the language manually.

Revision history for this message
Yuriy Voziy (yuretsz) wrote :

Confirmed, Ubutu 22.10 fresh installation. Login language not changed with the keyboard. Default language setting doesn't work.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in lightdm (Ubuntu):
status: New → Confirmed
Revision history for this message
ntz (ntz1) wrote :

same with ubuntu 22.10.
is something planned to be done about this?

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.