Comment 20 for bug 1946969

Revision history for this message
Mitsuya Shibata (cosmos-door) wrote :

Hi Gunnar,

For future release, I'm trying to figure out the cause this problem.

Here's what we know at this point.

1. DISPLAY=:1

For some reason, the DISPLAY env of ibus-daemon/ibus-engine-mozc is set to ":1".

$ strings /proc/$(pidof ibus-engine-mozc)/environ | grep ^DISPLAY
DISPLAY=:1

It seems that this should be "DISPLAY=:0".

2. Mozc call functions of libxcb on startup even if session is pure wayland.

https://github.com/google/mozc/blob/master/src/unix/ibus/selection_monitor.cc#L108-L143

3. xcb_connect() will be blocked infinity.

On Ubuntu, xcb_connect(":1") will be blocked infinity.

You can reproduce this behaviour with simple code.

  * Downlaod sample XCB code on Wikipedia.

    https://en.wikipedia.org/wiki/XCB#Example

  * Build sample code

    $ sudo apt install gcc libxcb1-dev
    $ gcc test.c -o test -lxcb

  * Do logout and login and confirm not start Xwayland process

    $ ps -fe | grep -i xwayland
    (check no xwayland process)

  * Check exists ":1" socket

    $ ls -l /tmp/.X11-unix/X1
    /tmp/.X11-unix/X1

  * Execute thesample program with DISPLAY=":1"

    DISPLAY=":1" ./test

The sample program will be blocked. You can comfirm this is blocked on connect() via xcb_connect().

---

However I doesn't investigate how about Debian testing.

Could you check following status?

* What value of $DISPLAY of ibus-engin-mozc:
  $ strings /proc/$(pidof ibus-engine-mozc)/environ | grep ^DISPLAY

* How number of x11 unix socket
  $ ls -l /tmp/.X11-unix/