[PATCH] Accessibility partly broken due to X root window being kept from login session.

Bug #1670933 reported by Luke Yelavich on 2017-03-08
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
LightDM GTK+ Greeter
Undecided
Luke Yelavich
lightdm-gtk-greeter (Ubuntu)
Undecided
Unassigned
unity-greeter (Ubuntu)
Undecided
Luke Yelavich

Bug Description

 affects lightdm

Lightdm version 1.21.5, in 17.04. Some components of the Unity and Mate desktops are currently not accessible when logging in using lightdm. So far I've tested and reproduced this problem with both unity-greeter, and lightdm-gtk-greeter, so I suspect it is what I mentioned in the title, i.e the X root window is kept around.

At-spi gets loaded in the greeter for use with Orca. At-spi ads a property atom, AT_SPI_BUS, to the root X window to allow software to be able to find the accessibility bus. If my understanding is correct, this root window is kept around for the user login session. What then happens is software either using Qt or Gtk loads its accessibility support code, which in turn looks for the AT_SPI_BUS property. Normally on session load, this property is not present, at which point the support code then connects to org.a11y.bus, which in turn via systemd loads the at-spi bus launcher and registry to respond to the bus activation/request. At-spi adds the AT_SPI_BUS property to the X root window at load.

However the AT_SPI_BUS property is hanging around from the greeter session, which is confusing software. At-spi only then gets loaded from /etc/xdg/autostart/at-spi-dbus-bus.desktop by the mate or gnome session binaries, but this happens after unity-panel-service and mate-panel are loaded. As such they are inaccessible for the session, or until the user kills them and they get reloaded.

Related branches

Robert Ancell (robert-ancell) wrote :

The X server is not reset between the greeter and session so the background can remain the same. This means anything set in the greeter will remain.

So the solution is probably:
- Make sure the greeter cleans up anything that it has left around
- Make the session smarter about checking if anything left by the greeter is still applicable. For example the AT_SPI_BUS value might point to a closed socket and can be ignored / overwritten.

The second is probably the most reliable, so any failure in the greeter doesn't cause the session to fail.

Luke Yelavich (themuso) on 2017-06-21
affects: lightdm → lightdm-gtk-greeter
Changed in lightdm-gtk-greeter:
assignee: nobody → Luke Yelavich (themuso)
Changed in unity-greeter (Ubuntu):
assignee: nobody → Luke Yelavich (themuso)
raveit65 (raveit65) wrote :

Can this be reviewed for lightdm-gtk-greeter, please ?
I'd like to add this commit for fedora 26 to fix the spam in logs.

raveit65 (raveit65) wrote :

...of course for fixing accessibility support in fedora 26 MATE-Compiz spin, which will be release this week.

Launchpad Janitor (janitor) wrote :

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

Changed in unity-greeter (Ubuntu):
status: New → Confirmed
Sean Davis (bluesabre) on 2017-09-06
summary: - Accessibility partly broken due to X root window being kept from login
- session.
+ [PATCH] Accessibility partly broken due to X root window being kept from
+ login session.

Hello,

Just to confirm that the approch proposed by Luke is sound. Removing the AT_SPI_BUS property would really be the safest for the user session: even if systemd doesn't manage to properly clean the at-spi dbus, at least the session isn't exposed to its existence.

pvagner (peter-v) wrote :

Hello,
Looking at the patches I can see removal of at-spi2-bus-launcher related code however I am unable to see a fix related to cleaning up the X window root.Thus if the only patch to gtk-greeter is committed I am afraid it will leave us with broken a11y within the user session. Or should I be also looking elsewhere to see all the related activity?
I would say this is a good move prone to all kinds of various possible setups however before removing ability to spawn at-spi2-bus-launcher we should make sure there are no traces of it when it's being started by something else e.g. by orca when called with orca --replace or by GTK as part of its ATK module.
Again this only handles the case when at-spi2 is activated via systemd.
So to sumarize all the recent a11y related spam that has popped up recently:
These patches are only suitable for distros where at-spi is activated via systemd.
For systemd less distros the patch proposed by Samuel Thibauld at the LP #1366534 is so far the working solution.

Hello,

Still now news on this and #1366534 ? This is really hurting users...

I have pushed the AT_SPI_BUS removal patch to branch https://code.launchpad.net/~samuel-thibault/lightdm-gtk-greeter/at-spi-bus

Sean Davis (bluesabre) wrote :

Applied Samuel Thibault's patch to master, which seems like a safe solution benefiting the most users.

Changed in lightdm-gtk-greeter:
status: New → Fix Committed
Sean Davis (bluesabre) on 2018-02-20
Changed in lightdm-gtk-greeter:
milestone: none → 2.0.4
Sean Davis (bluesabre) on 2018-02-20
Changed in lightdm-gtk-greeter:
status: Fix Committed → Fix Released
Sean Davis (bluesabre) on 2018-02-22
Changed in lightdm-gtk-greeter (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers