At first, this blog post has nothing to do with Oracle databases. And not even with databases. Still, I’d like to post it here as I couldn’t find any useful solution anywhere – except a program which is not available to end-users. Hence, this is fully Off Topic: How to outsmart KEF EGG’s auto power off mode.
Let me say at first that I’m not doing any advertising for any company here. I recently bough a pair of KEF EGG speakers for my office desk. Especially when crafting slides I like to listen to music. And as some of you know, I like to listen music in a decent quality.
When I received the KEF EGG speakers a few weeks ago I was very happy with their sound. They are much better than any desktop size speakers I’ve listened to so far. They are not cheap – but as the model is not in current production line of KEF, I got them for a reasonable price from a German Hifi store (yes, a “real” store who’s paying taxes in Germany).
Auto Power Off Mode
When I presented to a customer a few days after setting the speakers up, I’ve had kind of a surprise. While showing my slides and talking via Zoom, there was a message during the session. Something like “Sound Output happens now via the Thunderbolt Dock“. I ignored it. But later I realized that the loudspeakers had simply turned off themselves.
As my docking station has no loudspeakers, I’ve had no sound. In fact I didn’t hear any of the questions the customer had. When I was done with my presentation part, I did ask for questions – and THEN I realized that my loudspeakers were off.
Later this day I found out that this pattern is normal. The speakers shut off after receiving no signal for 10 minutes. And in this case, when I present in zoom, there is no signal which would prevent them from turning off themselves.
At first, I checked the documentation. But no indication that there’s a mode to change the behavior of the speakers. But I found many reports criticizing this auto power off mode. From reviews on shopping platforms but also from discussions in several tech and hifi forums I learned that a lot others suffer from the same problem.
And I learned that there is a tool available which allows to change the setup of the speakers. But at the same time, KEF is not distributing this tool via a download as the 10-minute power off seems to be needed to satisfy some strange EU power consumption guideline.
As I couldn’t find the tool anywhere, I opened a support case via the KEF page. When I received a reply a day after, I was very surprised by the response speed. Plus the fact, that it wasn’t a standard answer but a reply by a human who understood my problem – and wrote back in German.
So let me emphasize this here: KEF in Germany has a real support – and replies very quickly. Only the result was disappointing. After some friendly emails back and forth, it was clear that I wouldn’t be able to download the tool (which exists). And the option I offered – remote connect via TeamViewer or Zoom – wasn’t acceptable for the support. The only choice would have been to send the brand new speakers to service in Essen on my own expenses. And of course, cover the return postage as well.
Workaround – Make Some Noise
Then this Sunday morning, I’ve had an idea. What if I send a signal to the speakers every 9 minutes to prevent them from powering off?
And actually, now I know that
cron is not recommended on Mac OS for quite a while. But this is the solution I tried – and it seems to work very well. The reason why I put it up on the blog here: I spent some time to find a solution with no success. And I didn’t want to send my speakers somewhere where – even though I fully understand company policies – I could do the same within minutes by myself at home.
Please don’t laugh about my amateur style scripting – I’m not a pro in this area, and I bet others can do this much smarter than I.
This webpage was a great help:
First task was creating a job which gets executed automatically every 9 minutes when I’m logged on.
When you place a
plist file in this folder
~/Library/LaunchAgents, then the job gets only executed when users are logged on – and the job will run under your username.
/Users/mdietric/Library/LaunchAgents I created the following
com.mike.playsound.plist. This file describes the job:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.mike.playsound</string> <key>ProgramArguments</key> <array> <string>/Users/mdietric/Scripts/playsound.sh</string> </array> <key>Nice</key> <integer>1</integer> <key>StartInterval</key> <integer>540</integer> <key>RunAtLoad</key> <true/> <key>StandardErrorPath</key> <string>/tmp/playsound.err</string> <key>StandardOutPath</key> <string>/tmp/playsound.out</string> </dict> </plist>
You need to adjust the parts in the paths to match your system’s. And you need to create a shell script somewhere on your local system. I named it
playsound.sh here. As execution time I chose 540 seconds, every 9 minutes.
In my case I create this very very simple shell script in my private
#!/bin/sh # /usr/bin/afplay /System/Library/Sounds/Submarine.aiff -v 1 -t 1 /usr/bin/afplay -v 0.25 -t 0.5 /Users/mdietric/PRIV/Scripts/Gray_noise.mp3
The line I commented out above is an example you can try out by yourself. But I found the submarine sound too disturbing. And other, shorter sound examples which are on your Mac by default aren’t working unless you play them really loud.
-v option of
afplay defines the volume. I experimented a bit – and
0.25 for my example is still enough to trigger the speakers, but not disturbing. The
-t option stands for time – and half a second seems to be fine with my noise example.
As I didn’t like the system sounds so much – or some of them simply didn’t prevent the speakers from turning off, I downloaded an Gray Noise example from here:
afplay does not play Ogg Vorbis files, I needed to convert it to a simple MP3. I used MediaHuman Audio Converter for this job. Personally I found the gray noise example the least disturbing, even when I listen to music.
React to the actual volume
Days later I came to the conclusion that I would like to adjust the volume in dependency of the current volume of the KEF speakers. The benefit is that – if you have the speakers turned quite loud – you don’t get an alarmingly loud “gray noise” signal. The downside of this approach is that if you listen to music actually, the volume turns down for a second. So decide what works better for you.
This is the script I used:
#!/bin/sh # Get current volume as a number from 0 to 100 current_vol=$(osascript -e 'output volume of (get volume settings)') # You may need to experiment with the output volume level osascript -e "set volume output volume 10" /usr/bin/afplay -v 0.3 -t 0.1 /Users/mdietric/PRIV/Scripts/Gray_noise.mp3 # (Re-)set to saved volume as a number from 0 to 100 osascript -e "set volume output volume $current_vol"
In any case, don’t forget to add execute rights to the script:
chmod u+x playsound.sh
As the final step, I
launchctl load com.mike.playsound.plist
That’s it. If you use different sound files, you may need to experiment with volume and duration by yourself a little bit.
I hope this helps in case you were searching for a solution for how to prevent your KEF EGG speakers from turning themselves off when you don’t play a signal to them for 10 minutes.
Of course, you can realize the same on Windows with the
at service and a
cmd or Powershell script.