odlp / bluesnooze

Sleeping Mac = Bluetooth off
MIT License
2.04k stars 57 forks source link

No longer re-activates Bluetooth on wake #18

Closed gingerbeardman closed 1 year ago

gingerbeardman commented 1 year ago

In MacOS 12 (Monterey), this does not work as expected.

Specs

I believe Apple have made significant changes to IOBluetooth recently, and now support on Apple silicon and Intel vary.

quocnm102 commented 1 year ago

in macos 13.2 ventura, macbook pro 2017 13inch non-touch chipset intel, using dongle external bluetooth usb, after wake up macbook, macos doesn't re-enable bluetooth too. I re-enable manual but it still no affect.

YubinXie commented 1 year ago

Same issue. M2 chip, OS 13.1

odlp commented 1 year ago

Thanks for raising the issue, I'll take a look. I can't seem to replicate on MacOS 13.2 with a M1 chip at this time.

Please could someone confirm that the Bluetooth isn't being re-enabled after unlocking their Mac, with either password / touch ID?

cheshi-mantu commented 1 year ago

@odlp hi Oli, M1, MB pro 16: Ventura 13.2.1

initial state: Wifi ON BT ON settings: wifi turn off, BT turn off wifi restore initial state, BT restore initial state actual result: WIFI is OFF after wake up, BT is OFF after wake up

initial state: Wifi ON BT ON settings: wifi turn off, BT turn off wifi always enable, BT always enable actual result: WIFI is ON after wake up, BT is ON after wake up

initial state: Wifi ON BT ON settings: wifi do nothing, BT turn off wifi do nothing, BT restore the previous state actual result: WIFI is ON after wake up, BT is OFF after wake up

it looks like the restoration of the initial state on both – BT and WIFI does not work as expected well, at least in my case.

odlp commented 1 year ago

@cheshi-mantu weird - this tool doesn't do anything to wifi.

Are you you're using an official release from Homebrew or downloaded from this repo? (There are forks of Bluesnooze which add support for turning wifi off/on - like this one https://github.com/stefansundin/bluesnooze - but that's nothing to do with me)

cheshi-mantu commented 1 year ago

ah, my bad, you're right – wrong repo. but it seems there is the same issue with the reactivation of the connection. I recently switched to https://github.com/stefansundin/bluesnooze, but before the switch I experienced the same issue with the original tool I installed via brew

gingerbeardman commented 1 year ago

Interestingly blueutil, which uses the same private IOBluetoothPreferenceSetControllerPowerState API can still turn bluetooth off and on.

So maybe there's an issue with the way this bluesnooze calls it, or a race condition on waking?

YubinXie commented 1 year ago

My issue with bluetooth is that my mouse keeps waking my Mac mini without I touching it. I just found out that it is all because of Logitech option software. I updated to option+ and deleted option. Now I no longer need these tools to keep bluetooth off. JFI.

gingerbeardman commented 1 year ago

For me, I use this tool because my Bluetooth headphones wake my sleeping Mac when I only mean to use them on my iPhone.

odlp commented 1 year ago

Hi folks, I got a newer work laptop and was able to replicate this issue. I've rebuilt the app with a newer version on XCode and this appears to have fixed the problem.

Please give the new release a try - available on Homebrew or for download here

gingerbeardman commented 1 year ago

I just woke my computer up and bluetooth was still switched off.

macOS 12.6.8 Bluesnooze 1.2

mminklet commented 1 year ago

I am getting this issue, and I have been using the official app. I have upgraded Xcode. Started to happen after upgrading to Ventura 13.4.1 from 12.