libinput in XPS 13 2-in-1 7390 doesn't expose SW_TABLET_MODE event
Summary
I installed arch linux & sway on a new XPS 13 2-in-1 7390. As first reported in this sway issue, while the Lid switch event works when closing/opening my laptop's lid, the tablet switch event is not detected. This is because libinput doesn't expose it to wlroots. Testing with tools like evtest and stdbuf, I could confirm that the kernel never send a EV_SW SW_TABLET_MODE event when it should.
One thing that baffles me is that my keyboard and touchpad are disabled as documented by libinput. I first thought this might be something done by Dell on the bios side, but the lack of bios settings for this part, and the coincidence with the documentation makes it really likely that libinput correctly handles the event, although it doesn't forward the event. Yet, as explained in libinput -> recording devices with evemu, if libinput was really inhibiting an event, I should at least detect it with evemu, which listens directly to the kernel. Yet, I'm not catching anything there as well...
Another hint pointing that libinput isn't doing anything with the keyboard is that manually adding a quirk for my laptop in 50-system-dell.quirks
using ModelTabletModeNoSuspend=1 and confirming with libinput quirks list /dev/input/event0 --verbose
that the quirks are picked up, doesn't change anything, the keyboard and touchpad are still disabled when moving the lid more than 180 degrees.
[Dell XPS13 7390 Touchpad]
MatchName=*Synaptics s3203
MatchDMIModalias=dmi:*svnDellInc.:*pnXPS137390*
AttrPressureRange=15:10
AttrPalmPressureThreshold=150
ModelTabletModeNoSuspend=1
Related stuff you might be interesting in:
- sway support of the tablet mode switch
- wlroots support of libinput switch
- wacom-hid-descriptors for the XPS 7390 (as I understand, libwacom (dependency of libinput) is using these descriptions
- libwacom data for the XPS 7390
Steps to reproduce
- Get a XPS 7390
- Install arch linux & sway (which auto-installs libinput throught wlroots)
- Listen for events when moving the lid into tablet mode. Nothing happens, EV_SW SW_TABLET_MODE event expected
libinput version you encountered the bug on
$ pacman -Sii libinput
Repository : extra
Name : libinput
Version : 1.14.3-1
Description : Input device management and event handling library
Architecture : x86_64
URL : https://www.freedesktop.org/wiki/Software/libinput/
Licenses : custom:X11
Groups : None
Provides : None
Depends On : mtdev systemd libevdev libwacom
Optional Deps : gtk3: libinput debug-gui
python-pyudev: libinput measure
python-libevdev: libinput measure
Required By : clutter deepin-clutter efl kodi-gbm muffin
mutter qt5-base ukwm weston wlc wlroots
xf86-input-libinput
Optional For : None
Conflicts With : None
Replaces : None
Download Size : 213.81 KiB
Installed Size : 849.09 KiB
Packager : Andreas Radke <andyrtr@archlinux.org>
Build Date : Mon Oct 28 15:22:13 2019
MD5 Sum : 30f29d8e25cbb0bb0abebaae40802538
SHA-256 Sum : 6f639a8463a1e7026804ac60d6d5bc2b264162844439b116bd2203645f2cfe6d
Signatures : 94657AB20F2A092B
Hardware information:
XPS 13 2-in-1 7390
lspci & libinput list-devices
$ lspci
00:00.0 Host bridge: Intel Corporation Device 8a12 (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Iris Plus Graphics G7 (rev 07)
00:04.0 Signal processing controller: Intel Corporation Device 8a03 (rev 03)
00:05.0 Multimedia controller: Intel Corporation Device 8a19 (rev 03)
00:07.0 PCI bridge: Intel Corporation Ice Lake Thunderbolt 3 PCI Express Root Port #0 (rev 03)
00:07.2 PCI bridge: Intel Corporation Ice Lake Thunderbolt 3 PCI Express Root Port #2 (rev 03)
00:0d.0 USB controller: Intel Corporation Ice Lake Thunderbolt 3 USB Controller (rev 03)
00:0d.2 System peripheral: Intel Corporation Ice Lake Thunderbolt 3 NHI #0 (rev 03)
00:0d.3 System peripheral: Intel Corporation Ice Lake Thunderbolt 3 NHI #1 (rev 03)
00:12.0 Serial controller: Intel Corporation Device 34fc (rev 30)
00:14.0 USB controller: Intel Corporation Ice Lake-LP USB 3.1 xHCI Host Controller (rev 30)
00:14.2 RAM memory: Intel Corporation Device 34ef (rev 30)
00:14.3 Network controller: Intel Corporation Killer Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW) (rev 30)
00:15.0 Serial bus controller [0c80]: Intel Corporation Ice Lake-LP Serial IO I2C Controller #0 (rev 30)
00:15.1 Serial bus controller [0c80]: Intel Corporation Ice Lake-LP Serial IO I2C Controller #1 (rev 30)
00:15.3 Serial bus controller [0c80]: Intel Corporation Ice Lake-LP Serial IO I2C Controller #3 (rev 30)
00:16.0 Communication controller: Intel Corporation Management Engine Interface (rev 30)
00:1d.0 PCI bridge: Intel Corporation Ice Lake-LP PCI Express Root Port #9 (rev 30)
00:1d.7 PCI bridge: Intel Corporation Device 34b7 (rev 30)
00:1f.0 ISA bridge: Intel Corporation Ice Lake-LP LPC Controller (rev 30)
00:1f.3 Audio device: Intel Corporation Smart Sound Technology Audio Controller (rev 30)
00:1f.4 SMBus: Intel Corporation Ice Lake-LP SMBus Controller (rev 30)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Ice Lake-LP SPI Controller (rev 30)
57:00.0 Non-Volatile memory controller: Device 1e0f:0001
58:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
$ libinput list-devices
Device: Video Bus
Kernel: /dev/input/event12
Group: 1
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Power Button
Kernel: /dev/input/event1
Group: 2
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Lid Switch
Kernel: /dev/input/event0
Group: 3
Seat: seat0, default
Capabilities: switch
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Sleep Button
Kernel: /dev/input/event2
Group: 4
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Wacom HID 48EE Pen
Kernel: /dev/input/event9
Group: 5
Seat: seat0, default
Size: 288x180mm
Capabilities: tablet
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: identity matrix
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: none
Rotation: n/a
Device: Wacom HID 48EE Finger
Kernel: /dev/input/event10
Group: 5
Seat: seat0, default
Size: 288x180mm
Capabilities: touch
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: identity matrix
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: 00304238304C4C44:00 06CB:CD7A Mouse
Kernel: /dev/input/event7
Group: 6
Seat: seat0, default
Capabilities: pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: button
Click methods: none
Disable-w-typing: n/a
Accel profiles: flat *adaptive
Rotation: n/a
Device: 00304238304C4C44:00 06CB:CD7A Touchpad
Kernel: /dev/input/event8
Group: 6
Seat: seat0, default
Size: 108x63mm
Capabilities: pointer gesture
Tap-to-click: disabled
Tap-and-drag: enabled
Tap drag lock: disabled
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: disabled
Calibration: n/a
Scroll methods: *two-finger edge
Click methods: *button-areas clickfinger
Disable-w-typing: enabled
Accel profiles: none
Rotation: n/a
Device: HDA Intel PCH Headphone Mic
Kernel: /dev/input/event13
Group: 7
Seat: seat0, default
Capabilities:
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: HDA Intel PCH HDMI/DP,pcm=3
Kernel: /dev/input/event14
Group: 7
Seat: seat0, default
Capabilities:
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: HDA Intel PCH HDMI/DP,pcm=7
Kernel: /dev/input/event15
Group: 7
Seat: seat0, default
Capabilities:
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: HDA Intel PCH HDMI/DP,pcm=8
Kernel: /dev/input/event16
Group: 7
Seat: seat0, default
Capabilities:
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: HDA Intel PCH HDMI/DP,pcm=9
Kernel: /dev/input/event17
Group: 7
Seat: seat0, default
Capabilities:
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: HDA Intel PCH HDMI/DP,pcm=10
Kernel: /dev/input/event18
Group: 7
Seat: seat0, default
Capabilities:
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: HDA Intel PCH HDMI/DP,pcm=11
Kernel: /dev/input/event19
Group: 7
Seat: seat0, default
Capabilities:
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: HDA Intel PCH HDMI/DP,pcm=12
Kernel: /dev/input/event20
Group: 7
Seat: seat0, default
Capabilities:
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Intel HID events
Kernel: /dev/input/event4
Group: 8
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Dell WMI hotkeys
Kernel: /dev/input/event6
Group: 9
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Device: AT Translated Set 2 keyboard
Kernel: /dev/input/event3
Group: 10
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Accel profiles: n/a
Rotation: n/a
Other log output:
-
libinput record
output:
version: 1
ndevices: 1
libinput:
version: "1.14.3"
git: "unknown"
system:
kernel: "5.4.6-arch3-1"
dmi: "dmi:bvnDellInc.:bvr1.0.13:bd09/17/2019:svnDellInc.:pnXPS1373902-in-1:pvr:rvnDellInc.:rn06CDVY:rvrA00:cvnDellInc.:ct31:cvr:"
devices:
- node: /dev/input/event0
evdev:
# Name: Lid Switch
# ID: bus 0x19 vendor 00 product 0x5 version 00
# Supported Events:
# Event type 0 (EV_SYN)
# Event type 5 (EV_SW)
# Event code 0 (SW_LID)
# State 0
# Properties:
name: "Lid Switch"
id: [25, 0, 5, 0]
codes:
0: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] # EV_SYN
5: [0] # EV_SW
properties: []
udev:
properties:
- ID_INPUT=1
- ID_INPUT_SWITCH=1
- LIBINPUT_DEVICE_GROUP=19/0/5:PNP0C0D/button
quirks:
events:
-
libinput debug-events --verbose
output: As expected, this doesn't show any information when setting the lid in tablet mode, and it doesn't detect that the keyboard & touchpad are being deactivated.
Following this bug report, I'm expecting you to tell me that this is not related to libinput, since there's no output and no way for you to reproduce except buying the expensive machine (or asking me to run steps for you). In that case, where do you think I should send a bug report? Maybe libwacom?
Thank you for the support.