Bug 13866 - Accessibility option in gdm login (gnome3) onscreen keyboard breaks login - black screen
Summary: Accessibility option in gdm login (gnome3) onscreen keyboard breaks login - b...
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: x86_64 Linux
Priority: High critical
Target Milestone: ---
Assignee: Olav Vitters
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 11844
  Show dependency treegraph
 
Reported: 2014-08-06 02:59 CEST by Barry Jackson
Modified: 2015-09-21 10:26 CEST (History)
8 users (show)

See Also:
Source RPM: gdm
CVE:
Status comment:


Attachments
diff of two full .vdi systems one after clicking on a11y onscreen (vdi1) kbd and one not (vdi0) (245.25 KB, text/plain)
2014-08-08 22:52 CEST, Barry Jackson
Details
Error messages from journal when enabling gdm onscreen keyboard (1.88 KB, text/plain)
2015-03-27 23:13 CET, Martin Whitaker
Details
Patch to prevent users from enabling the onscreen keyboard in gdm (872 bytes, text/plain)
2015-03-27 23:22 CET, Martin Whitaker
Details
rpmbuild errors (672 bytes, text/plain)
2015-03-28 04:01 CET, Nic Baxter
Details
patch (735 bytes, text/plain)
2015-03-28 11:07 CET, Barry Jackson
Details
patch (935 bytes, patch)
2015-03-28 12:44 CET, Barry Jackson
Details | Diff
Screenshot of GDM with menu expanded (658.33 KB, image/png)
2015-03-28 13:00 CET, Barry Jackson
Details

Description Barry Jackson 2014-08-06 02:59:12 CEST
Description of problem:
Selecting to enable the onscreen keyboard from the gdm login in gnome3 instantly blanks the screen and this then persists over reboots.
It is possible to switch to a tty, but as yet I have found no way to restore the graphical display.
This is reproduceable in a fully updated Gnome Cauldron VM so flagging as a release blocker.
This was reported here:
https://forums.mageia.org/en/viewtopic.php?p=50439&sid=e8f6b0b089e5a83628c138bb280a1401#p50439


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.


Reproducible: 

Steps to Reproduce:
Barry Jackson 2014-08-06 03:03:22 CEST

Priority: Normal => High

Barry Jackson 2014-08-06 03:04:04 CEST

CC: (none) => doktor5000

Barry Jackson 2014-08-07 12:31:50 CEST

Priority: High => release_blocker

Comment 1 Barry Jackson 2014-08-08 22:52:42 CEST
Created attachment 5333 [details]
diff of two full .vdi systems one after clicking on a11y onscreen (vdi1) kbd and one not (vdi0)

I created a fully updated Gnome VBox installation based on the Mga4 Gnome Live DVD iso.

I then ran it up to the login screen and powered it down.

I cloned it and booted the clone up to the log-in screen, selected the accessibility  onscreen keyboard option which blanked the screen. 
I then powered it down.

After many hours of ggogling I managed to create a script to create a diff  of the two .vdi files.

The diff is attached.

@coling - anything here useful?
Barry Jackson 2014-08-08 22:55:51 CEST

CC: (none) => mageia

Comment 2 Manuel Hiebel 2014-08-19 23:11:23 CEST
last time it was a 'caribou' bug https://bugs.mageia.org/show_bug.cgi?id=5875

'dmesg | tail' say there are error python segfault in libcaribou

Assignee: bugsquad => olav

Comment 3 Doug Laidlaw 2014-08-25 03:51:51 CEST
Running Cauldron 5.2 Dual, Xfce Desktop as it came, with its strange minimal greeter.

I log in as user, the screen changes to a solid blue, then returns to the login prompt.  All caribou packages are installed.  No problem after installing from the i586 DVD.

A different bug?

CC: (none) => laidlaws

Comment 4 Doug Laidlaw 2014-08-25 05:11:03 CEST
SOLVED (for me, at least):

/home/doug/.Xauthority was owned by root:root.  Changed it to doug:doug and I was able to login.

