You are not logged in.

#1 2024-05-25 04:55:42

matt90
Member
From: New Mexico
Registered: 2014-05-23
Posts: 11

Sway ignores external input devices, possibly related to seats

I'm running Sway and experiencing an issue where it sometimes stops recognizing external input devices until the next reboot.

The kernel mecognizes the devices (in this case, a USB mouse):

# cat /dev/input/event14
[move the mouse, see gibberish]

But libinput does not:

# libinput list-devices | grep event14
# libinput debug-events
-event3   DEVICE_ADDED            Power Button                      seat0 default group1  cap:k
-event4   DEVICE_ADDED            Video Bus                         seat0 default group2  cap:k
-event0   DEVICE_ADDED            Power Button                      seat0 default group3  cap:k
-event1   DEVICE_ADDED            Lid Switch                        seat0 default group4  cap:S
-event2   DEVICE_ADDED            Sleep Button                      seat0 default group5  cap:k
-event5   DEVICE_ADDED            AT Translated Set 2 keyboard      seat0 default group6  cap:k
-event12  DEVICE_ADDED            ETPS/2 Elantech TrackPoint        seat0 default group7  cap:p left scroll-nat scroll-button
-event13  DEVICE_ADDED            ETPS/2 Elantech Touchpad          seat0 default group7  cap:pg  size 98x61mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on dwtp-on
-event6   DEVICE_ADDED            ThinkPad Extra Buttons            seat0 default group8  cap:k
[move the mouse, see nothing]

Most interesting, if I switch to another TTY and plug in a keyboard, the keyboard will work fine in the console but then if I start a seccond graphical session (Sway or Cage) from that console, this other session will also ignore the device.  This makes me suspect libinput, but I don't know enough to debug it.

Lastly, I think this may be triggered when I play around with multi-seating, which I know little about, but I don't think the devices are being stolen by another seat:

$ swaymsg -t get_seats
Seat: seat0
  Capabilities: 3
  Devices:
    ThinkPad Extra Buttons
    ETPS/2 Elantech Touchpad
    ETPS/2 Elantech TrackPoint
    AT Translated Set 2 keyboard
    Sleep Button
    Lid Switch
    Power Button
    Video Bus
    Power Button
    wlr_virtual_keyboard_v1

$ loginctl list-seats
SEAT 
seat0

1 seats listed.
$

Offline

#2 2024-05-27 09:54:44

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 1,319

Re: Sway ignores external input devices, possibly related to seats

If you suspect the seats, how did you set up the seats? polkit or seatd?

did you add yourself to the "input" group?


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

#3 2024-05-27 18:25:05

matt90
Member
From: New Mexico
Registered: 2014-05-23
Posts: 11

Re: Sway ignores external input devices, possibly related to seats

I was not in the `input` group.  But I added myself and restarted my graphical session, and nothing has changed.

I'm trying to understand more about multiseating, but I haven't found much documentation.  I just ran a few `swaymsg seat ...` commands and `loginctl attach ...` commands, but couldn't get it working the way I wanted.  The issue described here is one of the unexpected things I've encountered on that journey.

But since both Sway and loginctl now report only one seat (see previous), I don't understand how it could still be causing issues.

Offline

#4 2024-05-27 18:28:12

matt90
Member
From: New Mexico
Registered: 2014-05-23
Posts: 11

Re: Sway ignores external input devices, possibly related to seats

Ah, I see the following in the wiki:

If polkit is already installed on your system, Sway should automatically get access to your seat.

Since I've done nothing to set up seatd, I expect access is being managed by Polkit.

Offline

#5 2024-05-27 18:54:24

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 1,319

Re: Sway ignores external input devices, possibly related to seats

Well you can also simply add your user to the seat group and enable seatd.service instead of using polkit. same outcome. It's up to you.

But I think sway would've thrown a error if you hadn't set up either.


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

#6 2024-05-29 00:40:14

matt90
Member
From: New Mexico
Registered: 2014-05-23
Posts: 11

Re: Sway ignores external input devices, possibly related to seats

I think I have Polkit by default as a dependency of other stuff.

Hm, and this may be further evidence that some seating misconfiguration is at fault:

$ udisksctl mount -b /dev/sda1 # ← External drive
==== AUTHENTICATING FOR org.freedesktop.udisks2.filesystem-mount-other-seat ====
Authentication is required to mount USB SanDisk 3.2Gen1 (/dev/sda1)
Authenticating as: [...]
Password:

But if there's another seat, it's not in the output of `swaymsg` or `loginctl` (see first post).  What am I missing?

Offline

Board footer

Powered by FluxBB