View Full Version : How to make the laptop sleep when lid is closed
everypot
September 10th, 2009, 22:46
and wake up when lip is open...
DutchDaemon
September 10th, 2009, 22:53
Talk about opening a can of worms ..
everypot
September 10th, 2009, 23:31
Talk about opening a can of worms ..
then I'd better give up...
DutchDaemon
September 10th, 2009, 23:41
It will be different varying with laptop make and model, ACPI implementation, BIOS, chipset, 32/64-bit, motherboard type, FreeBSD version, sysctl settings, supported 'S states', 'shallow suspend' vs 'deep suspend' --- it's not even funny ... Google for FreeBSD plus hibernation / suspend / resume, and you will get the drill ..
Then again, maybe someone will enjoy the subject ;)
aragon
September 11th, 2009, 01:48
Also look at devd
There are two distinct components to this: getting suspend/resume working (sometimes not possible), making devd do it for you.
lme@
September 11th, 2009, 10:48
Actually you don't need devd for this.
Just set sysctl hw.acpi.lid_switch_state=S3 if you know that ACPI state S3 (Suspend) works for you.
DutchDaemon
September 11th, 2009, 18:37
Getting the laptop to sleep on closing the lid is the easy part (though I've chosen to just shut down the screen, and revive the screen when the lid opens), it's the coming back out of sleep/hibernation that's causing the most problems. Suspending is usually fine, resuming is ... quite unpredictable.
LateNiteTV
September 11th, 2009, 20:13
is there a difference with what will happen if you do the sleep/hibernation while in the console or in x?
everypot
September 12th, 2009, 18:26
Actually you don't need devd for this.
Just set sysctl hw.acpi.lid_switch_state=S3 if you know that ACPI state S3 (Suspend) works for you.
# sysctl -a | grep hw.acpi
hw.acpi.supported_sleep_state: S3 S4 S5
hw.acpi.power_button_state: S5
hw.acpi.sleep_button_state: S3
hw.acpi.lid_switch_state: S3
hw.acpi.standby_state: NONE
hw.acpi.suspend_state: S3
hw.acpi.sleep_delay: 1
hw.acpi.s4bios: 0
hw.acpi.verbose: 0
hw.acpi.disable_on_reboot: 0
hw.acpi.handle_reboot: 0
hw.acpi.reset_video: 0
hw.acpi.video.crt0.active: 0
hw.acpi.video.tv0.active: 0
hw.acpi.video.ext0.active: 0
hw.acpi.video.lcd0.active: 1
hw.acpi.video.lcd0.brightness: 100
hw.acpi.video.lcd0.fullpower: 100
hw.acpi.video.lcd0.economy: 80
hw.acpi.video.lcd0.levels: 100 80 0 10 20 30 40 50 60 70 80 90 100
hw.acpi.video.out0.active: 0
hw.acpi.video.out1.active: 0
hw.acpi.thermal.min_runtime: 0
hw.acpi.thermal.polling_rate: 10
hw.acpi.thermal.user_override: 0
hw.acpi.thermal.tz0.temperature: 57.0C
hw.acpi.thermal.tz0.active: -1
hw.acpi.thermal.tz0.passive_cooling: 0
hw.acpi.thermal.tz0.thermal_flags: 0
hw.acpi.thermal.tz0._PSV: -1
hw.acpi.thermal.tz0._HOT: -1
hw.acpi.thermal.tz0._CRT: 102.0C
hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
hw.acpi.thermal.tz0._TC1: -1
hw.acpi.thermal.tz0._TC2: -1
hw.acpi.thermal.tz0._TSP: 300
hw.acpi.battery.life: 100
hw.acpi.battery.time: -1
hw.acpi.battery.state: 0
hw.acpi.battery.units: 1
hw.acpi.battery.info_expire: 5
hw.acpi.acline: 1
hw.acpi.cpu.cx_lowest: C2
echo "hw.acpi.lid_switch_state=S3" >> /etc/sysctl.conf
reboot
Then once the lip is closed and reopened, it's difficult to resume...
gnemmi
September 16th, 2009, 16:09
... when not impossible ... and the worst thing is devels don't seem to care about it at all ...
Carpetsmoker
September 17th, 2009, 07:08
... when not impossible ... and the worst thing is devels don't seem to care about it at all ...
So what are you going to do? sue them? :OO
The developers have no obligation to you ...
everypot
September 17th, 2009, 21:09
... when not impossible ... and the worst thing is devels don't seem to care about it at all ...
most of them use macbook... :P:P
gnemmi
September 17th, 2009, 22:12
So what are you going to do? sue them? :OO
No ... I just gonna cancel my FreeBSD subscription, stop testing new stuff and advocating for FreeBSD use ... and I think that´s about that ...
The developers have no obligation to you ...
That´s a claim I never made. Just a blatant attempt to put your words in my mouth.
DutchDaemon
September 17th, 2009, 22:21
Enough guys, this doesn't help.
gnemmi
September 18th, 2009, 04:16
roger that
aragon
September 19th, 2009, 01:23
One has to remember that a project like FreeBSD is made up of software components that various people care enough about to write. Every developer cares about a small set of features which he/she maintains, and the collective of that is what makes the operating system. It's unfortunate that there aren't any or enough people that care enough about suspend/resume to make it work perfectly, but blaming "the developers" in general is a bit unfair. Every developer can't be expected to care about everything. That feature will work excellently when someone comes along who cares enough about it to write the code, and if that's you, shut up and hack! :)
Carpetsmoker
September 19th, 2009, 02:03
I'm sorry about my message, looking back it was a unnecessarily rude and harsh and didn't convey the message (aragon did a better job at that).
gnemmi
September 19th, 2009, 06:27
Sorry for my message too .. it's just that I've been following FreeBSD 8 since -CURRENT and I just need a fix on bge .. and I see -BETAS pass by and nobody caring about it and it really makes me think .. what's the point of chasing down bugs that no one pays attention too?
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/136876
I'm not a devel, otherwise: yes, I would shut up and hack as I beleive I should, but I just can't ..
Sorry if I offended anyone, really.
My apologies and best regards for you all.
Gonzalo Raúl Nemmi
everypot
September 19th, 2009, 18:03
Now it's RC1. Happy updating.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.