Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] sway: keyboard not released on exit under certain conditions
@ 2020-12-14  0:04 st3r4g
  2020-12-14  0:11 ` ericonr
                   ` (30 more replies)
  0 siblings, 31 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14  0:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

New issue by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname: Void 5.9.13_1 x86_64 AuthenticAMD notuptodate rFFF
* package: sway-1.5.1_1

### Expected behavior
keyboard grab released, linux console receives keypresses

### Actual behavior
keyboard still grabbed, can only shutdown via power key

### Steps to reproduce the behavior
* use `elogind` as `libseat` backend
* have `exec sway` in `.bash_profile`
* Exit sway via `$mod+Shift+e` (`swaymsg exit`)

This started happening after the transition to `libseat` I believe.


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
@ 2020-12-14  0:11 ` ericonr
  2020-12-14  0:24 ` st3r4g
                   ` (29 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: ericonr @ 2020-12-14  0:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744094403

Comment:
You can probably reacquire the keyboard with sysrq magic, `alt+sysrq+r`.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
  2020-12-14  0:11 ` ericonr
@ 2020-12-14  0:24 ` st3r4g
  2020-12-14  9:47 ` st3r4g
                   ` (28 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14  0:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744096967

Comment:
Yeah it worked... didn't know that, thanks!

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
  2020-12-14  0:11 ` ericonr
  2020-12-14  0:24 ` st3r4g
@ 2020-12-14  9:47 ` st3r4g
  2020-12-14 10:06 ` st3r4g
                   ` (27 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14  9:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744318736

Comment:
Additional info:
* no bug if `wlroots` compiled with `libelogind` session backend
* no bug if I logout via `loginctl terminate-session $XDG_SESSION_ID`

I am not sure who is to blame here. `sway` doesn't appear to do anything session-related on exit, so `elogind` should handle everything. But that doesn't explain the different behavior between the two session backends.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (2 preceding siblings ...)
  2020-12-14  9:47 ` st3r4g
@ 2020-12-14 10:06 ` st3r4g
  2020-12-14 10:09 ` st3r4g
                   ` (26 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 10:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744318736

Comment:
Additional info:
* no bug if `wlroots` compiled with `libelogind` session backend
* no bug if I logout via `loginctl terminate-session $XDG_SESSION_ID` (which is also glitchless, unlike `swaymsg exit`)

I am not sure who is to blame here. `sway` doesn't appear to do anything session-related on exit, so `elogind` should handle everything. But that doesn't explain the different behavior between the two session backends.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (3 preceding siblings ...)
  2020-12-14 10:06 ` st3r4g
@ 2020-12-14 10:09 ` st3r4g
  2020-12-14 10:35 ` kennylevinsen
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 10:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744318736

Comment:
Additional info:
* no bug if `wlroots` compiled with `logind` session backend
* no bug if I logout via `loginctl terminate-session $XDG_SESSION_ID` (which is also glitchless, unlike `swaymsg exit`)

I am not sure who is to blame here. `sway` doesn't appear to do anything session-related on exit, so `elogind` should handle everything. But that doesn't explain the different behavior between the two session backends.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (4 preceding siblings ...)
  2020-12-14 10:09 ` st3r4g
@ 2020-12-14 10:35 ` kennylevinsen
  2020-12-14 10:55 ` kennylevinsen
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-14 10:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744348052

Comment:
If you drop back to the kernel console but do not have working keyboard input, then it would seem that elogind is not resetting the kernel keyboard mode (with KDSKBMODE) back to K_UNICODE. It is supposed to do this when the session control is either explicitly or implicitly dropped.

What version of elogind was tested against? You could use `busctl monitor` to get a dbus trace and compare with libseat to bare wlroots logind backend.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (5 preceding siblings ...)
  2020-12-14 10:35 ` kennylevinsen
@ 2020-12-14 10:55 ` kennylevinsen
  2020-12-14 11:21 ` st3r4g
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-14 10:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744359388

Comment:
The issue is not reproducible under systemd-logind 245 on a Fedora install I had lying around.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (6 preceding siblings ...)
  2020-12-14 10:55 ` kennylevinsen
@ 2020-12-14 11:21 ` st3r4g
  2020-12-14 11:25 ` st3r4g
                   ` (22 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 11:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744373873

Comment:
From the dbus trace, the difference seems to be that the `logind` backend calls `ReleaseControl` while the `libseat` backend does not.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (7 preceding siblings ...)
  2020-12-14 11:21 ` st3r4g
@ 2020-12-14 11:25 ` st3r4g
  2020-12-14 11:34 ` st3r4g
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 11:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744373873

Comment:
From the dbus trace, the difference seems to be that the `logind` backend calls `ReleaseControl` while the `libseat` backend does not.

elogind version is 243.4

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (8 preceding siblings ...)
  2020-12-14 11:25 ` st3r4g
@ 2020-12-14 11:34 ` st3r4g
  2020-12-14 11:34 ` st3r4g
                   ` (20 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 11:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744373873

Comment:
From the dbus trace, the difference seems to be that the `logind` backend calls `ReleaseControl` while the `libseat` backend does not.

elogind version is 243.4

> The issue is not reproducible under systemd-logind 245 on a Fedora install I had lying around.
How are you starting sway? It happens when starting with `exec sway` in `.bash_profile`

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (9 preceding siblings ...)
  2020-12-14 11:34 ` st3r4g
@ 2020-12-14 11:34 ` st3r4g
  2020-12-14 11:36 ` st3r4g
                   ` (19 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 11:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744373873

Comment:
From the dbus trace, the difference seems to be that the `logind` backend calls `ReleaseControl` while the `libseat` backend does not.

elogind version is 243.4

> The issue is not reproducible under systemd-logind 245 on a Fedora install I had lying around.

How are you starting sway? It happens when starting with `exec sway` in `.bash_profile`

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (10 preceding siblings ...)
  2020-12-14 11:34 ` st3r4g
@ 2020-12-14 11:36 ` st3r4g
  2020-12-14 11:36 ` st3r4g
                   ` (18 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 11:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744373873

Comment:
From the dbus trace, the difference seems to be that the `logind` backend calls `ReleaseControl` while the `libseat` backend does not.

elogind version is 243.4

> The issue is not reproducible under systemd-logind 245 on a Fedora install I had lying around.

How are you starting sway? It happens when starting with `exec sway` in `.bash_profile`, but now manually in the shell.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (11 preceding siblings ...)
  2020-12-14 11:36 ` st3r4g
@ 2020-12-14 11:36 ` st3r4g
  2020-12-14 11:37 ` kennylevinsen
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 11:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744373873

Comment:
From the dbus trace, the difference seems to be that the `logind` backend calls `ReleaseControl` while the `libseat` backend does not.

elogind version is 243.4

> The issue is not reproducible under systemd-logind 245 on a Fedora install I had lying around.

How are you starting sway? It happens when starting with `exec sway` in `.bash_profile`, but not manually in the shell.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (12 preceding siblings ...)
  2020-12-14 11:36 ` st3r4g
@ 2020-12-14 11:37 ` kennylevinsen
  2020-12-14 11:55 ` kennylevinsen
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-14 11:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744382307

Comment:
> From the dbus trace, the difference seems to be that the logind backend calls ReleaseControl while the libseat backend does not.

ReleaseControl is indeed not called on libseat shutdown, because disconnecting from the bus is supposed to have the same effect. In elogind, this is set up here: https://github.com/elogind/elogind/blob/80c3df891cbe3bcdd27ada05ee7ca938a2c051ca/src/login/logind-session.c#L1521, with on_bus_track closing the session.

While we could just add the ReleaseControl call to libseat, not having working disconnect cleanup in elogind will lead to other problems, with e.g. a compositor crash still leaving you with a broken console.

> How are you starting sway? It happens when starting with exec sway in .bash_profile, but now manually in the shell.

Ran `LIBSEAT_BACKEND=logind sway -c sway_config -d 2>swaylog` from an empty TTY. The config is a mostly empty debug config, the env var is to force the logind backend instead of seatd.

It is very peculiar if it doesn't happen when you run it manually. I have not tried to mess around with my shell init scripts.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (13 preceding siblings ...)
  2020-12-14 11:37 ` kennylevinsen
@ 2020-12-14 11:55 ` kennylevinsen
  2020-12-14 12:03 ` st3r4g
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-14 11:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744391662

Comment:
I tried putting the following in my .bash_profile, changing my shell to bash and then logging in on tty4:

```
if [[ "$(tty)" == "/dev/tty4" ]]
then
        LIBSEAT_BACKEND=logind exec sway -c ~/sway_config -d 2>~/sway_debug.log
fi
```

This did not reproduce the issue. Afer issuing `swaymsg exit`, I was dropped back to a working TTY login.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (14 preceding siblings ...)
  2020-12-14 11:55 ` kennylevinsen
@ 2020-12-14 12:03 ` st3r4g
  2020-12-14 12:03 ` st3r4g
                   ` (14 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 12:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744395520

Comment:
I can also reproduce with manually running `exec sway`

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (15 preceding siblings ...)
  2020-12-14 12:03 ` st3r4g
@ 2020-12-14 12:03 ` st3r4g
  2020-12-14 12:05 ` st3r4g
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 12:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744395520

Comment:
I can also reproduce with manually running `exec sway`. It seems some kind of race on logout.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (16 preceding siblings ...)
  2020-12-14 12:03 ` st3r4g
@ 2020-12-14 12:05 ` st3r4g
  2020-12-14 12:06 ` st3r4g
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 12:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744395520

Comment:
I can also reproduce with manually running `exec sway`. It seems some kind of race on logout. I will try other `elogind` versions

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (17 preceding siblings ...)
  2020-12-14 12:05 ` st3r4g
@ 2020-12-14 12:06 ` st3r4g
  2020-12-14 12:11 ` kennylevinsen
                   ` (11 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 12:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744395520

Comment:
I can also reproduce with manually running `exec sway`. It seems some kind of race on logout. I will try if newer `elogind` releases fix it

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (18 preceding siblings ...)
  2020-12-14 12:06 ` st3r4g
@ 2020-12-14 12:11 ` kennylevinsen
  2020-12-14 22:22 ` kennylevinsen
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-14 12:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744399088

Comment:
Still no reproduction on "plain" logind. When you use the exec approach, the following will happen in parallel:
1. The parent `login` process will shut down the PAM session, having pam_elogind.so/pam_systemd.so notify (e)logind.
2. The bus is going to detach, notifying (e)logind.

It may very well be that elogind (and possibly logind if it's just a race) ends up messing things up when these happen simultaneously, as they both trigger various state changes.

Newer versions would be good to test. I don't have an elogind system near me right now, otherwise I'd have tried to see if I could reproduce there.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (19 preceding siblings ...)
  2020-12-14 12:11 ` kennylevinsen
@ 2020-12-14 22:22 ` kennylevinsen
  2020-12-14 22:24 ` kennylevinsen
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-14 22:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744748048

Comment:
You can probably reproduce using libseat's [simpletest](https://git.sr.ht/~kennylevinsen/seatd/tree/master/examples/simpletest/main.c), by running it as `simpletest /dev/dri/card0` (first argument is the device to try to open).

I haven't had time to test elogind, but I had a look at the code, and the session handling is considerably different than logind's own due to not being able to rely on systemd scopes. That's *probably* where it drops the ball.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (20 preceding siblings ...)
  2020-12-14 22:22 ` kennylevinsen
@ 2020-12-14 22:24 ` kennylevinsen
  2020-12-14 22:44 ` kennylevinsen
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-14 22:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744748048

Comment:
You can probably reproduce using libseat's [simpletest](https://git.sr.ht/~kennylevinsen/seatd/tree/master/examples/simpletest/main.c) instead of running sway, by running it as `simpletest /dev/dri/card0` (first argument is the device to try to open).

I haven't had time to try to reproduce on elogind, but I had a look at the code, and the session handling is considerably different than logind's own due to not being able to rely on systemd scopes. That's *probably* where it drops the ball.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (21 preceding siblings ...)
  2020-12-14 22:24 ` kennylevinsen
@ 2020-12-14 22:44 ` kennylevinsen
  2020-12-14 23:34 ` st3r4g
                   ` (7 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-14 22:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744748048

Comment:
You can probably reproduce using libseat's [simpletest](https://git.sr.ht/~kennylevinsen/seatd/tree/master/examples/simpletest/main.c) instead of running sway, by running it as `simpletest /dev/dri/card0` (first argument is the device to try to open).

I haven't had time to try to reproduce on elogind, but I had a look at the code, and the session handling is considerably different than logind's own due to not being able to rely on systemd scopes. That's *probably* where it drops the ball.

@st3r4g Can you try the `release_control` branch of seatd? It includes the ReleaseControl call, which should do the trick for clean shutdowns at least.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (22 preceding siblings ...)
  2020-12-14 22:44 ` kennylevinsen
@ 2020-12-14 23:34 ` st3r4g
  2020-12-14 23:36 ` st3r4g
                   ` (6 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 23:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744806898

Comment:
> You can probably reproduce using libseat's [simpletest](https://git.sr.ht/~kennylevinsen/seatd/tree/master/examples/simpletest/main.c) instead of running sway, by running it as `simpletest /dev/dri/card0` (first argument is the device to try to open).

You mean `exec simpletest /dev/dri/card0`? I don't reproduce it with that (can type in tty normally). Here's the output:
```
00:00:00.000 [INFO] [libseat/libseat.c:70] libseat_open_seat: Backend 'seatd' failed to open seat, skipping
00:00:00.002 [ERROR] [libseat/backend/logind.c:605] set_type: Could not set session type: Rejected send message, 2 matched rules; type="method_call", sender=":1.32" (uid=1000 pid=1936 comm="/tmp/simpletest /dev/dri/card0 ") interface="org.freedesktop.login1.Session" member="SetType" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=1209 comm="elogind-daemon ")
00:00:00.002 [INFO] [libseat/libseat.c:67] libseat_open_seat: Seat opened with backend 'logind'
libseat_open_seat(listener: 0x7ffe83dbbf30, userdata: 0x7ffe83dbbf14) = 0x55886d2282a0
waiting for activation...
active!
libseat_open_device(backend: 0x55886d2282a0, path: /dev/dri/card0, fd: 0x7ffe83dbbf18) = 5
00:00:00.003 [ERROR] [libseat/backend/logind.c:132] close_device: Could not stat fd 5
```
the first error is due to `elogind` being outdated (doesn't have SetType), but what is the second error?
> @st3r4g Can you try the `release_control` branch of seatd? It includes the ReleaseControl call, which should do the trick for clean shutdowns at least.

Yeah that works. But still, it's an elogind bug... I should try master and report to them if it still happens.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (23 preceding siblings ...)
  2020-12-14 23:34 ` st3r4g
@ 2020-12-14 23:36 ` st3r4g
  2020-12-15 13:31 ` kennylevinsen
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-14 23:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-744806898

Comment:
> You can probably reproduce using libseat's [simpletest](https://git.sr.ht/~kennylevinsen/seatd/tree/master/examples/simpletest/main.c) instead of running sway, by running it as `simpletest /dev/dri/card0` (first argument is the device to try to open).

You mean `exec simpletest /dev/dri/card0`? I don't reproduce it with that (can type in the getty normally). Here's the output:
```
00:00:00.000 [INFO] [libseat/libseat.c:70] libseat_open_seat: Backend 'seatd' failed to open seat, skipping
00:00:00.002 [ERROR] [libseat/backend/logind.c:605] set_type: Could not set session type: Rejected send message, 2 matched rules; type="method_call", sender=":1.32" (uid=1000 pid=1936 comm="/tmp/simpletest /dev/dri/card0 ") interface="org.freedesktop.login1.Session" member="SetType" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=1209 comm="elogind-daemon ")
00:00:00.002 [INFO] [libseat/libseat.c:67] libseat_open_seat: Seat opened with backend 'logind'
libseat_open_seat(listener: 0x7ffe83dbbf30, userdata: 0x7ffe83dbbf14) = 0x55886d2282a0
waiting for activation...
active!
libseat_open_device(backend: 0x55886d2282a0, path: /dev/dri/card0, fd: 0x7ffe83dbbf18) = 5
00:00:00.003 [ERROR] [libseat/backend/logind.c:132] close_device: Could not stat fd 5
```
the first error is due to `elogind` being outdated (doesn't have SetType), but what is the second error?
> @st3r4g Can you try the `release_control` branch of seatd? It includes the ReleaseControl call, which should do the trick for clean shutdowns at least.

Yeah that works. But still, it's an elogind bug... I should try master and report to them if it still happens.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (24 preceding siblings ...)
  2020-12-14 23:36 ` st3r4g
@ 2020-12-15 13:31 ` kennylevinsen
  2020-12-15 13:31 ` kennylevinsen
                   ` (4 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-15 13:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-745288271

Comment:
> the first error is due to elogind being outdated (doesn't have SetType), but what is the second error?

A minor bug in simpletests (closing the device fd too early, which trips up the logind backend). It's fixed on the `release_control` branch, but the bug should be inconsequential for reproduction.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (25 preceding siblings ...)
  2020-12-15 13:31 ` kennylevinsen
@ 2020-12-15 13:31 ` kennylevinsen
  2020-12-16 10:40 ` st3r4g
                   ` (3 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: kennylevinsen @ 2020-12-15 13:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

New comment by kennylevinsen on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-745288271

Comment:
> the first error is due to elogind being outdated (doesn't have SetType), but what is the second error?

A minor bug in simpletest (closing the device fd too early, which trips up the logind backend). It's fixed on the `release_control` branch, but the bug should be inconsequential for reproduction.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (26 preceding siblings ...)
  2020-12-15 13:31 ` kennylevinsen
@ 2020-12-16 10:40 ` st3r4g
  2020-12-16 10:41 ` st3r4g
                   ` (2 subsequent siblings)
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-16 10:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-746072430

Comment:
I am running `elogind` commit `80c3df891cbe3bcdd27ada05ee7ca938a2c051ca` (current master, from systemd 246) and I'm not seeing the issue anymore. So I think it was a logind bug that got fixed. This issue can be closed when elogind releases `v246` and we update to that.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: sway: keyboard not released on exit under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (27 preceding siblings ...)
  2020-12-16 10:40 ` st3r4g
@ 2020-12-16 10:41 ` st3r4g
  2021-02-05  2:10 ` [ISSUE] [CLOSED] elogind: keyboard not released " ericonr
  2021-02-05  2:10 ` ericonr
  30 siblings, 0 replies; 32+ messages in thread
From: st3r4g @ 2020-12-16 10:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 430 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-746072430

Comment:
I am running `elogind` commit `80c3df891cbe3bcdd27ada05ee7ca938a2c051ca` (current master, from systemd 246) and I'm not seeing the issue anymore. So I think it was a logind bug that got fixed in a later version. This issue can be closed when elogind releases `v246` and we update to that.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: elogind: keyboard not released under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (29 preceding siblings ...)
  2021-02-05  2:10 ` [ISSUE] [CLOSED] elogind: keyboard not released " ericonr
@ 2021-02-05  2:10 ` ericonr
  30 siblings, 0 replies; 32+ messages in thread
From: ericonr @ 2021-02-05  2:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/27132#issuecomment-773731986

Comment:
Closed in https://github.com/void-linux/void-packages/commit/ae06ba604c515dabf49ddc901ea668f3571969c0

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [ISSUE] [CLOSED] elogind: keyboard not released under certain conditions
  2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
                   ` (28 preceding siblings ...)
  2020-12-16 10:41 ` st3r4g
@ 2021-02-05  2:10 ` ericonr
  2021-02-05  2:10 ` ericonr
  30 siblings, 0 replies; 32+ messages in thread
From: ericonr @ 2021-02-05  2:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

Closed issue by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/issues/27132

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname: Void 5.9.13_1 x86_64 AuthenticAMD notuptodate rFFF
* package: sway-1.5.1_1

### Expected behavior
keyboard grab released, linux console receives keypresses

### Actual behavior
keyboard still grabbed, can only shutdown via power key

### Steps to reproduce the behavior
* use `elogind` as `libseat` backend
* have `exec sway` in `.bash_profile`
* exit sway via `$mod+Shift+e` (`swaymsg exit`)

This started happening after the transition to `libseat` I believe. Would be interesting to know if this happens with other `wlroots` compositor as well.

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2021-02-05  2:10 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14  0:04 [ISSUE] sway: keyboard not released on exit under certain conditions st3r4g
2020-12-14  0:11 ` ericonr
2020-12-14  0:24 ` st3r4g
2020-12-14  9:47 ` st3r4g
2020-12-14 10:06 ` st3r4g
2020-12-14 10:09 ` st3r4g
2020-12-14 10:35 ` kennylevinsen
2020-12-14 10:55 ` kennylevinsen
2020-12-14 11:21 ` st3r4g
2020-12-14 11:25 ` st3r4g
2020-12-14 11:34 ` st3r4g
2020-12-14 11:34 ` st3r4g
2020-12-14 11:36 ` st3r4g
2020-12-14 11:36 ` st3r4g
2020-12-14 11:37 ` kennylevinsen
2020-12-14 11:55 ` kennylevinsen
2020-12-14 12:03 ` st3r4g
2020-12-14 12:03 ` st3r4g
2020-12-14 12:05 ` st3r4g
2020-12-14 12:06 ` st3r4g
2020-12-14 12:11 ` kennylevinsen
2020-12-14 22:22 ` kennylevinsen
2020-12-14 22:24 ` kennylevinsen
2020-12-14 22:44 ` kennylevinsen
2020-12-14 23:34 ` st3r4g
2020-12-14 23:36 ` st3r4g
2020-12-15 13:31 ` kennylevinsen
2020-12-15 13:31 ` kennylevinsen
2020-12-16 10:40 ` st3r4g
2020-12-16 10:41 ` st3r4g
2021-02-05  2:10 ` [ISSUE] [CLOSED] elogind: keyboard not released " ericonr
2021-02-05  2:10 ` ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).