After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740518 - Clutter evdev devices should expose capabilities
Clutter evdev devices should expose capabilities
Status: RESOLVED OBSOLETE
Product: clutter
Classification: Platform
Component: general
1.20.x
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-11-22 00:50 UTC by yashax
Modified: 2021-06-10 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
event2 description (17.35 KB, application/octet-stream)
2014-11-25 22:44 UTC, yashax
  Details
event0 output (6.78 KB, application/octet-stream)
2014-11-25 23:04 UTC, yashax
  Details
event1 output (7.55 KB, application/octet-stream)
2014-11-25 23:04 UTC, yashax
  Details
evdev: Prefer pointer/touch devices over keyboard devices (1.80 KB, patch)
2014-11-27 14:13 UTC, Carlos Garnacho
committed Details | Review

Description yashax 2014-11-22 00:50:49 UTC
Hello!
When I'm trying to launch GNOME on Wayland via gdm, I see black screen with cursor at the top left corner and after a moment it returns back to gdm.

Tried to launch with command:
gnome-session --session=gnome-wayland

And it just does nothing.

Tried with this command too:
gnome-shell --wayland --display-server

I get the following output:

(gnome-shell:4836): mutter-WARNING **: failed to unlink stale lock file /tmp/.X1-lock: Operation not permitted
glamor: EGL version 1.4 (DRI2):
Window manager warning: Failed to set environment variable DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
Window manager warning: Failed to set environment variable WAYLAND_DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
Gjs-Message: JS LOG: Failed to launch ibus-daemon: Failed to execute child process "ibus-daemon" (No such file or directory)
Gjs-Message: 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

(gnome-shell:4836): Clutter-CRITICAL **: clutter_input_device_get_pointer_stage: assertion 'CLUTTER_IS_INPUT_DEVICE (device)' failed
(EE) 
Fatal server error:
(EE) failed to dispatch Wayland events: Connection reset by peer
(EE) 
Segmentation fault (core dumped)


I also see this in dmesg:
gnome-shell[5927]: segfault at 0 ip 00007fef0bdf24b6 sp 00007fff7147c740 error 4 in libmutter.so.0.0.0[7fef0bd3f000+103000]


OS: Arch Linux (linux 3.17.3, xorg-server 1.16.2, wayland 1.6.0, gnome-shell 3.14.2)
Package 'xorg-server-xwayland' is installed.
some glxinfo output:
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV770
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.5.0-devel (git-74f505f)
OpenGL core profile shading language version string: 3.30

(This bug happened with Mesa 10.3 and 10.4 too)
(GNOME on Wayland worked for me in 3.12 with patched mutter)
Comment 1 Jasper St. Pierre (not reading bugmail) 2014-11-22 01:28:11 UTC
Can you try to get a backtrace from the core dump?
Comment 2 yashax 2014-11-22 11:59:01 UTC
Before sending bug report I tried to debug it in VT and the system hanged. However now it worked with gnome-terminal in gnome shell:


GNU gdb (GDB) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gnome-shell...done.
(gdb) run
Starting program: /usr/bin/gnome-shell --wayland --display-server
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe30e9700 (LWP 24698)]
[New Thread 0x7fffe28e8700 (LWP 24699)]
[New Thread 0x7fffe0ada700 (LWP 24700)]

(gnome-shell:24694): Cogl-WARNING **: ./winsys/cogl-winsys-egl-kms.c:747: Error restoring saved CRTC
[New Thread 0x7fffd9641700 (LWP 24701)]
[New Thread 0x7fffd8c33700 (LWP 24702)]
(EE) 
Fatal server error:
(EE) wl_drm@4: error 0: authenicate failed
(EE) 

(gnome-shell:24694): mutter-ERROR **: Spurious exit of X Wayland server

Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff69df740 "mutter", log_level=G_LOG_LEVEL_ERROR, 
    format=<optimized out>, args=args@entry=0x7fffffffdfe0) at gmessages.c:1046
