[GH-ISSUE #1118] Barrier quits when MacBook Pro lid is closed #897

Open
opened 2026-05-05 07:15:13 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @chrisrimple on GitHub (Apr 6, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1118

Describe the bug
Barrier (client) quits when MacBook Pro lid is closed

To Reproduce
Configuration:

  • Barrier 2.3.3
  • Mid 2015 MacBook Pro (server), running MacOS Mojave
  • 2019 MacBook Pro (client), running MacOS Big Sur
  • Both configured to Open At Login (via Dock)

Steps to reproduce the behavior:

  1. Reboot 2019 MBP with lid open
  2. Login (Barrier won't start until after Login)
  3. Barrier starts in client mode, MacOS prompts to Allow connection
  4. Close Barrier window (still running)
  5. Close MBP lid

Expected behavior
Barrier quits on 2019 MBP. Expect it to continue running.

Additional context
Since I'm normally running both computers with lids closed and external monitors, this makes Barrier unusable in my configuration. FWIW, ShareMouse doesn't have this issue.

Originally created by @chrisrimple on GitHub (Apr 6, 2021). Original GitHub issue: https://github.com/debauchee/barrier/issues/1118 **Describe the bug** Barrier (client) quits when MacBook Pro lid is closed **To Reproduce** Configuration: - Barrier 2.3.3 - Mid 2015 MacBook Pro (server), running MacOS Mojave - 2019 MacBook Pro (client), running MacOS Big Sur - Both configured to Open At Login (via Dock) Steps to reproduce the behavior: 1. Reboot 2019 MBP with lid open 2. Login (Barrier won't start until after Login) 3. Barrier starts in client mode, MacOS prompts to Allow connection 4. Close Barrier window (still running) 5. Close MBP lid **Expected behavior** Barrier quits on 2019 MBP. Expect it to continue running. **Additional context** Since I'm normally running both computers with lids closed and external monitors, this makes Barrier unusable in my configuration. FWIW, ShareMouse doesn't have this issue.
Author
Owner

@vincent-r-kennedy commented on GitHub (Apr 6, 2021):

I have not tried it with Barrier, but on paper Amphetamin‪e‬ should stop this.
It a (free) app to stop your mac from sleeping - I use it to stop my mac from sleeping when the lid is closed:

https://apps.apple.com/au/app/amphetamine/id937984704?mt=12

<!-- gh-comment-id:813933513 --> @vincent-r-kennedy commented on GitHub (Apr 6, 2021): I have not tried it with Barrier, but on paper Amphetamin‪e‬ should stop this. It a (free) app to stop your mac from sleeping - I use it to stop my mac from sleeping when the lid is closed: https://apps.apple.com/au/app/amphetamine/id937984704?mt=12
Author
Owner

@chrisrimple commented on GitHub (Apr 6, 2021):

I have not tried it with Barrier, but on paper Amphetamin‪e‬ should stop this.
It a (free) app to stop your mac from sleeping - I use it to stop my mac from sleeping when the lid is closed:

The Mac is not sleeping. Apple > System Preferences > Energy Settings (or Battery) > Power Adapter > Prevent Computer From Sleeping Automatically When Display Is Off is checked ON. Barrier seems to dislike the change from 3 screens (1 server, 2 client) to 2 screens (1 server, 1 client).

<!-- gh-comment-id:814175262 --> @chrisrimple commented on GitHub (Apr 6, 2021): > I have not tried it with Barrier, but on paper Amphetamin‪e‬ should stop this. > It a (free) app to stop your mac from sleeping - I use it to stop my mac from sleeping when the lid is closed: The Mac is not sleeping. Apple > System Preferences > Energy Settings (or Battery) > Power Adapter > Prevent Computer From Sleeping Automatically When Display Is Off is checked ON. Barrier seems to dislike the change from 3 screens (1 server, 2 client) to 2 screens (1 server, 1 client).
Author
Owner

@rhaamo commented on GitHub (Apr 13, 2021):

Also having this issue, and it's related to having an external screen, I'm on AC and no sleep enabled.
(Barrier 2.3.3 on big sur as client too)

<!-- gh-comment-id:818451659 --> @rhaamo commented on GitHub (Apr 13, 2021): Also having this issue, and it's related to having an external screen, I'm on AC and no sleep enabled. (Barrier 2.3.3 on big sur as client too)
Author
Owner

@chbdetta commented on GitHub (May 26, 2021):

Having the same issue when the lid is closed or when I connect/disconnect an external screen or when I change the arrangement of screens in the system display setting

<!-- gh-comment-id:848936916 --> @chbdetta commented on GitHub (May 26, 2021): Having the same issue when the lid is closed or when I connect/disconnect an external screen or when I change the arrangement of screens in the system display setting
Author
Owner

@ddh commented on GitHub (Jul 31, 2021):

I was having this issue until I checked: Apple > System Preferences > Energy Settings (or Battery) > Power Adapter > Prevent Computer From Sleeping Automatically When Display Is Off

<!-- gh-comment-id:890410928 --> @ddh commented on GitHub (Jul 31, 2021): I was having this issue until I checked: `Apple > System Preferences > Energy Settings (or Battery) > Power Adapter > Prevent Computer From Sleeping Automatically When Display Is Off`
Author
Owner

@ddh commented on GitHub (Aug 3, 2021):

I ran into this issue again but unchecking and rechecking Apple > System Preferences > Energy Settings (or Battery) > Power Adapter > Prevent Computer From Sleeping Automatically When Display Is Off has been a reliable workaround for me so far 🤞🏼

<!-- gh-comment-id:892045050 --> @ddh commented on GitHub (Aug 3, 2021): I ran into this issue again but _unchecking and rechecking_ `Apple > System Preferences > Energy Settings (or Battery) > Power Adapter > Prevent Computer From Sleeping Automatically When Display Is Off` has been a reliable workaround for me so far 🤞🏼
Author
Owner

@alexmill commented on GitHub (Oct 10, 2022):

I have not tried it with Barrier, but on paper Amphetamin‪e‬ should stop this. It a (free) app to stop your mac from sleeping - I use it to stop my mac from sleeping when the lid is closed:

https://apps.apple.com/au/app/amphetamine/id937984704?mt=12

I have fixed this for myself using Amphetamine. There is an option to UNCHECK "Allow sleep when display is closed". Unchecking that option allows me to close the lid while barrier is running. I can continue to control the client (closed clamshell Macbook on external monitor) from server's mouse/keyboard.

<!-- gh-comment-id:1273629856 --> @alexmill commented on GitHub (Oct 10, 2022): > I have not tried it with Barrier, but on paper Amphetamin‪e‬ should stop this. It a (free) app to stop your mac from sleeping - I use it to stop my mac from sleeping when the lid is closed: > > https://apps.apple.com/au/app/amphetamine/id937984704?mt=12 I have fixed this for myself using Amphetamine. There is an option to UNCHECK "Allow sleep when display is closed". Unchecking that option allows me to close the lid while barrier is running. I can continue to control the client (closed clamshell Macbook on external monitor) from server's mouse/keyboard.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#897
No description provided.