Amk's workaround is ideal. I modified slightly to include support for
sddm and gdm , which makes it pretty universal.

I wish I was more competent at perl. I'd love to be able to get it to
automatically set each login manager session to "Idle" on a 15 minute
cycle, and remove the systemctl suspend action; instead allowing logind
to handle the situation when all session are "Idle".

I already use notification in KDE to set IdleHint when the screen locks
(using dbus-send --system --print-reply --dest=org.freedesktop.login1
/org/freedesktop/login1/session/$XDG_SESSION_ID
"org.freedesktop.login1.Session.SetIdleHint" boolean:true )

It feels like with a couple of simple work arounds IdleHint can be used
effectively, which is a nice-to-have on single-seat workstations, and
critical for suspending on multi-seat workstations.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to lightdm in Ubuntu.
https://bugs.launchpad.net/bugs/1730606

Title:
  systemd idleaction=suspend not working in multiseat while a screen is
  showing login prompt

Status in lightdm package in Ubuntu:
  Confirmed

Bug description:
  Ubuntu 16.04.3 LTS, multiseat setup.
  systemd:  Installed: 229-4ubuntu21
  lightdm:  Installed: 1.18.3-0ubuntu1.1

  logind.conf:IdleAction=suspend
  logind.conf:IdleActionSec=300

  Using multiseat, it is not possible to have gnome settings controlling
  idle suspend, as it would ignore the other seat. IdleAction=suspend in
  /etc/systemd/logind.conf works well, provided both seats are logged in
  or locked.

  After boot, or after logout the seat remains showing login screen and
  the system never suspends.

  loginctl show-session provides IdleHint=yes that allows to determine
  whether the user is active. For some reason Active property is yes all
  the time.

  But for the login screen the show-session does not provide the hint
  about seat idling:

  $ loginctl show-session c9
  Id=c9
  User=108
  Name=lightdm
  Timestamp=Sun 2017-11-05 22:35:37 CET
  TimestampMonotonic=13418600852
  VTNr=7
  Seat=seat0
  Display=:1
  Remote=no
  Service=lightdm-greeter
  Scope=session-c9.scope
  Leader=12431
  Audit=0
  Type=x11
  Class=greeter
  Active=yes
  State=active
  IdleHint=no
  IdleSinceHint=0
  IdleSinceHintMonotonic=0

  Working on a script to check for IdleHint=Yes and Service=lightdm-
  greeter and suspend based on this.

  I am marking this as a bug in lightdm because I think it is not
  correctly reporting the idle status to the system.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1730606/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to