You are not logged in.

#1 2015-08-29 08:54:01

leniviy
Member
Registered: 2009-05-23
Posts: 177

don't sleep on low battery

Hi.
When battery is low, my laptop goes to sleep. I use the laptop as a server and when power restores, the laptop won't wake. How to disable it?

I have xfce, but in its power manager/system it says:
on battery: never
on critical battery: do nothing

Aug 29 11:37:10 mar.lan smbd[563]:   Unable to open printcap file /etc/printcap for read!
Aug 29 11:39:52 mar.lan systemd[1]: Starting Cleanup of Temporary Directories...
Aug 29 11:39:52 mar.lan systemd[1]: Started Cleanup of Temporary Directories.
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  sleep requested (sleeping: no  enabled: yes)
Aug 29 11:41:02 mar.lan kernel: IPv6: ADDRCONF(NETDEV_UP): enp10s7: link is not ready
Aug 29 11:41:02 mar.lan kernel: wlp2s0: deauthenticating from 10:fe:ed:52:92:bb by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  sleeping...
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  (enp10s7): device state change: unavailable -> unmanaged (reason 'sleeping') [20 10 37]
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  (wlp2s0): device state change: activated -> unmanaged (reason 'sleeping') [100 10 37]
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  (wlp2s0): canceled DHCP transaction, DHCP client pid 1245
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  (wlp2s0): DHCPv4 state changed bound -> done
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  (wlp2s0): canceled DHCP transaction, DHCP client pid 1293
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  (wlp2s0): DHCPv6 state changed bound -> done
Aug 29 11:41:02 mar.lan avahi-daemon[564]: Withdrawing address record for fde5:8070:f818::904 on wlp2s0.
Aug 29 11:41:02 mar.lan avahi-daemon[564]: Withdrawing address record for fde5:8070:f818:0:2c0:a8ff:fec8:33c3 on wlp2s0.
Aug 29 11:41:02 mar.lan avahi-daemon[564]: Registering new address record for fe80::2c0:a8ff:fec8:33c3 on wlp2s0.*.
Aug 29 11:41:02 mar.lan avahi-daemon[564]: Withdrawing address record for fe80::2c0:a8ff:fec8:33c3 on wlp2s0.
Aug 29 11:41:02 mar.lan kernel: cfg80211: Exceeded CRDA call max attempts. Not calling CRDA
Aug 29 11:41:02 mar.lan avahi-daemon[564]: Withdrawing address record for 192.168.2.161 on wlp2s0.
Aug 29 11:41:02 mar.lan avahi-daemon[564]: Leaving mDNS multicast group on interface wlp2s0.IPv4 with address 192.168.2.161.
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  Writing DNS information to /usr/bin/resolvconf
Aug 29 11:41:02 mar.lan avahi-daemon[564]: Interface wlp2s0.IPv4 no longer relevant for mDNS.
Aug 29 11:41:02 mar.lan NetworkManager[1240]: <info>  Writing DNS information to /usr/bin/resolvconf
Aug 29 11:41:03 mar.lan NetworkManager[1240]: <info>  NetworkManager state is now ASLEEP
Aug 29 11:41:03 mar.lan kernel: IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
Aug 29 11:41:03 mar.lan dbus[327]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Aug 29 11:41:03 mar.lan systemd[1]: Starting Network Manager Script Dispatcher Service...
Aug 29 11:41:03 mar.lan NetworkManager[1240]: <warn>  Failed to GDBus.Error:fi.w1.wpa_supplicant1.NotConnected: This interface is not connected: disconnect.
Aug 29 11:41:03 mar.lan systemd[1]: Reached target Sleep.
Aug 29 11:41:03 mar.lan systemd[1]: Starting Hybrid Suspend+Hibernate...
Aug 29 11:41:03 mar.lan systemd-sleep[1524]: Suspending system...
Aug 29 11:41:03 mar.lan kernel: PM: Hibernation mode set to 'suspend'

Last edited by leniviy (2015-08-29 09:09:56)


Arch 64, xfce4

Offline

#2 2015-08-29 17:19:40

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: don't sleep on low battery

What are the contents of  /etc/systemd/logind.conf ?  Check that the power management functions in there are configured.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2015-08-29 19:19:34

leniviy
Member
Registered: 2009-05-23
Posts: 177

Re: don't sleep on low battery

ewaller wrote:

What are the contents of  /etc/systemd/logind.conf ?  Check that the power management functions in there are configured.

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=poweroff
HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=ignore
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes

But you know, after I explicitly set an action in xfce4-power-manager-settings , it worked. I think maybe this config utility shows wrong defaults.


Arch 64, xfce4

Offline

#4 2015-08-29 19:33:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: don't sleep on low battery

The real problem is that there are too many cooks in the kitchen.   Systemd tries to control this, acpid can be configured to control this, many of the Desktop Environments (Gnome, KDE, Xfce-4, Cinnamon) try to control it to.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB