Ask Ubuntu Asked on November 1, 2021
I’ve just installed Ubuntu Studio 20.04. Previously I had Ubuntu 18.04. Ubuntu Studio does not have the 60 second delay when shutting down, at least by default. How do I get this back?
I didn’t see anything in the Xfce Power Manager.
Edit ————————————
/usr/share/doc/acpid/examples/powerbtn.sh
No ‘delay’ here:
#!/bin/sh
# /etc/acpi/powerbtn.sh
# Initiates a shutdown when the power putton has been
# pressed.
# getXuser gets the X user belonging to the display in $displaynum.
# If you want the foreground X user, use getXconsole!
getXuser() {
user=`pinky -fw | awk '{ if ($2 == ":'$displaynum'" || $(NF) == ":'$displaynum'" ) { print $1; exit; } }'`
if [ x"$user" = x"" ]; then
startx=`pgrep -n startx`
if [ x"$startx" != x"" ]; then
user=`ps -o user --no-headers $startx`
fi
fi
if [ x"$user" != x"" ]; then
userhome=`getent passwd $user | cut -d: -f6`
export XAUTHORITY=$userhome/.Xauthority
else
export XAUTHORITY=""
fi
export XUSER=$user
}
# Skip if we just in the middle of resuming.
test -f /var/lock/acpisleep && exit 0
# If the current X console user is running a power management daemon that
# handles suspend/resume requests, let them handle policy This is effectively
# the same as 'acpi-support's '/usr/share/acpi-support/policy-funcs' file.
getXconsole
PMS="gnome-power-manager kpowersave xfce4-power-manager"
PMS="$PMS guidance-power-manager.py dalston-power-applet"
if pidof -x $PMS > /dev/null; then
exit
elif test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q klaptopdaemon; then
exit
elif test "$XUSER" != "" && test -x /usr/bin/qdbus; then
kded4pid=$(pgrep -n -u $XUSER kded4)
if test "$kded4pid" != ""; then
dbusaddr=$(su - $XUSER -c "grep -z DBUS_SESSION_BUS_ADDRESS /proc/$kded4pid/environ")
if test "$dbusaddr" != "" && su - $XUSER -c "export $dbusaddr; qdbus org.kde.kded" | grep -q powerdevil; then
exit
fi
fi
fi
# If all else failed, just initiate a plain shutdown.
/sbin/shutdown -h now "Power button pressed"
Just after some quick research, it seems to be a gnome-shell feature as you listed your shell as Xfce so I looked at why I had it and my current shell and then what was different about your Ubuntu setup and came down to the shell.
"shutdown delay is part of gnome-shell, the timeout is hard-coded somewhere."
Try checking for:
/etc/acpi/powerbtn.sh
Important part:
# If the current X console user is running a power management daemon that
# handles suspend/resume requests, let them handle policy This is effectively
# the same as 'acpi-support's '/usr/share/acpi-support/policy-funcs' file.
[ -r /usr/share/acpi-support/power-funcs ] && getXconsole
PMS="gnome-settings-daemon kpowersave xfce4-power-manager"
PMS="$PMS guidance-power-manager.py dalston-power-applet"
PMS="$PMS mate-settings-daemon"
PMS="$PMS unity-settings-daemon"
Your might have more options (I checked 16.04.4 server ) It has several options in the
to test for different desktops. Assuming you are using systemd: systemd-login uses
/etc/systemd/logind.conf for its settings.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#UserTasksMax=12288
So I would expect this one:
InhibitDelayMaxSec=
Specifies the maximum time a system shutdown or sleep request is delayed due to an inhibitor lock of type "delay" being active before the inhibitor is ignored and the operation executes anyway. Defaults to 5.
Hope this helps.
Answered by SimpliFixed on November 1, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP