rlxone / MultiSoundChanger

🎧 🔈 A small tool for changing sound volume even for aggregate devices cause native sound volume controller can't change volume of aggregate devices
Apache License 2.0
194 stars 24 forks source link

Volume keys stop working after sleep #27

Open AndrewHaglund opened 1 year ago

AndrewHaglund commented 1 year ago

After I put my Mac to sleep with hot corners (Monterrey macOS 12) the volume keys on my keyboard no longer adjust the volume.

If I quit and reopen, volume keys work as expected

This issue is not present in Ventura (macOS 13)

(Also, just wanted to say that I love this app! I just got a second display with built-in speakers and now I can play music from both displays and it sounds so good.)

AndrewHaglund commented 1 year ago

I don't know how to actually fix this issue so I created a Shortcut that quits and reopens the app with keyboard shortcut globe+F10 (fn+mute). Might be useful for others so I've attached it. Restart MultiSound.shortcut.zip

I tried using Shortery to run this shortcut on sleep/wake but had issues getting that to work on Monterrey.

AndrewHaglund commented 1 year ago

Issue still present on the macOS Sonoma beta.

AndrewHaglund commented 12 months ago

This article via Michael Tsai might be useful for resolving this issue, unless the app is already using these techniques.

davejay536 commented 11 months ago

For what it's worth, I'm having this issue also on an M2 system running Ventura.

bariatricpal commented 9 months ago

I'm running Sonoma 14.1 and it's crashing non stop now :-(

rayryeng commented 9 months ago

@AndrewHaglund Thanks for the shortcut. However, we can't use the file because the settings are set up so that you can only use that shortcut by Private Sharing, meaning that I can't use it unless you're in my contacts. Is there a way around this, or can you perhaps write up a small guide on how to make this shortcut? Thanks!

AndrewHaglund commented 8 months ago

hey @rayryeng sorry about that, attached a screenshot of the shortcut with the steps. I can‘t remember why I added the "Receive Any input from Quick Actions" step but here's the basic steps:

  1. Quit App MultiSoundChanger
  2. Wait 1 second
  3. Open MultiSoundChanger
image
AndrewHaglund commented 8 months ago

The Shortcuts solution I mentioned above is not ideal (you have to notice it crashed then use a keyboard shortcut). I figured there had to be a way to automate this. I stumbled on a post by John Gruber where he uses LaunchControl to keep an app running at all times. While LaunchControl looks cool I found a StackExchange post showing how to do this manually.

I haven‘t pressure-tested this but you should be able to download, unzip, then place MultiSoundChanger.keepalive.plist.zip in ~/Library/LaunchAgents then enable the "MultiSoundChanger" item in System Settings → General → Login Items.

(The post mentioned running launchctl load ~/Library/LaunchAgents/MultiSoundChanger.keepalive.plist in Terminal but I‘m not sure it‘s necessary.)