There were two other .Xauthority files.  Permissions for them were O.K.
Comment 5 Manuel Hiebel 2014-09-16 14:01:33 CEST
(In reply to Doug Laidlaw from comment #4)
> SOLVED (for me, at least):
> 
> /home/doug/.Xauthority was owned by root:root.  Changed it to doug:doug and
> I was able to login.
> 
> There were two other .Xauthority files.  Permissions for them were O.K.

I have only one and it's set to the user
Comment 6 Doug Laidlaw 2014-09-16 14:22:42 CEST
I didn't notice what the others were.  The problem hasn't been back since, but I have only just now reinstalled Cauldron.  There were i686 kernels coming up repeatedly to install in a 64-buit system then saying they couldn't.  On the new system, there is only a plugin for vlc missing a dependency.  Viewing it from Official, /home/.Xauthority is owned by 1000:1000 as it should be, and there are no others.

Call it Invalid if you like.
Comment 7 Manuel Hiebel 2014-09-16 14:25:58 CEST
well the issue is still here ;)
Comment 8 Doug Laidlaw 2014-09-16 14:48:01 CEST
The original bug, you mean?  Barry's issue?  I am using Xfce, and it doesn't happen there.  I will just bow out.
Comment 9 Barry Jackson 2014-09-16 19:05:06 CEST
I just fully updated a gnome VM and checked, the original issue is unchanged.
systemctl status prefdm shows no errors as does restart, just starts to a blank screen.
Nothing obvious in journal.
~/.Xauthority does not exist before the cause of the problem or after.

Open to suggestions for further testing.
Comment 10 Doug Laidlaw 2014-09-16 19:27:11 CEST
Barry, my bug was originally distinct as Bug 14022.  I don't know how it became confused with yours.  Doug.
Comment 11 Anne Nicolas 2014-12-15 00:33:02 CET
Is this bug still valid using last isos or cauldron up to date ?

CC: (none) => ennael1

Comment 12 Doug Laidlaw 2014-12-15 03:12:27 CET
Currently running cauldron from the Beta 1 DVD.  No problem logging into XFCE or MATE.  See Comment 8.
Comment 13 Barry Jackson 2014-12-15 13:05:48 CET
(In reply to Anne Nicolas from comment #11)
> Is this bug still valid using last isos or cauldron up to date ?

Yes.
Just fully updated a Gnome VM, cloned it, test booted the clone OK and on re-boot at log-in selected to turn on the accessibility on-screen keyboard.
Bang - black screen.
Re-boot - no log-in just black screen - system unusable. Can still log in to a tty.
Comment 14 Barry Jackson 2014-12-15 13:56:57 CET
Now also confirmed from clean install from Beta 2 classic x86_64 iso in VM (had to add on-line media as pkgs are missing from iso. Will file a bug report on that).
claire robinson 2014-12-15 14:52:33 CET

CC: (none) => eeeemail

Rémi Verschelde 2014-12-15 22:30:44 CET

Blocks: (none) => 11844

Comment 15 Rémi Verschelde 2015-02-23 23:41:36 CET
Olav, this bug was assigned to you but you haven't commented on it yet. Could you please have a look? It's tagged as release critical.

CC: (none) => remi

Comment 16 Doug Laidlaw 2015-02-24 02:11:26 CET
I am not seeing this bug.  I don't use the on-screen keyboard.  Removing myself.

CC: laidlaws => (none)

Comment 17 Barry Jackson 2015-02-26 15:24:18 CET
I have just confirmed this is still in Mga 5 RC x86_64 in a clean VM install from the full DVD. (iso date Wed Feb 25 21:32:45 CET 2015)
Comment 18 Nic Baxter 2015-03-13 07:20:06 CET
I have just done the same and black screen appears which as noted before survives reboots. So I changed to xdm and managed to login to Gnome successfully. Changed back to gdm and black screen reappears.

CC: (none) => nic

Comment 19 Rémi Verschelde 2015-03-18 07:56:11 CET
Olav, as a workaround for the Mageia 5 release, could you disable the onscreen keyboard in GDM until a fix is found? For now it seems to break GDM completely, so it's better to remove it even if we lose in accessibility.
Comment 20 Rémi Verschelde 2015-03-18 07:56:47 CET
Note: a mention to this should also be added to the Errata, so that users who need an onscreen keyboard know that they should use a different DM.
Comment 21 Rémi Verschelde 2015-03-18 08:18:54 CET
For the reference, the issue might be related to caribou directly. I've had a look at the gdm package, and at the gdm git log. It seems the on-screen keyboard has been activated with this commit: https://git.gnome.org/browse/gdm/commit/?h=gnome-3-12&id=018f3e3d6c843011f68e77c0ef84cbb6fe26b5e8
(the Exec section was later refined to let it point to /usr/libexec/caribou as we are using)

@ Berry, Nic: Could you try to edit /usr/share/gdm/greeter/autostart/caribou-autostart.desktop and remove the "screen-keyboard-enabled" argument from the AutostartCondition line?

Source RPM: (none) => gdm, caribou

Comment 22 Rémi Verschelde 2015-03-18 08:29:47 CET
s/Berry/Barry/ sorry ;-)
Comment 23 Colin Guthrie 2015-03-18 10:02:35 CET
Accoring to https://bugzilla.gnome.org/show_bug.cgi?id=740788#c3 the autostart file isn't even needed. Perhaps we can drop it?

See also https://git.gnome.org/browse/gdm/commit/data/autostart?id=cb2655435b8acf9b6ac9e332591ab3c5f00d978f
Comment 24 Rémi Verschelde 2015-03-18 10:19:37 CET
(In reply to Colin Guthrie from comment #23)
> Accoring to https://bugzilla.gnome.org/show_bug.cgi?id=740788#c3 the
> autostart file isn't even needed. Perhaps we can drop it?

Sounds good. But if the file isn't needed, what settings should be modified to disable the on-screen keyboard? I suppose it won't solve our bug to just drop an autostart file which is not needed.
Comment 25 Barry Jackson 2015-03-18 12:21:00 CET
(In reply to Rémi Verschelde from comment #21)

> @ Berry, Nic: Could you try to edit
> /usr/share/gdm/greeter/autostart/caribou-autostart.desktop and remove the
> "screen-keyboard-enabled" argument from the AutostartCondition line?

Makes no difference - the onscreen keyboard option is still there at GDM login and still causes the bug.
Comment 26 Shlomi Fish 2015-03-18 13:32:03 CET
(In reply to Rémi Verschelde from comment #24)
> (In reply to Colin Guthrie from comment #23)
> > Accoring to https://bugzilla.gnome.org/show_bug.cgi?id=740788#c3 the
> > autostart file isn't even needed. Perhaps we can drop it?
> 
> Sounds good. But if the file isn't needed, what settings should be modified
> to disable the on-screen keyboard? I suppose it won't solve our bug to just
> drop an autostart file which is not needed.

I checked it in a VM now and indeed the "Screen Keyboard" option still appears at the accessibility context menu, so I guess it is global to the GNOME accessibility framework.
Comment 27 Shlomi Fish 2015-03-18 13:32:56 CET
(In reply to Shlomi Fish from comment #26)
> (In reply to Rémi Verschelde from comment #24)
> > (In reply to Colin Guthrie from comment #23)
> > > Accoring to https://bugzilla.gnome.org/show_bug.cgi?id=740788#c3 the
> > > autostart file isn't even needed. Perhaps we can drop it?
> > 
> > Sounds good. But if the file isn't needed, what settings should be modified
> > to disable the on-screen keyboard? I suppose it won't solve our bug to just
> > drop an autostart file which is not needed.
> 
> I checked it in a VM now and indeed the "Screen Keyboard" option still
> appears at the accessibility context menu, so I guess it is global to the
> GNOME accessibility framework.

I mean - it still appears after I move away the /usr/share/gdm.*caribou.*\.desktop file.

CC: (none) => shlomif

Comment 28 Rémi Verschelde 2015-03-18 16:24:08 CET
Thanks Shlomi, so I guess what we need for the release is to change the default setting in GNOME to "disabled on-screen keyboard".

@ Olav, Colin: Any idea what to patch to achieve that?
Comment 29 Martin Whitaker 2015-03-27 23:13:16 CET
Created attachment 6147 [details]
Error messages from journal when enabling gdm onscreen keyboard

I took a look at this. The attached file shows an extract from the journal showing a segfault in libcaribou. The preceding warnings are suspicious, but may be red herrings.

The manual way to recover from this bug is to delete the file /var/lib/gdm/.config/dconf/user, then use Ctrl-Alt_Backspace to restart the X server. The config file will be recreated when gdm starts.

Note that this bug is also present in Mageia 4, although there gdm just hangs without blanking the screen.

CC: (none) => mageia

Comment 30 Martin Whitaker 2015-03-27 23:22:58 CET
Created attachment 6148 [details]
Patch to prevent users from enabling the onscreen keyboard in gdm

And here is a patch for gnome-shell we could use to protect the users from this bug. It removes the accessibility menu entry that allows the user to enable the onscreen keyboard. Note it only does this when gnome-shell is run in gdm mode, so the onscreen keyboard is still available when the user has logged in.

P.S. If I build the gnome-shell package from the source RPM, the resulting RPM won't install, with urpmi giving the error message

Installation failed:
	libgnome-shell-js.so is needed by gnome-shell-3.14.3-3.mga5.x86_64
	libgnome-shell-menu.so is needed by gnome-shell-3.14.3-3.mga5.x86_64
	libgnome-shell.so is needed by gnome-shell-3.14.3-3.mga5.x86_64

(this is before applying my patch). I can't figure out what's wrong, so tested my patch by installing the files manually.
Comment 31 Nic Baxter 2015-03-28 04:01:58 CET
Created attachment 6149 [details]
rpmbuild errors

+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/patch -U -s -p1 -b --suffix .0001 --fuzz=0 -i /home/nic/rpmbuild/SOURCES/0001-screenShield-Allow-for-custom-backgrounds-on-lock-lo.patch
+ /usr/bin/patch -U -s -p1 -b --suffix .0100 --fuzz=0 -i /home/nic/rpmbuild/SOURCES/gnome-shell-3.6.3.1-fix-evolution-calendar.patch
+ /usr/bin/patch -U -s -p1 -b --suffix .0200 --fuzz=0 -i /home/nic/rpmbuild/SOURCES/disable-gdm-onscreen-keyboard.patch
1 out of 2 hunks FAILED -- saving rejects to file js/ui/status/accessibility.js.rej
error: Bad exit status from /var/tmp/rpm-tmp.Enon7E (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.Enon7E (%prep)
Comment 32 Nic Baxter 2015-03-28 04:03:42 CET
--- js/ui/status/accessibility.js	2014-12-11 14:34:38.000000000 +0000
+++ js/ui/status/accessibility.js	2015-03-27 21:18:49.328007122 +0000
@@ -68,7 +69,9 @@
 
         let screenKeyboard = this._buildItem(_("Screen Keyboard"), APPLICATIONS_SCHEMA,
                                                                    'screen-keyboard-enabled');
-        this.menu.addMenuItem(screenKeyboard);
+	// temporary fix to avoid crash in gdm
+	if (Main.sessionMode.currentMode != 'gdm')
+            this.menu.addMenuItem(screenKeyboard);
 
         let visualBell = this._buildItem(_("Visual Alerts"), WM_SCHEMA, KEY_VISUAL_BELL);
         this.menu.addMenuItem(visualBell);


Any idea what I'm doing wrong?
Comment 33 Martin Whitaker 2015-03-28 11:04:41 CET
(In reply to Nic Baxter from comment #32)
> Any idea what I'm doing wrong?

What version of the gnome-session source RPM are you using? I'm using 
gnome-shell-3.14.3-3.mga5.src.rpm and get:

+ cd gnome-shell-3.14.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/patch -U -s -p1 -b --suffix .0001 --fuzz=0 -i /home/martin/rpm/SOURCES/0001-screenShield-Allow-for-custom-backgrounds-on-lock-lo.patch
+ /usr/bin/patch -U -s -p1 -b --suffix .0100 --fuzz=0 -i /home/martin/rpm/SOURCES/gnome-shell-3.6.3.1-fix-evolution-calendar.patch
+ /usr/bin/patch -U -s -p1 -b --suffix .0200 --fuzz=0 -i /home/martin/rpm/SOURCES/disable-gdm-onscreen-keyboard.patch
+ exit 0
Executing(%build): /bin/sh -e /home/martin/rpm/tmp/rpm-tmp.0WhA4L
Comment 34 Barry Jackson 2015-03-28 11:07:18 CET
Created attachment 6150 [details]
patch

Not really ;)
However I just applied your changes and created a new patch and it applies and builds OK.
I will test it in a VM shortly.
Comment 35 Barry Jackson 2015-03-28 11:34:06 CET
With the new gnome-shell package built with the patch, the login screen is black - just as per the bug after hitting the keyboard menu option. :\

Downgrading the gnome-shell package back to current repo version from tty and re-booting produces the normal GDM log-in.

FYI
I created the patch by:
1. Extract the tarball in SOURCES and rename it (I add _o to the end)
2. Extract it again
3. Make file changes in the un-renamed tree
4. Make sure to delete any *.~ backups that your editor may have created.
5. In SOURCES run e.g.:
diff -ur gnome-shell-3.14.3_o gnome-shell-3.14.3 > gnome-shell-3.14.3-mga-disable_a11y_onscreen_kbd_in_gdm-accessibility.js.patch

HTH
Comment 36 Barry Jackson 2015-03-28 11:45:41 CET
If it helps the patched package is here:
http://mtf.no-ip.co.uk/pub/linux/barjac/distrib/cauldron/x86_64/media/extra/release/gnome-shell-3.14.3-3.1.mga5.x86_64.rpm
the -debug package is in the same place (which has hdlists if you want to set it as a temporary repo)
Comment 37 Martin Whitaker 2015-03-28 12:22:56 CET
Barry, have you applied the first part of my patch?

I've tried re-downloading and re-installing the source RPM and my original patch still applies cleanly, and the resulting RPM still won't install. Mystified!
Comment 38 Barry Jackson 2015-03-28 12:30:19 CET
Ah! I took the changes from #32 I will re-test with the first bit added /o\
Comment 39 Barry Jackson 2015-03-28 12:44:10 CET
Created attachment 6151 [details]
patch

gnome-shell-3.14.3-mga-disable_a11y_onscreen_kbd_in_gdm-accessibility.js.patch

It works! Nice one Martin :)

I checked all the remaining a11y options in the menu and none of them cause the issue, so this is a good fix.

Do you want me to commit the change - as I have it all ready here?

Attachment 6150 is obsolete: 0 => 1

Comment 40 Barry Jackson 2015-03-28 13:00:11 CET
Created attachment 6152 [details]
Screenshot of GDM with menu expanded

Screen shot with patch.
Comment 41 Martin Whitaker 2015-03-28 13:05:28 CET
(In reply to Barry Jackson from comment #39) 
> Do you want me to commit the change - as I have it all ready here?

I'm trying to identify the real problem (rather than just hide it!) - give me the rest of the day to see if I can come up with a proper fix.
Comment 42 Barry Jackson 2015-03-28 13:11:32 CET
OK. I will be around if you need anything testing.
Comment 43 Martin Whitaker 2015-03-28 13:42:38 CET
OK, found it - it's a directory permission problem. The clue is in the journal:

org.a11y.Bus[1109]: Cannot setup inotify for '/var/lib/gdm/.local/share/dbus-1/services'; error 'Permission denied'

This fixes it for me in both cauldron and Mageia 4:

  chmod -R u+X /var/lib/gdm/.local
Comment 44 Barry Jackson 2015-03-28 15:24:48 CET
In the GDM spec it is installed with:

%attr(640,gdm,gdm) %dir %{_localstatedir}/lib/gdm/.local

so maybe that should be 740?
Comment 45 Barry Jackson 2015-03-28 15:41:36 CET
Changing line 154 in gdm spec to:

%attr(740,gdm,gdm) %dir %{_localstatedir}/lib/gdm/.local

and re-building and installing gdm package does fix it and the onscreen keyboard works.

Nice find Martin :)
Comment 46 Nic Baxter 2015-03-29 01:52:10 CET
I would like to confirm the fix. I changed line 154, build it. Then in a vm running 5Beta3 and xfce, I installed gdm using the built file and the rest from the repos. Started using gdm and xfce and it works perfectly. Should this be close now?

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 47 Barry Jackson 2015-03-29 11:53:05 CEST
Well not yet - as it's not been applied anywhere.

Thanks for confirming that it appears not to introduce any regressions.

I will commit the change, ask for a freeze push and add Mga 4 to this bug report, so please keep it open.

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)
Source RPM: gdm, caribou => gdm
Whiteboard: (none) => MGA4TOO

Comment 48 Rémi Verschelde 2015-03-29 21:39:14 CEST
Freeze push accepted, so it should be fixed in Cauldron. Setting version to 4 for the update then.

Priority: release_blocker => High
Version: Cauldron => 4
Whiteboard: MGA4TOO => (none)

Comment 49 Anne Nicolas 2015-03-29 22:26:41 CEST
added in coming set of classical isos for test
Comment 50 Samuel Verschelde 2015-09-21 10:26:44 CEST
Fixed in Mageia 5, and Mageia 4 has reached End Of Life. Closing as OLD.

Status: REOPENED => RESOLVED
Resolution: (none) => OLD


Note You need to log in before you can comment on or make changes to this bug.