3

I have Polk Hampden speakers on my System76 desktop here. The sound is great, but if no sound plays for ~15 minutes, it goes into a power saving mode where no sound plays until there is about 8 seconds of audio again. So notifications, incoming calls etc. are all muted whether I want them to or not.

One guy on the polkaudio forums created a script on Windows that plays a 20Hz tone for 10 seconds every 15 minutes that seems to fix the problem.

So I created a 20 Hz .mp3 that lasts for 15 seconds (20Hz.mp3), I installed mpg123 and verified that this command works:

mpg123 ~/20Hz.mp3

What's the best way to execute this command in the background every 15 minutes?

Pablo Bianchi
  • 17,371
ebeyer
  • 31
  • 3

1 Answers1

6

If you can't reduce somehow those 8 seconds, you can generate a sound and play it periodically using user cron. There is no need of an external file.

  1. Install sox, Sound eXchange, the Swiss Army knife of audio manipulation:

    sudo apt install sox
    
  2. Edit your user cron table, process scheduling daemon:

    crontab -e
    
  3. Add this to play a 10 second 20 Hz (hence, barely hearable) tone every 15'.

    */15 * * * *   XDG_RUNTIME_DIR=/run/user/1000 /usr/bin/play -n synth 10 sin 20
    

    Where 1000 is your user ID, the output of id -u or $UID environment variable.

Pablo Bianchi
  • 17,371