How to stop laptop from sleeping when lid is closed

I have an old laptop that I'd like use as a web server; however, it likes to sleep/hibernate when the lid is closed. Can I edit /etc/sysctl.conf so the laptop will stay awake 24/7?
 
I believe you need to change devd.conf so that it doesn't respond to whatever ACPI message is generated.

You can override the defaults in devd.conf by creating a file of your own in /etc/devd/ or /usr/local/etc/devd/.
 
The only line I found in devd.conf is below:

Code:
# Lid:          Lid state (0 is closed, 1 is open)

However, I don't see anywhere I can edit to modify the lid state. Perhaps that is referring to something in the kernel?
 
Might still be able to do it with devd which would be the proper way. But on the acpi() man page it says you can put something like this in loader.conf:

Code:
debug.acpi.disabled="lid"
 
Freebsd without X normally doesn't turn off when closing the lid. Maybe its your bios. I'll check this myself by turning off X and closing the lid for an hour.

Maybe 9.1 isn't the same. I'll check back here in an hour and post the result.
____________________________________________________________________
OK done
I didn't have a problem using the computer after closing the lid for an hour and then opening the lid.

PS: While your booting if you notice your waiting to resolve a network hit "clrl c" key-binding to continue. This OS doesn't like reading the /etc/rc.conf for a long period. This happens if your not resolving right and messes things up.
 
Perhaps have a look around the bios of your laptop.

None of my laptops sleep when I close the lid by default. I would need to set that up, which leads me to believe that either it is in some sort of different driver you are using or it is controlled by the hardware / bios.

I did have a Windows 95 laptop a few years back where the suspend was completely handled by the hardware rather than the OS. I.e I could get it to suspend half-way through booting Windows lol.
 
Back
Top