Hello
I'm a recently returned Slackware user, after many years with other distros (the last slackware I installed would have been about 8.0) and I'm very much enjoying Salix, it's exactly what I want in an OS.
However, I need to ask for help with a configuration issue, as I can't remember where such things are set.
I have a new laptop, a Toshiba L12C-104, which is a very nice little machine, but with a badly broken UEFI.
Anyway, the issue I'm having is that the laptop randomly wakes from sleep, my best guess is that this is being caused by the wifi/network card, or possibly USB.
So, how do I disable wakeups from these devices? I've got as far as finding /usr/lib/pm-utils/power.d but where are these scripts called from and how do I set them?
Additionally, I'd like to configure the laptop to go back to sleep after a short period if it ever does wake up, it's a passivly cooled machine, so this isn't quite as critical as it would be with spinny fans, but it still gets pretty warm if it wakes while in a case. I've set this in XFCE, but that only works while I'm logged in, can I set this in gdm or xscreensaver?
In short:
1. How can I disable wake on LAN and wake on USB?
2. How do I configure gdm or xscreensaver to suspend the laptop after 15 minutes of inactivity, or shut it down if there is no user logged in?
Thanks
Sleep, unwanted wakeups and ACPI
Re: Sleep, unwanted wakeups and ACPI
Think I've fixed the wakeup issue, added the following to /etc/rc.d/rc.local
this leaves only the lid switch enabled for wakeup.
Code: Select all
for device in XHC1 GLAN ; do
grep $device /proc/acpi/wakeup | grep enabled > /dev/null && {
echo Disabling wakeup on $device
echo $device > /proc/acpi/wakeup
}
done
Re: Sleep, unwanted wakeups and ACPI
If a user is logged in, xscreensaver can be configured to do that. Just go to the Advanced tab and you'll find the option under Power Management.steve_g wrote:2. How do I configure gdm or xscreensaver to suspend the laptop after 15 minutes of inactivity, or shut it down if there is no user logged in?
But xscreensaver is not running if no user is logged in and I don't think there are any options for gdm to do that. However, I'm guessing that you could write a script that waits for 15 minutes and then checks the output of the "w" or "who" commands for users that are logged in and if not then shutdown. You could run that script from inside a /etc/gdm/Init/custom script (you'll need to create that and make it executable). Better add with a line looking like this:
Code: Select all
/path/to/script &
Re: Sleep, unwanted wakeups and ACPI
A related issue: my laptop switches off (or hibernates or something) when you close it. But I would like to do that sometimes and plug it into my desktop monitor and keyboard. As it is, I have to leave it open in front of the monitor, which makes this much less practical.
Opening it does the reverse, i.e. it turns it on. I don't mind whether this behaviour still works or not, if I can disable the feature that powers it down on closing the laptop.
Can anyone point me in the right direction?
Opening it does the reverse, i.e. it turns it on. I don't mind whether this behaviour still works or not, if I can disable the feature that powers it down on closing the laptop.
Can anyone point me in the right direction?
Re: Sleep, unwanted wakeups and ACPI
Try this:mimosa wrote:Can anyone point me in the right direction?
edit /etc/Upower/Upower.conf and change the line:
IgnoreLid=false
to
IgnoreLid=true
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
― George Orwell, 1984
Re: Sleep, unwanted wakeups and ACPI
laprjns, thank you very much, that does seem to have done the trick.