You are not logged in.

#1 2016-10-24 09:47:42

plp
Member
Registered: 2013-01-24
Posts: 45

Gnome and touchscreen

Hi everyone,

I've got a new Dell 15 7000 series, which is a 2-in-1 laptop that can double as a tablet, and I've been trying to make Gnome (running under Wayland) to work reliably with its touchscreen.

My findings so far:

1. Most applications have basic touchscreen support. Some, however, like Shotwell, don't. There are also inconsistencies in how gestures are implemented. For instance some apps/toolkits interpret a double tap as a double click, while others ignore it.

2. Gnome supports a range of gestures (for flicking through open windows, opening activites, showing the desktop, etc.) Those are good to learn.

3. Arch Wiki recommends installing touchegg, which provides touchscreen support for applications that don't have it by emulating mouse events. In my experience, however, it gets in the way of apps that do support gestures. So, I decided not to use it.

Problems and solutions:

1. Gnome's virtual keyboard is supposed to pop up automatically whenever you tap a text input control. However, this only happens with GTK3 apps.
Solution: install and enable gnome-shell-extension-slide-for-keyboard-git.

2. There's no way to simulate a double click in GTK3. This makes it impossible to open a file in Nautilus.
Solution: configure Nautilus to open items with single click.

3. You can't scroll through a page in Firefox by dragging your finger. Doing so results (rather lamely) in text to be selected instead.
Solution: install the Grab and Drag extension.

4. GTK3 apps crash regularly when using touch. It looks like this is due to a Wayland-related bug (see coredumpctl report* at the end of my post). One way to reproduce it reliably is to tap the clock in the top panel to bring up the calendar, and then touch your app.
Solution: set the GDK_BACKEND environment variable to "x11". (Note that you can't use /etc/profile.d/ to do that anymore. You must use systemd instead. See this Wiki page for more info.)

The bottom line:

Touchscreen support is far from perfect. However, after following the steps above, it now works well enough for me. I can use Firefox and Evince, and switch to Thunderbird to check an email without switching back to the keyboard. That's good enough for now.

* Core dump of a crash when using the Wayland GDK backend:

           PID: 1285 (gnome-calculato)
           UID: 1000 (plp)
           GID: 100 (users)
        Signal: 11 (SEGV)
     Timestamp: Mon 2016-10-24 11:04:37 EEST (1h 26min ago)
  Command Line: gnome-calculator
    Executable: /usr/bin/gnome-calculator
 Control Group: /user.slice/user-1000.slice/user@1000.service/gnome-terminal-server.service
          Unit: user@1000.service
     User Unit: user@1000.service
         Slice: user-1000.slice
     Owner UID: 1000 (plp)
       Boot ID: a3c9307f362b4ea596196fef56e5a953
    Machine ID: e814acba5178441fb4d495b6a1ff3d48
      Hostname: saxonia
      Coredump: /var/lib/systemd/coredump/core.gnome-calculato.1000.a3c9307f362b4ea596196fef56e5a953.1285.1477296277000000000000.lz4
       Message: Process 1285 (gnome-calculato) of user 1000 dumped core.
                
                Stack trace of thread 1285:
                #0  0x00007f2c50eeee50 n/a (libgdk-3.so.0)
                #1  0x00007f2c50eef6d3 n/a (libgdk-3.so.0)
                #2  0x00007f2c4b22b1c8 ffi_call_unix64 (libffi.so.6)
                #3  0x00007f2c4b22ac2a ffi_call (libffi.so.6)
                #4  0x00007f2c4c0d108e n/a (libwayland-client.so.0)
                #5  0x00007f2c4c0cdd20 n/a (libwayland-client.so.0)
                #6  0x00007f2c4c0cef74 wl_display_dispatch_queue_pending (libwayland-client.so.0)
                #7  0x00007f2c50ef9734 n/a (libgdk-3.so.0)
                #8  0x00007f2c50e99169 gdk_display_get_event (libgdk-3.so.0)
                #9  0x00007f2c50ef9422 n/a (libgdk-3.so.0)
                #10 0x00007f2c50146587 g_main_context_dispatch (libglib-2.0.so.0)
                #11 0x00007f2c501467f0 n/a (libglib-2.0.so.0)
                #12 0x00007f2c5014689c g_main_context_iteration (libglib-2.0.so.0)
                #13 0x00007f2c5070054d g_application_run (libgio-2.0.so.0)
                #14 0x000000000040c1c5 calculator_main (gnome-calculator)
                #15 0x00007f2c4fb61291 __libc_start_main (libc.so.6)
                #16 0x000000000040af1a _start (gnome-calculator)
                
                Stack trace of thread 1290:
                #0  0x00007f2c4fc24f19 syscall (libc.so.6)
                #1  0x00007f2c5018c03a g_cond_wait_until (libglib-2.0.so.0)
                #2  0x00007f2c5011ae89 n/a (libglib-2.0.so.0)
                #3  0x00007f2c5011b4ac g_async_queue_timeout_pop (libglib-2.0.so.0)
                #4  0x00007f2c5016eb9d n/a (libglib-2.0.so.0)
                #5  0x00007f2c5016e0d5 n/a (libglib-2.0.so.0)
                #6  0x00007f2c4fee6454 start_thread (libpthread.so.0)
                #7  0x00007f2c4fc297df __clone (libc.so.6)
                
                Stack trace of thread 1286:
                #0  0x00007f2c4fc2048d poll (libc.so.6)
                #1  0x00007f2c50146786 n/a (libglib-2.0.so.0)
                #2  0x00007f2c5014689c g_main_context_iteration (libglib-2.0.so.0)
                #3  0x00007f2c501468e1 n/a (libglib-2.0.so.0)
                #4  0x00007f2c5016e0d5 n/a (libglib-2.0.so.0)
                #5  0x00007f2c4fee6454 start_thread (libpthread.so.0)
                #6  0x00007f2c4fc297df __clone (libc.so.6)
                
                Stack trace of thread 1287:
                #0  0x00007f2c4fc2048d poll (libc.so.6)
                #1  0x00007f2c50146786 n/a (libglib-2.0.so.0)
                #2  0x00007f2c50146b12 g_main_loop_run (libglib-2.0.so.0)
                #3  0x00007f2c5072c316 n/a (libgio-2.0.so.0)
                #4  0x00007f2c5016e0d5 n/a (libglib-2.0.so.0)
                #5  0x00007f2c4fee6454 start_thread (libpthread.so.0)
                #6  0x00007f2c4fc297df __clone (libc.so.6)
                
                Stack trace of thread 1288:
                #0  0x00007f2c4fc2048d poll (libc.so.6)
                #1  0x00007f2c50146786 n/a (libglib-2.0.so.0)
                #2  0x00007f2c5014689c g_main_context_iteration (libglib-2.0.so.0)
                #3  0x00007f2c434c74bd n/a (libdconfsettings.so)
                #4  0x00007f2c5016e0d5 n/a (libglib-2.0.so.0)
                #5  0x00007f2c4fee6454 start_thread (libpthread.so.0)
                #6  0x00007f2c4fc297df __clone (libc.so.6)

Last edited by plp (2016-10-24 09:50:22)

Offline

Board footer

Powered by FluxBB