Nixpkgs: Gnome 3 touchscreen issue: touch events crash Gnome session

Created on 21 May 2017  路  10Comments  路  Source: NixOS/nixpkgs

Issue description

As stated in title, any touch event crashes the Gnome 3 session.
This is what comes up in journalctl (hostname has been removed from the output):

May 21 22:56:52 kernel: show_signal_msg: 537 callbacks suppressed
May 21 22:56:52 kernel: .gnome-shell-wr[1527]: segfault at 0 ip 00007fa98a5e72ad sp 00007fffdf9cfde0 error 4 in libcaribou.so.0.0.0[7fa98a5db000+1f000]
May 21 22:56:52 polkitd[938]: Unregistered Authentication Agent for unix-session:3 (system bus name :1.52, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
May 21 22:56:52 gnome-session[1486]: gnome-session-binary[1486]: WARNING: Application 'org.gnome.Shell.desktop' killed by signal 11
May 21 22:56:52 gnome-session-binary[1486]: WARNING: Application 'org.gnome.Shell.desktop' killed by signal 11
May 21 22:56:53 dbus-daemon[1439]: Activating via systemd: service name='org.a11y.Bus' unit='at-spi-dbus-bus.service'
May 21 22:56:53 dbus-daemon[1439]: Activation via systemd failed for unit 'at-spi-dbus-bus.service': Unit at-spi-dbus-bus.service not found.
May 21 22:56:53 .gnome-shell-wr[2757]: Error retrieving accessibility bus address: org.freedesktop.systemd1.NoSuchUnit: Unit at-spi-dbus-bus.service not found.
May 21 22:56:53 org.gnome.Shell.desktop[2757]: current session already has an ibus-daemon.
May 21 22:56:53 dbus[817]: [system] Activating via systemd: service name='org.freedesktop.GeoClue2' unit='geoclue.service'
May 21 22:56:53 systemd[1]: Starting Location Lookup Service...
May 21 22:56:53 polkitd[938]: Registered Authentication Agent for unix-session:3 (system bus name :1.72 [/nix/store/jnzfqk4jd3xff1i3yzc6scdpj8ijijla-gnome-shell-3.22.0/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
May 21 22:56:53 geoclue[2774]: Failed to connect to avahi service: Daemon not running
May 21 22:56:53 dbus[817]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
May 21 22:56:53 systemd[1]: Started Location Lookup Service.
May 21 22:56:53 dbus[817]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service'
May 21 22:56:53 systemd[1]: Starting PackageKit Daemon...
May 21 22:56:54 .gnome-shell-wr[2757]: JS LOG: No permission to trigger offline updates: Polkit.Error: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered
May 21 22:56:54 PackageKit[2792]: daemon start
May 21 22:56:54 PackageKit[2792]: daemon quit
May 21 22:56:54 packagekitd[2792]: Failed to load the backend: opening module nix failed : /nix/store/1wk3345gg21760hjv0kdd5bc7sj89nmk-packagekit-1.1.3/lib/packagekit-backend/libpk_backend_nix.so: cannot open shared object file: No such file or directory
May 21 22:56:54 systemd[1]: Started PackageKit Daemon.
May 21 22:56:54 .gnome-shell-wr[2757]: Failed to load background 'file:////nix/store/xfylan3gbqljf4anixiayqbnq0kbjixm-gnome-control-center-3.22.0/share/gnome-control-center/pixmaps/noise-texture-light.png': Error opening file //nix/store/xfylan3gbqljf4anixiayqbnq0kbjixm-gnome-control-center-3.22.0/share/gnome-control-center/pixmaps/noise-texture-light.png: No such file or directory
May 21 22:56:54 .gnome-shell-wr[2757]: Failed to load background 'file:////nix/store/bbp2firvl4injy181hbk2pinvv3w86a9-gnome-control-center-3.22.0/share/gnome-control-center/pixmaps/noise-texture-light.png': Error opening file //nix/store/bbp2firvl4injy181hbk2pinvv3w86a9-gnome-control-center-3.22.0/share/gnome-control-center/pixmaps/noise-texture-light.png: No such file or directory
May 21 22:56:54 .gnome-shell-wr[2757]: JS ERROR: could not get remote objects for service org.gnome.SettingsDaemon.Smartcard path /org/gnome/SettingsDaemon/Smartcard: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon.Smartcard was not provided by any .service files
                                       _proxyInvoker/asyncCallback@resource:///org/gnome/gjs/modules/overrides/Gio.js:83
May 21 22:56:54 .gnome-shell-ca[1536]: e_cal_client_set_default_timezone: assertion 'zone != NULL' failed
May 21 22:56:54 .gnome-shell-ca[1536]: e_cal_client_set_default_timezone: assertion 'zone != NULL' failed
May 21 22:56:55 org.gnome.Shell.desktop[2757]: GNOME Shell started at Sun May 21 2017 22:56:54 GMT+1000 (AEST)

There seems to be more than one error there but the main one is the segfault in libcaribou.so.0.0.0 which is the Gnome on-screen keyboard.

I've noticed this error on a Lenovo MIIX 700 tablet and an HP Pavilion 10 TouchSmart netbook. The output above is from the MIIX 700.

Steps to reproduce

Just touch the screen once the Gnome session is up. On first touch the screen goes blank for a second or two and the session recovers. Second touch completely crashes the session and logs you out.

Technical details

  • System: (NixOS: 17.03.1160.f2c4af4e3b (Gorilla))
  • Nix version: (nix-env (Nix) 1.11.8)
  • Nixpkgs version: (17.03.1160.f2c4af4e3b)
  • Sandboxing enabled: (build-use-sandbox = true)
bug GNOME

All 10 comments

the error is present on ThinkPad X250 also, just got it on latest unstable (13f2f8673b), always reproducable, but this is not new, I remember that this issue was present the last time I tried gnome3, that was about 8months back

It might not be new.

I had a look and I couldn't find a similar issue on the list and on IRC I was told to log a new ticket when I asked about it.

I am not even completely sure if it is an issue with Gnome on NixOS or a general Gnome issue. For instance there is this report of a similar problem on the Ubuntu bug tracker from last year.

This can be reproduced in a VM without adding GNOME to your system:

$ cat > config.nix <<EOF
{ pkgs, config, lib, ... }:
{
  users.users.bob = {
    isNormalUser = true;
    password = "a";
  };
  services.xserver.enable = true;
  services.xserver.desktopManager.gnome3.enable = true;
  services.xserver.displayManager.gdm.enable = true;
}
EOF
$ nixos-rebuild build-vm -I nixos-config=config.nix
$ sudo setfacl -m u:$USER:rw /dev/bus/usb/001/004 # replace as appropriate with path to your touchscreen
$ ./result/bin/run-nixos-vm -usbdevice host:001.004 -m 4G # again replace

From there I managed to get a coredump which could be helpful for further debugging.

Same behavior also on a Thinkpad T440s.

Same for a Thinkpad T450s

It seems that gnome3 is built against caribou, if caribou gets installed then the segfault no longer happens.

{ pkgs, config, lib, ... }:
{
  users.users.bob = {
    isNormalUser = true;
    password = "a";
  };
  environment.systemPackages = with pkgs; [
   gnome3.caribou
  ];
  services.openssh.enable = true;
  services.xserver.enable = true;
  services.xserver.desktopManager.gnome3.enable = true;
  services.xserver.displayManager.gdm.enable = true;
}

Installing caribou seems to fix the touchscreen also on the T440s

I can also confirm that fixes the problem.

Should caribou be installed by default when Gnome 3 is selected as the desktop environment?

Yes, pretty sure it should. But IMHO the whole thing should also be considered an upstream bug.

Adding caribou fixed it for me as well (on a Dell laptop even).

It appears that gnome-shell uses caribou as a build input: https://github.com/NixOS/nixpkgs/blob/0d6822be2bcb3898f6686eb232a8fc0a87e97348/pkgs/desktops/gnome-3/core/gnome-shell/default.nix#L24

Maybe it needs to be a propagatedBuildInputs instead? I can make a patch.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sid-kap picture sid-kap  路  3Comments

langston-barrett picture langston-barrett  路  3Comments

retrry picture retrry  路  3Comments

grahamc picture grahamc  路  3Comments

spacekitteh picture spacekitteh  路  3Comments