Popping/clicking sound when using "Balanced"/"Power saving" profile

Hi, I use a desktop PC that has audio click/popping when I use balanced or power saving profile. It was due to power saving feature for audio. Prior to plasma 6, I simply used the following to disable it:

options snd_hda_intel power_save=0

in /etc/modprobe.d/snd_hda_intel.conf

However, using “balanced” power mode seems to disregard this and still turn on power saving for audio it seems. This can be confirmed by inspecting the content of /sys/module/snd_hda_intel/parameters/power_save which is always 10 in powersave/balanced mode.

Is there a method to configure powerdevil (?) or the underlying power manager to not bother with audio power saving?

Maybe we could add something to ~/.config/powermanagementprofilesrc ? But I can’t find a list of groups/keys/parameters anywhere

1 Like

Are you using tuned-ppd, or power-profiles-daemon? p-p-d won’t do this, but tuned(-ppd) can and might… but it doesn’t by default.

seems like i have tuned-ppd installed:

~ ❯ rpm -qa | egrep 'tuned|power-profiles'
tuned-2.24.1-1.fc41.noarch
tuned-ppd-2.24.1-1.fc41.noarch

it doesn’t by default

i do not remember configuring anything related to it. I use Fedora 41 KDE, maybe fedora configured it by default?

Content of ~/.config/powermanagementprofilesrc:

[Migration]
MigratedProfilesToPlasma6=powerdevilrc

I was able to disable it by doing the following:

  • Copy /usr/lib/tuned/profiles/balanced and /usr/lib/tuned/profiles/powersave to /etc/tuned/profiles
  • Edit tuned.conf in each directory /etc/tuned/profiles/{balanced,powersave} and commented out [audio] block:
...

# Commented to remove popping sound
#[audio]
#timeout=10
...

Now it doesnt interfere with audio anymore:

~ ❯ cat /etc/tuned/active_profile
balanced
~ ❯ sudo cat /sys/module/snd_hda_intel/parameters/power_save
0
~ ❯ cat /etc/tuned/active_profile                           
powersave
~ ❯ sudo cat /sys/module/snd_hda_intel/parameters/power_save
0

Note: I suppose we can easily comment out the part in the /usr/lib/../tuned.conf directly without copying, but I suppose we should try to avoid editing files maintained by package manager? Am I doing this in the right way or am I mistaken? New linux user here :smiley:

Sorry, I was wrong, I looked right at my configs and didn’t see it somehow :confused: But I was on the right track, yeh this is tuned. I’m seeing the same thing here. Annoying.

Did some digging and confirmed it’s definitely tuned, found it’s in the default powersave and balanced profiles, but not in the default performance profile.

/usr/lib/tuned/profiles/powersave/tuned.conf

[audio]
timeout=10

This is documented here: Chapter 1. Getting started with TuneD | Red Hat Product Documentation and here: tuned/doc/manual/modules/performance/ref_tuned-profiles-distributed-with-rhel.adoc at master · redhat-performance/tuned · GitHub

NGL, I don’t think this is a good default. It’s well known to break stuff. Still, if you want to change it, you’ll need to create a copy of your profile and then configure tuned-ppd to use it, eg if you called your new profile powersave_no_audio_pm then you could change /etc/tuned/ppd.conf like:

[profiles]
# PPD = TuneD
power-saver=powersave_no_audio_pm
balanced=balanced
performance=throughput-performance

It’s all pretty well documented but since I’m gonna fix this, you can copypaste * what I’m doing:

sudo mkdir -p /etc/tuned/profiles/balanced_no_audio_pm; 
echo "[main] 
include=balanced
[audio]
timeout=
" | sudo tee /etc/tuned/profiles/balanced_no_audio_pm/tuned.conf;
sudo mkdir -p /etc/tuned/profiles/powersave_no_audio_pm; 
echo "[main] 
include=powersave
[audio]
timeout=
" | sudo tee /etc/tuned/profiles/powersave_no_audio_pm/tuned.conf;
sudo sed -i -e's/^power-saver=powersave$/power-saver=powersave_no_audio_pm/' -e 's/^balanced=balanced$/balanced=balanced_no_audio_pm/' /etc/tuned/ppd.conf

* please don’t literally just copypaste this. At least, check that the files names are the same on fedora first. You’re copypasting superuser access commands from a stranger, so yaknow, don’t trust me, check me! :slight_smile:

That’s all one big long command, btw. Copy the whole thing and paste it together.

But that works here :tada: What this does, is create two new power profiles, which include everything from the equivalent stock profiles, but remove the audio plugin timeout from them. Then, it sets tuned-ppd to use those instead of the stock ones. This way it will work in your GUI and stuff, too.

Hope that helps!

1 Like

You replied while I was typing that up for you :smiley: You’re close, but not quite. To explain, generally on linux, the files in /usr are specific to your distro, and part of packages, so when the packages update, they can and often will replace files in /usr. /etc is for configuration files specific to the machine, so when you update your packages, the ones in /etc should not be touched.

There’s also some special handling for tuned config files, which I’ve used above. I’ll let you read the docs I linked about all that, you seem on top of things :slight_smile: