Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3424

System and Network configuration • HandleLidSwitch=ignore configuration does not work very well in a MacBook Pro 2012

$
0
0
Hello Friends

In a LAN exist 2 laptops HP and Toshiba having installed Ubuntu Desktop 24.04. Because they are accessed only by me through Remmina was applied the following configuration to avoid use unnecessarily the screen of each laptop:
  1. Open the /etc/systemd/logind.conf file
  2. Edit from #HandleLidSwitch=suspend to HandleLidSwitch=ignore
  3. Execute the sudo systemctl restart systemd-logind command
Thus for each laptop when the laptop’s lid is closed happens 2 things:
  • The screen goes black
  • The laptop is still working in peace
Remember each laptop is accessed through Remmina.

Observation: if the laptop’s lid is opened - at least with an angle more of 05 degree - the screen shows what is being executed. In other words the screen is not black any longer. Furthermore if the laptop’s lid is opened with less of 5 degree angle the screen remains in black.

In a MacBook Pro 2012 was installed directly in its new SSD Debian 12 Desktop. Now, applying by complete all the same procedures indicated above: when the laptop’s lid is closed the screen remains working - it is not turned black - I’ve confirmed this by opening the laptop’s lid with a small degree angle.

How to fix this?

Just in case when the laptop’s lid is closed by complete the “apple” light is turned on in white

Furthermore when I need to sleep in the LAN for the 2 mentioned laptops HP and Toshiba through the Terminal for each one is executed the following command:

Code:

sleep 60 && systemctl suspend
As expected the screen goes black and the suspend mode starts. To resume is pressed the “PowerOn” button of the laptop itself and if my memory does not fail can be pressed either the Esc or Intro keys. For any case the login screen again appears and is possible be working.

Now, in the same MacBook Pro 2012 when the same command is executed the screen goes black as expected but in less of 5 seconds always and automatically appears the login screen. How to fix this?

Note the sleep 60 command is only used to let a Remmina client time to close the remote connection

Just in case I did do in Debian the same as was done in Ubuntu for the two laptops
Settings -> Power -> Screen Blank -> To "Never"
Settings -> Privacy & Security -> Screen Lock -> Blank Screen Delay -> To "Never"
Therefore for HP and Toshiba:
  • Meanwhile the lid is closed the laptop is still working thanks to HandleLidSwitch=ignore. Important to note: as a secondary consequence the monitor of the laptop is black, it was not configured but is useful
  • Never happens the “suspend” action due of any time of inactivity
So again, through Remmina is possible work with each latop

Finally when I need go to sleep the sleep 60 && systemctl suspend command is executed for each laptop and thus they go to “sleep” until I open the lid. So appears the login and once logged, the lid is again closed and is possible work with these laptops within the LAN

For both laptops all work fine but in the MacBook Pro does not work as the other laptops

What to do?

Thank You

Statistics: Posted by manueljordan — 2025-02-05 16:09 — Replies 0 — Views 34



Viewing all articles
Browse latest Browse all 3424

Trending Articles