/bin/sleep 3 in /etc/rc.suspend prevents ThinkPad W520 from suspending on lid close

Hi everyone,

I've recently installed version 14.1 on my ThinkPad W520 and noticed an odd issue with the suspend function when closing the lid. Specifically, the laptop doesn't enter suspend mode when the lid is closed, but it immediately suspends once the lid is opened.

After a quick investigation, I found that the culprit seems to be the
Code:
/bin/sleep 3
command in
Code:
/etc/rc.suspend
. When I comment it out, everything works as expected.

From what I understand, the purpose of the sleep command is to allow time for disk operations to complete. My question is: how can I go about debugging this issue? I'm eager to dig deeper and figure out the root cause of the problem with the sleep operation. I've checked
Code:
dmesg
and
Code:
/var/log/messages
, but I haven't found anything specific.

Any advice would be appreciated.

Thanks in advance!
 
Welcome to The FreeBSD Forums.

… doesn't enter suspend mode when the lid is closed, …

Code:
% sysctl hw.acpi.lid_switch_state
hw.acpi.lid_switch_state: NONE
% sysctl -d hw.acpi.lid_switch_state
hw.acpi.lid_switch_state: Lid ACPI sleep state. Set to S3 if you want to suspend your laptop when close the Lid.
%

man -P cat 5 sysctl.conf
 
Thank you for the warm welcome and response!

The hw.acpi.lid_switch_state is set to S3. As I mentioned, suspending works, but it seems that /bin/sleep 3 somehow interferes with the suspend process when the lid close event is triggered.

I am wondering if it's worth filing a bug in the tracker?
 
Back
Top