1046		  g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
(gdb) bt full
  • #0 g_logv
    at gmessages.c line 1046
  • #1 g_log
    at gmessages.c line 1079
  • #2 xserver_died
  • #3 g_child_watch_dispatch
    at gmain.c line 5150
  • #4 g_main_dispatch
    at gmain.c line 3111
  • #5 g_main_context_dispatch
    at gmain.c line 3710
  • #6 g_main_context_iterate
    at gmain.c line 3781
  • #7 g_main_loop_run
    at gmain.c line 3975
  • #8 meta_xwayland_start
    at wayland/meta-xwayland.c line 506
  • #9 meta_wayland_init
    at wayland/meta-wayland.c line 314
  • #10 meta_init
    at core/main.c line 363
  • #11 main
    at main.c line 429

Comment 3 Rui Matos 2014-11-22 13:38:34 UTC
(In reply to comment #0)
> (gnome-shell:4836): mutter-WARNING **: failed to unlink stale lock file
> /tmp/.X1-lock: Operation not permitted

Does it work if you manually clean up this file?
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-11-22 15:44:36 UTC
(In reply to comment #2)
> Before sending bug report I tried to debug it in VT and the system hanged.
> However now it worked with gnome-terminal in gnome shell:

That just means that it couldn't get permission to take over the screen. Running it from a VT won't work either, since fbdev will get stuck. Try something like this.

$ gdb gnome-shell --wayland --display-server & (sleep 10; sudo chvt 2)

Quickly type "r" then enter, and wait 10 seconds. Make sure you have chvt installed first.
Comment 5 yashax 2014-11-22 18:23:09 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > (gnome-shell:4836): mutter-WARNING **: failed to unlink stale lock file
> > /tmp/.X1-lock: Operation not permitted
> 
> Does it work if you manually clean up this file?

Still crashes but without this warning.

(In reply to comment #4)
> (In reply to comment #2)
> > Before sending bug report I tried to debug it in VT and the system hanged.
> > However now it worked with gnome-terminal in gnome shell:
> 
> That just means that it couldn't get permission to take over the screen.
> Running it from a VT won't work either, since fbdev will get stuck. Try
> something like this.
> 
> $ gdb gnome-shell --wayland --display-server & (sleep 10; sudo chvt 2)
> 
> Quickly type "r" then enter, and wait 10 seconds. Make sure you have chvt
> installed first.

It didn't work ("r" went to bash instead gdb). I tried this too:
gdb -ex=r --args gnome-shell --wayland --display-server & (sleep 10; sudo chvt 8)

It switches to VT 8 and nothing happens.


I tried to reproduce the bug again using gnome-terminal in gnome-shell, when gnome-shell is started via startx without root.
I got different backtrace this time:

$ gdb -ex=r --args gnome-shell --replace --wayland --display-server
GNU gdb (GDB) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gnome-shell...done.
Starting program: /usr/bin/gnome-shell --replace --wayland --display-server
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe30e9700 (LWP 2593)]
[New Thread 0x7fffe28e8700 (LWP 2594)]

(gnome-shell:2589): mutter-WARNING **: Could not take control: GDBus.Error:System.Error.EBUSY: Device or resource busy
radeon: Failed to get PCI ID, error number -13
[New Thread 0x7fffe0ada700 (LWP 2595)]
[New Thread 0x7fffd9eea700 (LWP 2596)]

(gnome-shell:2589): Cogl-WARNING **: ./winsys/cogl-winsys-egl-kms.c:747: Error restoring saved CRTC

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event4: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event3: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event6: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event0: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event1: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event7: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event8: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event9: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event10: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event11: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event12: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event13: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event14: Permission denied

(gnome-shell:2589): Clutter-WARNING **: Could not open device /dev/input/event5: Permission denied
[New Thread 0x7fffd8e40700 (LWP 2597)]
radeon: Failed to get PCI ID, error number -13
[New Thread 0x7fffcffff700 (LWP 2598)]
[New Thread 0x7fffcf7fe700 (LWP 2599)]
[New Thread 0x7fffceffd700 (LWP 2600)]

(gnome-shell:2589): mutter-WARNING **: failed to unlink stale lock file /tmp/.X1-lock: Operation not permitted
Disabling glamor and dri3, EGL setup failed
Failed to initialize glamor, falling back to sw
[New Thread 0x7fffce7fc700 (LWP 2606)]
[New Thread 0x7fffcdffb700 (LWP 2607)]
[New Thread 0x7fffcd7fa700 (LWP 2608)]
Gjs-Message: JS LOG: Failed to launch ibus-daemon: Failed to execute child process "ibus-daemon" (No such file or directory)

** (gnome-shell:2589): WARNING **: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Gjs-Message: JS LOG: Failed to register AuthenticationAgent
Gjs-Message: 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

(gnome-shell:2589): Clutter-CRITICAL **: clutter_input_device_get_pointer_stage: assertion 'CLUTTER_IS_INPUT_DEVICE (device)' failed

Program received signal SIGSEGV, Segmentation fault.
sync_focus_surface (pointer=0x8abaf8, pointer=0x8abaf8)
    at wayland/meta-wayland-pointer.c:277
277	wayland/meta-wayland-pointer.c: No such file or directory.
(gdb) bt full
  • #0 sync_focus_surface
    at wayland/meta-wayland-pointer.c line 277
  • #1 repick_for_event
    at wayland/meta-wayland-pointer.c line 309
  • #2 meta_wayland_pointer_repick
    at wayland/meta-wayland-pointer.c line 732
  • #3 meta_wayland_seat_repick
    at wayland/meta-wayland-seat.c line 304
  • #4 meta_display_sync_wayland_input_focus
    at core/display.c line 1415
  • #5 meta_display_update_focus_window
    at core/display.c line 1465
  • #6 request_xserver_input_focus_change
    at core/display.c line 1538
  • #7 meta_display_open
    at core/display.c line 955
  • #8 meta_run
    at core/main.c line 470
  • #9 main
    at main.c line 463

Comment 6 Jasper St. Pierre (not reading bugmail) 2014-11-22 18:44:31 UTC
(In reply to comment #5)
> It switches to VT 8 and nothing happens.

I meant to say that you run this from VT1, switch to VT2, and then switch back to VT1 and then look at gdb. fbcon should kick back in. If not, you can always just do `gdb attach -p $(pidof gnome-shell)` from your other VT.
Comment 7 Jasper St. Pierre (not reading bugmail) 2014-11-22 18:45:44 UTC
Oh, and yeah, that's just another error message that happens when gnome-shell can't take over control of the display (since Xorg has taken it already).

Also, you are on a systemd system with logind enabled, right?
Comment 8 yashax 2014-11-22 19:51:52 UTC
(In reply to comment #6)
> I meant to say that you run this from VT1, switch to VT2, and then switch back
> to VT1 and then look at gdb. fbcon should kick back in. If not, you can always
> just do `gdb attach -p $(pidof gnome-shell)` from your other VT.

OK, it worked. I got similar backtrace as in comment #5.
Tried as root too and got similar backtrace as in comment #2.

(In reply to comment #7)
> Also, you are on a systemd system with logind enabled, right?

Yes
Comment 9 Jasper St. Pierre (not reading bugmail) 2014-11-22 20:00:46 UTC
Did you see any warnings when you ran it without root, or just the same backtrace as comment #5 all alone?
Comment 10 yashax 2014-11-22 20:20:09 UTC
(In reply to comment #9)
> Did you see any warnings when you ran it without root, or just the same
> backtrace as comment #5 all alone?

Different warnings, here is the full output:


(gdb) Starting program: /usr/bin/gnome-shell --wayland --display-server
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe30e8700 (LWP 818)]
[New Thread 0x7fffe28e7700 (LWP 819)]
[New Thread 0x7fffe0ad9700 (LWP 820)]
[New Thread 0x7fffd9cdd700 (LWP 822)]
glamor: EGL version 1.4 (DRI2):
Window manager warning: Failed to set environment variable DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
Window manager warning: Failed to set environment variable WAYLAND_DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
[New Thread 0x7fffd92d5700 (LWP 846)]
[New Thread 0x7fffd8ad4700 (LWP 847)]
[New Thread 0x7fffcbffe700 (LWP 848)]
[New Thread 0x7fffcadff700 (LWP 849)]
Gjs-Message: JS LOG: Failed to launch ibus-daemon: Failed to execute child process "ibus-daemon" (No such file or directory)
Gjs-Message: 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

(gnome-shell:814): Clutter-CRITICAL **: clutter_input_device_get_pointer_stage: assertion 'CLUTTER_IS_INPUT_DEVICE (device)' failed

Program received signal SIGSEGV, Segmentation fault.
sync_focus_surface (pointer=0x7a64a8, pointer=0x7a64a8)
    at wayland/meta-wayland-pointer.c:277
277	wayland/meta-wayland-pointer.c: No such file or directory.
(gdb) #0  sync_focus_surface (pointer=0x7a64a8, pointer=0x7a64a8)
    at wayland/meta-wayland-pointer.c:277
        display = <optimized out>
        focus_surface = 0x0
        interface = <error reading variable interface (Cannot access memory at address 0x0)>
  • #1 repick_for_event
    at wayland/meta-wayland-pointer.c line 309
  • #2 meta_wayland_pointer_repick
    at wayland/meta-wayland-pointer.c line 732
  • #3 meta_wayland_seat_repick
    at wayland/meta-wayland-seat.c line 304
  • #4 meta_display_sync_wayland_input_focus
    at core/display.c line 1415
  • #5 meta_display_update_focus_window
    at core/display.c line 1465
  • #6 request_xserver_input_focus_change
    at core/display.c line 1538
  • #7 meta_display_open
    at core/display.c line 955
  • #8 meta_run
    at core/main.c line 470
  • #9 main
    at main.c line 463

Comment 11 Jasper St. Pierre (not reading bugmail) 2014-11-24 02:11:47 UTC
So I'm a bit stumped. interface should never be 0 there. Can you try these commands?

p *pointer
p pointer->default_grab
p default_pointer_grab_interface
Comment 12 yashax 2014-11-24 21:19:17 UTC
Output:

(gdb) $1 = {display = 0x0, resource_list = {prev = 0x0, next = 0x0}, 
  focus_resource_list = {prev = 0x0, next = 0x0}, focus_surface = 0x0, 
  focus_surface_listener = {link = {prev = 0x0, next = 0x0}, notify = 0x0}, 
  focus_serial = 0, click_serial = 0, cursor_tracker = 0x0, 
  cursor_surface = 0x0, cursor_surface_destroy_listener = {link = {prev = 0x0, 
      next = 0x0}, notify = 0x0}, hotspot_x = 0, hotspot_y = 0, grab = 0x0, 
  default_grab = {interface = 0x0, pointer = 0x0}, grab_button = 0, 
  grab_serial = 0, grab_time = 0, grab_x = 0, grab_y = 0, device = 0x0, 
  current = 0x0, button_count = 0}
(gdb) $2 = {interface = 0x0, pointer = 0x0}
(gdb) $3 = {focus = 0x7ffff69c6130 <default_grab_focus>, 
  motion = 0x7ffff69c5b60 <default_grab_motion>, 
  button = 0x7ffff69c5ff0 <default_grab_button>}
Comment 13 Jasper St. Pierre (not reading bugmail) 2014-11-24 21:24:09 UTC
That is extremely bizarre. Can you see if meta_wayland_pointer_init or meta_wayland_pointer_release are being called before the crash, by setting breakpoints?
Comment 14 yashax 2014-11-24 22:44:33 UTC
Both never get called :)
Comment 15 Jasper St. Pierre (not reading bugmail) 2014-11-24 22:53:37 UTC
Does your machine have a mouse? Can you put a breakpoint on meta_wayland_seat_set_capabilities and see if that's called? If it is, can you:

p flags

?
Comment 16 yashax 2014-11-24 23:12:24 UTC
Yes, it does have a mouse.

Output:

Breakpoint 1, meta_wayland_seat_set_capabilities (seat=seat@entry=0x7a6380, flags=2) at wayland/meta-wayland-seat.c:143
143	wayland/meta-wayland-seat.c: No such file or directory.
$1 = 2
Comment 17 Jasper St. Pierre (not reading bugmail) 2014-11-24 23:29:18 UTC
That's very bizarre. Apparently, we don't think your system has a mouse, never initialize it, and then crash. There's not much I can tell you to try without you having to compile your own Clutter/Mutter.
Comment 18 yashax 2014-11-24 23:33:36 UTC
It's fine, really. I have already recompiled glib2, gnome-shell, mutter for this bug report so they have debug symbols. Arch build system makes this really easy.
Comment 19 Jasper St. Pierre (not reading bugmail) 2014-11-25 17:11:37 UTC
Can you look here:

https://git.gnome.org/browse/clutter/tree/clutter/evdev/clutter-device-manager-evdev.c?h=clutter-1.20#n827

And see if it gets called, and it takes the POINTER_DEVICE path? Can you add print statements, etc. to see what kinds of devices are added?

Under a traditional X11 session, can you run "xinput list" and show the results? That's the simplest way to show the set of evdev devices.
Comment 20 yashax 2014-11-25 21:29:11 UTC
(In reply to comment #19)
> Can you look here:
> 
> https://git.gnome.org/browse/clutter/tree/clutter/evdev/clutter-device-manager-evdev.c?h=clutter-1.20#n827
> 
> And see if it gets called, and it takes the POINTER_DEVICE path? Can you add
> print statements, etc. to see what kinds of devices are added?
> 
> Under a traditional X11 session, can you run "xinput list" and show the
> results? That's the simplest way to show the set of evdev devices.

Will post the clutter results soon.

Anyway, I unplugged my mouse & keyboard (one wireless USB stick for both) and plugged other wired mouse and keyboard, and the GNOME Wayland session worked!
So this is about my specific mouse.

It may be related to another issue I have with this mouse & keyboard, they are getting detected as three input devices. In games the third input device is treated as joystick which cause the games to misbehave.

Maybe this assertion:

(gnome-shell:814): Clutter-CRITICAL **: clutter_input_device_get_pointer_stage:
assertion 'CLUTTER_IS_INPUT_DEVICE (device)' failed

fails on this third input device?


xinput output: (under X11 GNOME Shell)
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® 2.4GHz Transceiver v6.0	id=9	[slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® 2.4GHz Transceiver v6.0	id=10	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ Microsoft Microsoft® 2.4GHz Transceiver v6.0	id=8	[slave  keyboard (3)]


also, relevant dmesg output:

[    1.448453] input: Microsoft Microsoft® 2.4GHz Transceiver v6.0 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0/0003:045E:0745.0001/input/input2
[    1.448639] hid-generic 0003:045E:0745.0001: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Microsoft® 2.4GHz Transceiver v6.0] on usb-0000:00:1a.0-1/input0
[    1.449206] input: Microsoft Microsoft® 2.4GHz Transceiver v6.0 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.1/0003:045E:0745.0002/input/input3
[    1.449243] hid-generic 0003:045E:0745.0002: input,hidraw1: USB HID v1.11 Mouse [Microsoft Microsoft® 2.4GHz Transceiver v6.0] on usb-0000:00:1a.0-1/input1
[    1.466570] input: Microsoft Microsoft® 2.4GHz Transceiver v6.0 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.2/0003:045E:0745.0003/input/input4
[    1.466649] hid-generic 0003:045E:0745.0003: input,hiddev0,hidraw2: USB HID v1.11 Device [Microsoft Microsoft® 2.4GHz Transceiver v6.0] on usb-0000:00:1a.0-1/input2
Comment 21 yashax 2014-11-25 21:43:04 UTC
clutter results:

Keyboard device added
Keyboard device added
Keyboard device added
Keyboard device added
Comment 22 Jasper St. Pierre (not reading bugmail) 2014-11-25 22:01:08 UTC
You can use G_DEBUG=fatal-warnings to track down where the Clutter warning is coming from, and see if that's relevant. I'd try to figure out why we're not getting a pointer device added here.
Comment 23 yashax 2014-11-25 22:18:29 UTC
gdb output with G_DEBUG=fatal-warnings:

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe30e3700 (LWP 28474)]
[New Thread 0x7fffe28e2700 (LWP 28475)]
[New Thread 0x7fffe0ad4700 (LWP 28476)]
[New Thread 0x7fffd9cdd700 (LWP 28478)]
glamor: EGL version 1.4 (DRI2):
Window manager warning: Failed to set environment variable DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
Window manager warning: Failed to set environment variable WAYLAND_DISPLAY for gnome-session: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
[New Thread 0x7fffd92d5700 (LWP 28514)]
[New Thread 0x7fffd8ad4700 (LWP 28515)]
[New Thread 0x7fffcbffe700 (LWP 28516)]
[New Thread 0x7fffcadff700 (LWP 28517)]
Gjs-Message: JS LOG: Failed to launch ibus-daemon: Failed to execute child process "ibus-daemon" (No such file or directory)
Gjs-Message: 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
Keyboard device added
Keyboard device added
Keyboard device added
Keyboard device added

(gnome-shell:28470): Clutter-CRITICAL **: clutter_input_device_get_pointer_stage: assertion 'CLUTTER_IS_INPUT_DEVICE (device)' failed

Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x7ffff5df7e65 "Clutter", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffdf10) at gmessages.c:1046
1046	gmessages.c: No such file or directory.
  • #0 g_logv
    at gmessages.c line 1046
  • #1 g_log
    at gmessages.c line 1079
  • #2 g_return_if_fail_warning
  • #3 clutter_input_device_get_pointer_stage
    at ./clutter-input-device.c line 947
  • #4 repick_for_event
    at wayland/meta-wayland-pointer.c line 292
  • #5 meta_wayland_pointer_repick
    at wayland/meta-wayland-pointer.c line 732
  • #6 meta_wayland_seat_repick
    at wayland/meta-wayland-seat.c line 304
  • #7 meta_display_sync_wayland_input_focus
    at core/display.c line 1415
  • #8 meta_display_update_focus_window
    at core/display.c line 1465
  • #9 request_xserver_input_focus_change
    at core/display.c line 1538
  • #10 meta_display_open
    at core/display.c line 955
  • #11 meta_run
    at core/main.c line 470
  • #12 main
    at main.c line 463

Comment 24 Jasper St. Pierre (not reading bugmail) 2014-11-25 22:28:32 UTC
Yeah, that's just a side effect of Wayland not thinking you have a pointer.

Try this:

$ sudo evemu-describe

Poke around for the three mouse/keyboard devices. Do they all list EV_KEY / EV_REL as supported events?
Comment 25 yashax 2014-11-25 22:44:49 UTC
Created attachment 291500 [details]
event2 description

event0 has EV_KEY.
event1 has both.
event2 has both, and also long, weird output (attached).
Comment 26 yashax 2014-11-25 22:54:14 UTC
OK, I think that event2 is not the cause here, I tried "sudo rm /dev/input/event2" and gnome-shell still crashed.
Comment 27 Jasper St. Pierre (not reading bugmail) 2014-11-25 22:58:39 UTC
Could you dump out descriptions for event0 and event1 as well?
Comment 28 yashax 2014-11-25 23:04:21 UTC
Created attachment 291503 [details]
event0 output
Comment 29 yashax 2014-11-25 23:04:46 UTC
Created attachment 291504 [details]
event1 output
Comment 30 yashax 2014-11-25 23:08:56 UTC
I also did another test: connected another wired mouse without unplugging my current mouse and keyboard, and the wayland session didn't crash.
So it's probably the mouse (event1) not being detected as a mouse.
Comment 31 Carlos Garnacho 2014-11-27 14:12:25 UTC
After some talking with libinput dev Hans de Goede, it's apparently common for mice in mouse/keyboard combos to claim they have the multimedia keys (as seen in the output of comment 29), this enables in the libinput_device both the keyboard and pointer capabilities, and makes clutter mistakenly prefer a keyboard device for this. 

I'm moving to Clutter for further discussion, the patch I'm going to attach just inverts the ClutterInputDeviceType guessing out of capabilities, which is slightly more correct, but I have not much idea about how do key events from that device behave like along the stack. Next week I'll get hold of one of these devices, so will be able to try then.

As for the event2 device, it really looks like some subproduct, if I'm right it's probably not the source of any events. that might be checked with xinput test-xi2 on x11.
Comment 32 Carlos Garnacho 2014-11-27 14:13:53 UTC
Created attachment 291651 [details] [review]
evdev: Prefer pointer/touch devices over keyboard devices

In keyboard/mouse wireless combos, it is rather common for the mouse to
claim it contains the multimedia keys, this makes libinput enable both
the pointer and keyboard capabilities on this device, and Clutter thus
to create a keyboard ClutterInputDevice for it.

Ideally clutter devices should be able to reflect their full capabilities,
or maybe account for the fact that certain events can be sent from
seemingly unexpected device types. But this will bring a somewhat better
behavior on such devices.
Comment 33 Jasper St. Pierre (not reading bugmail) 2014-11-27 18:55:28 UTC
Review of attachment 291651 [details] [review]:

Sure. Do we know if this better matches xf86-input-evdev?
Comment 34 Peter Hutterer 2014-12-05 01:44:03 UTC
mostly. evdev sets anything with keys as XI_KEYBOARD type, but the server gives preference to pointers. so pointer devices with keys will show up as pointer devices in XI2.
problem is that you'll also get keyboards with axes which will give you the inverse problem, they're just rarer than mice with keys.
Comment 35 Carlos Garnacho 2014-12-10 17:02:58 UTC
Comment on attachment 291651 [details] [review]
evdev: Prefer pointer/touch devices over keyboard devices

Ok, I pushed the patch at the moment, still would be nice to reflect
capabilities better though, not sure if through evdev specific or generic
APIs...

Attachment 291651 [details] pushed as ddacf33 - evdev: Prefer pointer/touch devices over keyboard devices
Comment 36 Carlos Garnacho 2014-12-10 17:07:14 UTC
Retitling for clarity
Comment 37 Jasper St. Pierre (not reading bugmail) 2014-12-10 21:33:11 UTC
Thanks so much for helping us track this down, yashax! This was a tricky one.
Comment 38 yashax 2014-12-10 23:30:49 UTC
Glad to help :) Thanks for the great support! I can use GNOME on Wayland now :)

Should I open another bug report for the crash that occurs when there is no pointer device available? (GNOME on X doesn't crash in that case)
Comment 39 Carlos Garnacho 2014-12-11 10:58:08 UTC
(In reply to comment #38)
> Should I open another bug report for the crash that occurs when there is no
> pointer device available? (GNOME on X doesn't crash in that case)

Please do, crashing is always unintended, and this bug already drifted onto covering the other aspect :)
Comment 40 yashax 2014-12-13 22:50:36 UTC
Bug report for the crash: https://bugzilla.gnome.org/show_bug.cgi?id=741494
Comment 41 André Klapper 2021-06-10 11:31:53 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of clutter, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a ticket at
  https://gitlab.gnome.org/GNOME/clutter/-/issues/

Thank you for your understanding and your help.