Worse performance when power supply plugged in!

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Worse performance when power supply plugged in!

Post by Musicteacher »

Hi,
I have made a very strange observation: My system performance is terrible, when my power supply is plugged in!

If I put it out again, everything is fine. If not, I get abysmal sound, thousands of xruns, and a warning "cpu overload".

I have a thinkpad l380 yoga. Any hints are very welcome!

This is a serious problem for me, for longer concerts I really need the power supply! I am completely baffled, shouldn't the performance be BETTER when the power supply is in?

Regards,
Andreas
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: Worse performance when power supply plugged in!

Post by Musicteacher »

I found out something more: The performance is worst, when I set the cpu governor to performance + power supply plugged in.

If I don't do that, performance is medium, but nowhere near as good as when in battery-mode with performance set to "performance".

Is that a hardware - bug? Anyone heard of something like this?

Any help is appreciated!

Andreas
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: Worse performance when power supply plugged in!

Post by lilith »

Can you test it with e.g. a live AVLinux? Never heard of such an issue, but I guess there's a solution for it.
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: Worse performance when power supply plugged in!

Post by Musicteacher »

That's a really good idea! This way I can rule out misconfiguration on my side. I'll do that tomorrow!

Thanks,
Andreas
zoco
Established Member
Posts: 177
Joined: Fri Jan 25, 2019 4:04 pm

Re: Worse performance when power supply plugged in!

Post by zoco »

It is possible that your power supply output is not smoothed out properly or is no longer smoothed out, causing a disruptive signal. You could try a different power supply to test this.
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: Worse performance when power supply plugged in!

Post by Musicteacher »

Thank you, too. My wife has a suitable power supply, I will try that tomorrow.

In the meantime I have de-activated intel speed-step in bios, now the worst drop-outs are gone.

But this cuts down performance quite drastically (top-speed is 1.6 gHz then, instead of 3.4 maximum speed with speed-step turned on).

I think that it might be the case that with power supply in, the cpu is pushed harder and then drops down lower when it's too hot (just a theory).
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: Worse performance when power supply plugged in!

Post by Musicteacher »

Hi,
I am at my wits end: This morning, everything is fine with power-supply in.

So I guess that yesterday evening the cpu was hot, and with power supply in it got even hotter which lead to sudden throttling and dropouts.

I cannot say "fine, now it works", because I need to rely on this machine for live performances.

The new kernel uses intel_pstate driver for cpu-speed-scaling. Maybe I should turn that off and use the older driver.

If I completely de-activate intel speedstep, I am on the safe side, but I have pretty low overall performance then. I get on the edge of the possible when using pianoteq + guitarix on the same machine.

Anyone here with experience with intel_pstate vs acpi-cpufreq ? As described here:

https://wiki.archlinux.org/index.php/CP ... cy_scaling

Any ideas are really welcome!

Regards,
Andreas
User avatar
sysrqer
Established Member
Posts: 2519
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Worse performance when power supply plugged in!

Post by sysrqer »

Do you have tlp or anything like that installed? You could try powertop to see if there are any obvious issues.
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: Worse performance when power supply plugged in!

Post by Musicteacher »

tlp is not installed.
What would be an obvious issue shown with powertop? I can have a look if the problem reappears.

At the moment I am thinking in the lines of controlling fan-speed to keep cpu temperatures lower to avoid sudden throttling. What is your opition on that?

I have installed psensor and saw that after disabling performance mode, cpu temperature lowered (in about 5 minutes) by 10 degrees. But I still do not know if I am on the right track.

Maybe I should do some serios recording this evening and see if the problem reappears. Then I can have a look at cpu temperatures.

The general question (mabe better in a differend thread): What do you guys do with
- intel speed step
- cpu power management
- performance governor

I had also thought that maybe I should set the maximum frequency to a lower value than 3.4gHz, to avoid overheating and still get a good performance (like, to 2.8 gHz or so).

But maybe all of you do not use notebooks, so you do not have problems like that.

Thanks for your advice,
Andreas
User avatar
sysrqer
Established Member
Posts: 2519
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Worse performance when power supply plugged in!

Post by sysrqer »

I'm not sure what to look out for with powertop, I've only used it to spot issues with power consumption but it might show something.

Your issue is odd though. What exactly are you doing, using jack, ardour etc? What have you done to optimise for audio? Which kernel are you using and are you using the microcode package for your processor? Does the realtimeconfigscan show any problems when you run it with the power plugged in?

I have speed step enabled, and generally have the governor set to powersave unless I do audio when I manually change it to performance if I notice issues.
User avatar
Linuxmusician01
Established Member
Posts: 1524
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland
Has thanked: 756 times
Been thanked: 135 times

Re: Worse performance when power supply plugged in!

Post by Linuxmusician01 »

sysrqer wrote:[...] You could try powertop to see if there are any obvious issues.
Never heard of the program. Installed it: thanks for your super tip! :)
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: Worse performance when power supply plugged in!

Post by Musicteacher »

I'm on arch, rt-kernel 5.0.5 .

I do:

I summarize what I do on my system:
- use linux-rt kernel (which does not seem to make a real difference, at least as shown by xruncounter)
- set cpu governor to performance
- disable hyperthreading
- suspend baloo (with the command balooctl suspend )
- disable compositing
- disable kde power managemend
- set kde to plane-mode (this disables wlan + bluetooth)
- set realtime irq optimizations (rtirq start)


I use a behringer umc 1820 as soundcard, 96 bit buffer (or 48 bit), 3 periods (qjackctl shows 4 ms latency, which is probably 8 ms roundtrip).

If I do all of this, usually I only get xruns when I start a new program. But yesterday evening when I plugged in the power supply, I got thousands of xruns, xruncounter reportet first xruns at about 30%, I got a warning "cpu overload" in jack. Pianoteq was unusable, other stuff still gave sound, but several audible xruns every minute.

As soon as I plugged out the power supply or changed the performance governor from performance to powersave, things improved, but I still got the occasional xrun (which is normally not the case, as said above).

My theory, as I said, is that this is a thermal problem.

Maybe I shouldn't set the governor to performance but instead rise in powersave mode the lower bound of the frequency to, say, 1.6gHz (which is the frequency the system has without intel speedstep, a frequency that should be possible constantly).
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: Worse performance when power supply plugged in!

Post by Musicteacher »

Hi,

I think I have progressed a bit (can I say it like this? Made some progress?)

Yesterday I watched some movies on the said notebook. After that, the battery was quite drained. I went to my music room, plugged it the supply and made some music. Performance was really bad again.

Explanation: From watching movies the notebook was quite hot already. The battery gets really hot when being charged. This way, the turbo-boost frequency cannot be kept for a long time, if at all.

The performance-governor tries to turbo-boost all the time.

This also explains the very unreliable results from xruncounter. The "load" is calculated via the cpu-speed. If the cpu is changing speed all the time, the load "jumps" when xruncounter runs. On my machine, you sometimes get into an infinite loop with xruncounter, because cpu is jumping all the time.

So to be on the safe side, for music speedstep should be de-activated (that is the easy solution).

If you really need higher frequencies, take care of extra-well cooling and make extensive tests if the higher frequency can really be kept for a longer time. Also it would probably be wise to set the cpu-frequency only as high as needed, not the highest possible.

I will now do some tests if performance is sufficient when speedstep ist turned off.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Worse performance when power supply plugged in!

Post by merlyn »

My friend uses a laptop as his main audio system. Because he always has the power supply plugged in he took the battery out. He read somewhere that this is better for the battery. If excess heat is the problem then taking the battery out would eliminate the heat from charging the battery.

If you're not keen on the idea, I can see why. :)
Musicteacher
Established Member
Posts: 194
Joined: Mon Nov 13, 2017 5:54 am
Has thanked: 8 times
Been thanked: 4 times

Re: Worse performance when power supply plugged in!

Post by Musicteacher »

This is not easily possible (modern notebook, battery non-detachable). However, I will try to keep the battery fully charged. This way it won't heat up while charging.
Post Reply