2b1e The FreeBSD Forums - View Single Post - How to make the laptop sleep when lid is closed
View Single Post
  #20  
Old March 19th, 2012, 20:46
ring_zero ring_zero is offline
Junior Member
 
Join Date: Mar 2011
Location: US
Posts: 67
Thanks: 13
Thanked 21 Times in 11 Posts
Default

Sorry for posting on such an old thread, but every time I google FreeBSD and suspend/resume I wind up here, so I will assume that others do as well. That being said, fire up vim, ee, emacs, whatever else you may use and edit /etc/sysctl.conf as follows:
Code:
hw.acpi.lid_switch_state=s3
hw.acpi.reset_video=1
Save and close. The next part is completely optional, but while video should now be working on resume, most likely the mouse will not be. Restarting the mouse daemon will bring it back, but for a more seamless solution open /boot/device.hints in your favorite editor (I chose to do this with an editor rather than echo so I could keep it with the other hints for psm), and insert:
Code:
hint.psm.0.flags="0x2000"
Save the file. You will get a warning about saving a Read Only File, and as such, the standard disclaimer "DO THIS AT YOUR OWN RISK" applies. Now reboot the machine, close the lid, and wait for the machine to suspend, once it does, open the lid, and hopefully you should be in business. A side note that might help: I tested this on a Toshiba Satellite C665D with an ATI M880G chipset, and an ATI HD4250 video card, version of FreeBSD is 9.0 RELEASE with a generic kernel. I have seen indicators that this solution will work with NVIDIA, as well as ThinkPads and several other platforms.

Quote:
Originally Posted by gnemmi View Post
... when not impossible ... and the worst thing is devels don't seem to care about it at all ...
I think that it has less to do with the FreeBSD devels, and more to do with the fact that the BIOS manufacturers don't implement the ACPI standard to the letter, and seem to think that the world at large only uses various versions of Microsoft products. As such they only test their implementations of ACPI under those products, and the rest of the computing community gets left out.

I hope that this solution can save someone else a few hours, a lot of reboots, and a headache to get this working.

Last edited by DutchDaemon; March 20th, 2012 at 00:48.
Reply With Quote
The Following 2 Users Say Thank You to ring_zero For This Useful Post:
YouriBSD (July 28th, 2012), zennybsd (April 10th, 2012)
 
0