Your message dated Tue, 18 Jul 2023 19:58:01 +0200
with message-id <12248278.O9o76ZdvQC@bagend>
and subject line Re: Bug#1040943: systemd-logind: 'HandlePowerKey=ignore' works 
in logind.conf, not in logind.conf.d/custom.conf
has caused the Debian Bug report #1040943,
regarding systemd-logind: With 'HandlePowerKeyLongPress=shutdown' configured, a 
short press is interpreted as long press
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1040943: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040943
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: systemd
Version: 253.5-1
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I'm working on a Debian system/image for Pine64's PineTab2 (tablet) and
by default when I (short) press the power button, the device powers off.
Right now I'm not using any DE, so it's a CLI only system.

When I created /etc/systemd/logind.conf.d/custom.conf with
HandlePowerKey=ignore

Nothing changed after restarting systemd-logind.service or rebooting,
IOW the system shut down.
Confusingly `sudo systemd-analyze cat-config systemd/logind.conf` *did*
show the setting, making me think it was configured correctly.

The PineTab2 is shipped with an ArchLinuxARM system and when I logged
in to a VT, pressing the power button shut the system down.
But when I set `HandlePowerKey=ignore` in /etc/systemd/logind.conf,
pressing the power key got ignored.

I then renamed `custom.conf` to `custom.conf.disabled` on my Debian
system and made the change directly in /etc/systemd/logind.conf and
then it worked!
When I did the reverse on the ALARM system, so it was only configured in
logind.conf.d/custom.conf, then the tablet turned off.

So on both Debian and ALARM, when specifying `HandlePowerKey=ignore` in
/etc/systemd/logind.conf.d/custom.conf, the setting does NOT work and
the tablet powers down when pressing the power button.
But on both systems the setting does work when set in
/etc/systemd/logind.conf and pressing the power button gets ignored.

While I'm reporting it against the version in Unstable, there's a rather
high chance the issue also occurs on Testing/Trixie and probably even on
Bookworm (which my Debian system started out with).
But I only tried editing logind.conf directly after I had upgraded the
system first to Trixie and then to Sid.

Note: This bug report is NOT send from the (arm64) PineTab2 but my
normal (amd64) PC, but I don't think that matters. If it does/would, I
could start over again on the PT2, but hopefully that isn't needed.

Cheers,
  Diederik

- -- Package-specific info:

- -- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), 
(101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.3.0-2-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd depends on:
ii  libacl1            2.3.1-3
ii  libaudit1          1:3.1.1-1
ii  libblkid1          2.38.1-6
ii  libc6              2.37-5
ii  libcap2            1:2.66-4
ii  libcryptsetup12    2:2.6.1-4
ii  libfdisk1          2.38.1-6
ii  libgcrypt20        1.10.2-2
ii  libkmod2           30+20230519-1
ii  liblz4-1           1.9.4-1
ii  liblzma5           5.4.1-0.2
ii  libmount1          2.38.1-6
ii  libp11-kit0        0.25.0-3
ii  libseccomp2        2.5.4-1+b3
ii  libselinux1        3.5-1
ii  libssl3            3.0.9-1
ii  libsystemd-shared  253.5-1
ii  libsystemd0        253.5-1
ii  libzstd1           1.5.5+dfsg2-1
ii  mount              2.38.1-6
ii  systemd-dev        253.5-1

Versions of packages systemd recommends:
ii  dbus [default-dbus-system-bus]  1.14.8-2
ii  ntpsec [time-daemon]            1.2.2+dfsg1-1

Versions of packages systemd suggests:
ii  libfido2-1            1.13.0-1
ii  libqrencode4          4.1.1-1
ii  libtss2-esys-3.0.2-0  4.0.1-1
ii  libtss2-mu0           4.0.1-1
pn  libtss2-rc0           <none>
ii  policykit-1           122-4
ii  polkitd               122-4
pn  systemd-boot          <none>
ii  systemd-container     253.5-1
pn  systemd-homed         <none>
pn  systemd-resolved      <none>
pn  systemd-userdbd       <none>

Versions of packages systemd is related to:
ii  dbus-user-session  1.14.8-2
pn  dracut             <none>
ii  initramfs-tools    0.142
pn  libnss-systemd     <none>
ii  libpam-systemd     253.5-1
ii  udev               253.5-1

- -- no debconf information

-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQT1sUPBYsyGmi4usy/XblvOeH7bbgUCZK7zTgAKCRDXblvOeH7b
bumiAQCc5FQ2l+byOotVjv8D39wyrZNou/UPy9/owCWHlDWnogD/WHZUgkfj6zuQ
IurqY7ZxS5y1T5lmu4ofBcbqNupkJgI=
=pptn
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message ---
On Monday, 17 July 2023 07:44:54 CEST Michael Biebl wrote:
> > The problem is that in all cases I pressed the power key equally short.
> 
> Ok, so it does not look like a configuration issue i.e.
> HandlePowerKeyLongPress=shutdown' is *not* interpreted as short.
> 
> It's rather that the detection and distinction of long and short key
> presses doesn't work reliably.
> 
> Might be a hardware limitation / hardware related bug.

I really hope it isn't (actual) hardware related bug, but the upstreaming of 
the DeviceTree still needs to happen and it could (very well) be that the 
problem is in that.

> In any case, since Debian doesn't ship any patches in that regard,
> please file this issue upstream at
> https://github.com/systemd/systemd/issues and report back with the issue
> number.

If after the DeviceTree has been accepted upstream (and thus went through the 
review process) and I can then still reproduce the issue, I will file the issue 
upstream. And if/when that happens I'll reopen this bug and set the forwarded 
field. Closing it for now though.

Sorry for the noise.

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---

Reply via email to