debauchee / barrier

Open-source KVM software
Other
27.21k stars 1.5k forks source link

Barrier quits when MacBook Pro lid is closed #1118

Open chrisrimple opened 3 years ago

chrisrimple commented 3 years ago

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

To Reproduce Configuration:

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.

vincent-r-kennedy commented 3 years ago

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

chrisrimple commented 3 years ago

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).

rhaamo commented 3 years ago

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)

chbdetta commented 3 years ago

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

ddh commented 3 years ago

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

ddh commented 3 years ago

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 🤞🏼

alexmill commented 1 year ago

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.