Created attachment 132224 [details] Messages from `/var/log/gdm/:0.log.2` (rotated after `systemctl restart gdm.service`) With Linux 4.11.6, X.Org Server 1.19.3, libevdev 1.5.7 and xf86-input-evdev 2.10.5 I have the strange behavior, that turning off the monitor and turning it back on, the keyboard stops working. The mouse still works. Restarting GDM with `systemctl restart gdm.service` fixes the issue. This happens when in the GDM login screen and when being logged in. Unfortunately, I do not see anything in the log files. Please find the log attached.
two things to track this down: run sudo evemu-record against the keyboard and turn off the monitor. Check if it still records keyboard events when the keyboard seems to stop in the session. If it does, then it's a kernel issue. run xinput watch-props "device name" for the keyboard device, check if the keyboard gets disabled at the X level on monitor turn off. If it does, then it's an issue with gnome-shell. Does *anything* work with the keyboard when it's dead? VT-switch with ctrl+alt-F3 maybe? If vt-switching work, it could be a stuck grab.
Thank you very much for your response with all the helpful suggestions. There are two input devices created from the keyboard. ``` kernel: [ 2.844582] input: Fujitsu Fujitsu Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:0BF8:101E.0001/input/input8 kernel: [ 2.896919] hid-generic 0003:0BF8:101E.0001: input,hidraw0: USB HID v1.10 Keyboard [Fujitsu Fujitsu Keyboard] on usb-0000:00:14.0-7/input0 kernel: [ 2.905922] input: Fujitsu Fujitsu Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:0BF8:101E.0002/input/input9 kernel: [ 2.958891] hid-generic 0003:0BF8:101E.0002: input,hidraw1: USB HID v1.10 Device [Fujitsu Fujitsu Keyboard] on usb-0000:00:14.0-7/input1 ``` That’s also listed here. ``` $ sudo ./evemu-record Available devices: /dev/input/event0: Power Button /dev/input/event1: Power Button /dev/input/event2: HDA Intel PCH Front Mic /dev/input/event3: HDA Intel PCH Rear Mic /dev/input/event4: HDA Intel PCH Line /dev/input/event5: HDA Intel PCH Line Out /dev/input/event6: HDA Intel PCH Front Headphone /dev/input/event7: HDA Intel PCH HDMI/DP,pcm=3 /dev/input/event8: Fujitsu Fujitsu Keyboard /dev/input/event9: Fujitsu Fujitsu Keyboard /dev/input/event10: Logitech USB Optical Mouse /dev/input/event11: Video Bus Select the device event number [0-11]: 8 # EVEMU 1.3 # Kernel: 4.11.6.mx64.160 # DMI: dmi:bvnFUJITSU//AmericanMegatrendsInc.:bvrV5.0.0.11R1.13.0forD3401-A1x:bd02/19/2016:svnFUJITSU:pnESPRIMO_P756:pvr:rvnFUJITSU:rnD3401-A1:rvrS26361-D3401-A1:cvnFUJITSU:ct6:cvrC$WX05: # Input device name: "Fujitsu Fujitsu Keyboard" # Input device ID: bus 0x03 vendor 0xbf8 product 0x101e version 0x110 […] ``` `evemu-record` started in a GNU Screen session still shows events, but these are not shown on the screen. That showed, that the X session hangs for some reason. I was confused, because the mouse still worked. But I am unable to open a menu or drag windows around. So it looks like a different issue. It looks like, the issue only happens on a system with an Intel graphics device. It works with AMD graphics devices (amdgpu) and NVIDIA devices (proprietary driver). It be awesome, if you could tell me which component I should report that too. Probably the modesetting driver?
``` $ more /proc/version Linux version 4.11.6.mx64.160 (root@luxuria.molgen.mpg.de) (gcc version 5.3.0 (GCC) ) #1 SMP Mon Jun 19 11:49:25 CEST 2017 $ lspci -v -s 0:02.0 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06) (prog-if 00 [VGA controller]) Subsystem: Fujitsu Technology Solutions Device 121c Flags: bus master, fast devsel, latency 0, IRQ 124 Memory at f6000000 (64-bit, non-prefetchable) [size=16M] Memory at e0000000 (64-bit, prefetchable) [size=256M] I/O ports at f000 [size=64] [virtual] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: <access denied> Kernel driver in use: i915 Kernel modules: i915 ``` In the trace below, the process started from `/usr/libexec/Xorg` has the PID 7404, and the running GNOME Terminal has 7469. ``` […] 7404 open("/sys/devices/virtual/tty/ptyp9/uevent", O_RDONLY|O_CLOEXEC) = 26 7404 fstat(26, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 7404 read(26, "MAJOR=2\nMINOR=9\nDEVNAME=ptyp9\n", 4096) = 30 7404 read(26, "", 4096) = 0 7404 close(26) = 0 7404 readlink("/sys/devices/virtual/tty/ptyp9/subsystem", "../../../../class/tty"..., 1024) = 21 7404 lstat("/dev/.udev/db/tty:ptyp9", {st_mode=S_IFLNK|0777, st_size=14, ...}) = 0 7404 readlink("/dev/.udev/db/tty:ptyp9", "ptyp9 char/2:9", 1024) = 14 7404 lstat("/dev/.udev/db/tty:ptyp9", {st_mode=S_IFLNK|0777, st_size=14, ...}) = 0 7404 readlink("/dev/.udev/db/tty:ptyp9", "ptyp9 char/2:9", 1024) = 14 7404 lstat("/dev/.udev/db/tty:ptyp9", {st_mode=S_IFLNK|0777, st_size=14, ...}) = 0 7404 readlink("/dev/.udev/db/tty:ptyp9", "ptyp9 char/2:9", 1024) = 14 7404 lstat("/dev/.udev/db/tty:ptyp9", {st_mode=S_IFLNK|0777, st_size=14, ...}) = 0 7404 readlink("/dev/.udev/db/tty:ptyp9", "ptyp9 char/2:9", 1024) = 14 7404 lstat("/dev/.udev/db/tty:ptyp9", {st_mode=S_IFLNK|0777, st_size=14, ...}) = 0 7404 readlink("/dev/.udev/db/tty:ptyp9", "ptyp9 char/2:9", 1024) = 14 7404 readlink("/sys/devices/virtual/tty/ptypa", 0x7fffadf8bf90, 1024) = -1 EINVAL (Invalid argument) 7404 stat("/sys/devices/virtual/tty/ptypa/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 7404 open("/sys/devices/virtual/tty/ptypa/uevent", O_RDONLY|O_CLOEXEC) = 26 7404 fstat(26, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 7404 read(26, "MAJOR=2\nMINOR=10\nDEVNAME=ptypa\n", 4096) = 31 […] 7404 ioctl(12, 0xc0086457, 0x7fffadf8ca50) = 0 7404 ioctl(12, 0xc00c6466, 0x7fffadf8ca50) = 0 7404 ioctl(12, 0x400c645f, 0x7fffadf8c9f0) = 0 7404 ioctl(12, 0xc01864b1, 0x7fffadf8cb60) = 0 7404 epoll_wait(3, {{EPOLLIN, {u32=18498528, u64=18498528}}, {EPOLLIN, {u32=20817424, u64=20817424}}}, 256, 111635) = 2 7404 recvmsg(14, {msg_name(12)={sa_family=AF_NETLINK, pid=-990297710, groups=00000002}, msg_iov(1)=[{"libudev\0\376\355\312\376(\0\0\0(\0\0\0\324\0\0\0\26fAy\34\246T\36"..., 8192}], msg_controllen=32, {cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS{pid=1863, uid=0, gid=0}}, msg_flags=0}, 0) = 252 7404 recvmsg(14, <unfinished ...> 7469 <... poll resumed> ) = 0 (Timeout) 7469 recvmsg(3, 0x7ffc06670690, 0) = -1 EAGAIN (Resource temporarily unavailable) 7469 poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}], 6, 0) = 0 (Timeout) 7469 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) 7469 writev(3, [{"5\30\4\0x\0\300\0\36\0\300\0\r\0\24\0\212\4\6\0y\0\300\0x\0\300\0*\0\0\0"..., 156}, {NULL, 0}, {"", 0}], 3) = 156 7469 recvmsg(3, 0x7ffc06670680, 0) = -1 EAGAIN (Resource temporarily unavailable) 7469 recvmsg(3, 0x7ffc06670690, 0) = -1 EAGAIN (Resource temporarily unavailable) 7469 poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN}], 7, 600) = 0 (Timeout) ``` The traces from GNOME Terminal only appear after moving the mouse cursor above it, but nothing can be done.
Here are the verbose i915 messages when turning the monitor off. ``` kernel: [ 1324.650050] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00400000, dig 0x10101210, pins 0x00000040 kernel: [ 1324.650058] [drm:intel_hpd_irq_handler [i915]] digital hpd port C - long kernel: [ 1324.650065] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 6 - cnt: 0 kernel: [ 1324.650076] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port C - long kernel: [ 1324.650084] [drm:i915_hotplug_work_func [i915]] running encoder hotplug functions kernel: [ 1324.650091] [drm:i915_hotplug_work_func [i915]] Connector DP-1 (pin 6) received hotplug event. kernel: [ 1324.650099] [drm:intel_dp_detect [i915]] [CONNECTOR:52:DP-1] kernel: [ 1324.650126] [drm:i915_hotplug_work_func [i915]] [CONNECTOR:52:DP-1] status updated from connected to disconnected kernel: [ 1324.650133] [drm:i915_hotplug_work_func [i915]] Connector HDMI-A-2 (pin 6) received hotplug event. kernel: [ 1324.650140] [drm:intel_hdmi_detect [i915]] [CONNECTOR:56:HDMI-A-2] kernel: [ 1324.651666] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0050 w(1) kernel: [ 1324.651674] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK on first message, retry kernel: [ 1324.653666] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0050 w(1) kernel: [ 1324.653669] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter i915 gmbus dpc kernel: [ 1324.655643] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1) kernel: [ 1324.655650] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK on first message, retry kernel: [ 1324.657693] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1) kernel: [ 1324.657696] [drm:drm_dp_dual_mode_detect] DP dual mode HDMI ID: (err -6) kernel: [ 1324.657945] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:47:HDMI-A-1] kernel: [ 1324.657953] [drm:intel_hdmi_detect [i915]] [CONNECTOR:47:HDMI-A-1] kernel: [ 1324.659635] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpb] NAK for addr: 0050 w(1) kernel: [ 1324.659643] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpb] NAK on first message, retry kernel: [ 1324.661670] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpb] NAK for addr: 0050 w(1) kernel: [ 1324.661672] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter i915 gmbus dpb kernel: [ 1324.663598] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpb] NAK for addr: 0040 w(1) kernel: [ 1324.663605] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpb] NAK on first message, retry kernel: [ 1324.665628] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpb] NAK for addr: 0040 w(1) kernel: [ 1324.665630] [drm:drm_dp_dual_mode_detect] DP dual mode HDMI ID: (err -6) kernel: [ 1324.665632] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:47:HDMI-A-1] disconnected kernel: [ 1324.665642] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:52:DP-1] kernel: [ 1324.665651] [drm:intel_dp_detect [i915]] [CONNECTOR:52:DP-1] kernel: [ 1324.665673] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:52:DP-1] disconnected kernel: [ 1324.665719] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:56:HDMI-A-2] kernel: [ 1324.665747] [drm:intel_hdmi_detect [i915]] [CONNECTOR:56:HDMI-A-2] kernel: [ 1324.667594] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0050 w(1) kernel: [ 1324.667601] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK on first message, retry kernel: [ 1324.669604] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0050 w(1) kernel: [ 1324.669622] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter i915 gmbus dpc kernel: [ 1324.671599] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1) kernel: [ 1324.671606] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK on first message, retry kernel: [ 1324.673602] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1) kernel: [ 1324.673604] [drm:drm_dp_dual_mode_detect] DP dual mode HDMI ID: (err -6) kernel: [ 1324.673606] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:56:HDMI-A-2] disconnected kernel: [ 1324.673612] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:58:DP-2] kernel: [ 1324.673619] [drm:intel_dp_detect [i915]] [CONNECTOR:58:DP-2] kernel: [ 1324.673640] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:58:DP-2] disconnected kernel: [ 1324.673644] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:62:HDMI-A-3] kernel: [ 1324.673650] [drm:intel_hdmi_detect [i915]] [CONNECTOR:62:HDMI-A-3] kernel: [ 1324.675592] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpd] NAK for addr: 0050 w(1) kernel: [ 1324.675599] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpd] NAK on first message, retry kernel: [ 1324.677583] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpd] NAK for addr: 0050 w(1) kernel: [ 1324.677586] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter i915 gmbus dpd kernel: [ 1324.679640] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpd] NAK for addr: 0040 w(1) kernel: [ 1324.679648] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpd] NAK on first message, retry kernel: [ 1324.681635] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpd] NAK for addr: 0040 w(1) kernel: [ 1324.681637] [drm:drm_dp_dual_mode_detect] DP dual mode HDMI ID: (err -6) kernel: [ 1324.681639] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:62:HDMI-A-3] disconnected kernel: [ 1324.681646] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:64:DP-3] kernel: [ 1324.681653] [drm:intel_dp_detect [i915]] [CONNECTOR:64:DP-3] kernel: [ 1324.681675] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:64:DP-3] disconnected ``` Now the messages, when turning it back on. ``` kernel: [ 1331.449722] usb 1-8: USB disconnect, device number 5 kernel: [ 1332.749718] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00400000, dig 0x10101210, pins 0x00000040 kernel: [ 1332.749726] [drm:intel_hpd_irq_handler [i915]] digital hpd port C - long kernel: [ 1332.749733] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 6 - cnt: 0 kernel: [ 1332.749743] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port C - long kernel: [ 1332.749752] [drm:i915_hotplug_work_func [i915]] running encoder hotplug functions kernel: [ 1332.749759] [drm:i915_hotplug_work_func [i915]] Connector DP-1 (pin 6) received hotplug event. kernel: [ 1332.749766] [drm:intel_dp_detect [i915]] [CONNECTOR:52:DP-1] kernel: [ 1332.749793] [drm:i915_hotplug_work_func [i915]] Connector HDMI-A-2 (pin 6) received hotplug event. kernel: [ 1332.749800] [drm:intel_hdmi_detect [i915]] [CONNECTOR:56:HDMI-A-2] kernel: [ 1332.750582] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00400000, dig 0x10101110, pins 0x00000040 kernel: [ 1332.750590] [drm:intel_hpd_irq_handler [i915]] digital hpd port C - short kernel: [ 1332.750602] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port C - short kernel: [ 1332.750991] [drm:intel_dp_read_dpcd [i915]] DPCD: 11 0a a4 01 01 00 01 81 00 00 00 00 00 00 00 kernel: [ 1332.751502] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0050 w(1) kernel: [ 1332.751510] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK on first message, retry kernel: [ 1332.751882] [drm:intel_dp_check_link_status [i915]] DDI C: channel EQ not ok, retraining kernel: [ 1332.752235] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00400000, dig 0x10101110, pins 0x00000040 kernel: [ 1332.752242] [drm:intel_hpd_irq_handler [i915]] digital hpd port C - short kernel: [ 1332.752782] [drm:intel_dp_set_signal_levels [i915]] Using signal levels 00000000 kernel: [ 1332.752790] [drm:intel_dp_set_signal_levels [i915]] Using vswing level 0 kernel: [ 1332.752797] [drm:intel_dp_set_signal_levels [i915]] Using pre-emphasis level 0 kernel: [ 1332.752804] [drm:intel_dp_program_link_training_pattern [i915]] Using DP training pattern TPS1 kernel: [ 1332.753502] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0050 w(1) kernel: [ 1332.753504] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter i915 gmbus dpc kernel: [ 1332.754465] [drm:intel_dp_start_link_train [i915]] clock recovery OK kernel: [ 1332.754472] [drm:intel_dp_program_link_training_pattern [i915]] Using DP training pattern TPS2 kernel: [ 1332.755551] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1) kernel: [ 1332.755559] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK on first message, retry kernel: [ 1332.756430] [drm:intel_dp_start_link_train [i915]] Channel EQ done. DP Training successful kernel: [ 1332.757560] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus dpc] NAK for addr: 0040 w(1) kernel: [ 1332.757562] [drm:drm_dp_dual_mode_detect] DP dual mode HDMI ID: (err -6) kernel: [ 1332.783257] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port C - short kernel: [ 1332.783646] [drm:intel_dp_read_dpcd [i915]] DPCD: 11 0a a4 01 01 00 01 81 00 00 00 00 00 00 00 kernel: [ 1332.979479] usb 1-8: new low-speed USB device number 6 using xhci_hcd kernel: [ 1333.153366] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/0003:046D:C077.0006/input/input14 kernel: [ 1333.153734] hid-generic 0003:046D:C077.0006: input,hidraw2: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:14.0-8/input0 ```
By the way, that only happens with a monitor connected over DisplayPort. I wonder what udev does differently there.
This happens with the modesetting driver and amdgpu too. So it looks like a general problem with X and older udev versions, at least udev 164.
I can confirm it happens with amdgpu in various kernels I've been using in the last year or so. The outcome is very random, either crashes my system or logs me out of Gnome. Radeon RX 560 card is tied via HDMI to an AV receiver (audio then sent to speakers and video to a TV screen via HDMI) 3 possibilities of having this happen: - if the screen goes blank when idle, might hang X or crash the system (already filed) - when I manage to deactivate all lock screens or screensavers (in buggy Gnome), if I just turn the TV off, have a nap and back on, Gnome will be at log in screen, with previous session terminated. Or system hangs. (filed here) - When switching input channel of the AV receiver for a different source and then back, X or system hangs (not filed yet but probably linked). Also, display settings of Gnome detect a Pioneer 7" screen (AV receiver LCD?) instead of a 32". On Ubuntu 17.04" with Unity, I had none of these problems. I can't figure out if the problem comes from amdgpu, X or Gnome (as Gnome absolutely sucks at dealing with displays, lock screens and screensavers). I'm sure this is just one big issue leading to all of these.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/521.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.