Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding powerd #107

Open
probonopd opened this issue Jan 20, 2021 · 10 comments
Open

Consider adding powerd #107

probonopd opened this issue Jan 20, 2021 · 10 comments

Comments

@probonopd
Copy link
Member

A user on IRC noted that his notebook runs hotter on FreeBSD than on Linux and asked whether helloSystem manages P-States automatically.

We need to investigate this topic and possibly preinstall and preconfigure something like powerd.

https://www.freebsd.org/cgi/man.cgi?query=powerd
Also check
https://github.com/lonkamikaze/powerdxx
and see @vermaden's writeups on the subject

@grahamperrin
Copy link
Contributor

grahamperrin commented Jan 20, 2021

Here:

% pkg info -x powerd
plasma5-powerdevil-5.20.5
powerdxx-0.4.4
% pkg query '%o %v %R' powerdxx
sysutils/powerdxx 0.4.4 FreeBSD
% man powerd++
powerd++(8)             FreeBSD System Manager's Manual            powerd++(8)

NAME
     powerd++ – CPU clock speed daemon
…

– note, that's not powerdxx for the installed manual page, but it is powerdxx for an online view e.g. https://www.freebsd.org/cgi/man.cgi?query=powerdxx(8)

https://www.freshports.org/sysutils/powerdxx/

% grep powerd /etc/rc.conf
powerd_enable="NO"
powerdxx_enable="YES"
% 

@grahamperrin
Copy link
Contributor

hotter on FreeBSD than on Linux

lonkamikaze/powerdxx#14

@vermaden
Copy link

I have gathered all possible known to me FreeBSD power management options here for 2018:
https://vermaden.wordpress.com/2018/11/28/the-power-to-serve-freebsd-power-management/

Maybe that will help you a little.

Maybe since late 2018 (its 2021 now) some new options been introduced.

I would also suggest a 'strange' but optimal thing:

  • when on battery use powerdxx
  • when on AC use powerd

The powerd increases clocks fast which makes sense on AC.
The powerdxx increases clocks slow which makes sense for battery.

@timsofteng
Copy link

Unfortunately temperature is not only one problem. Performance in gui applications is worse on freebsd than on linux. Even with fixed frequencies to turboboost mode on freebsd with dev.cpu.0.freq linux still smoother by default.
I don't know why.

Maybe it's drm-kmod issue. I've tried to configure xorg but it didn't help. Performance on Wayland is even worse.

@timsofteng
Copy link

timsofteng commented Jan 20, 2021

I have gathered all possible known to me FreeBSD power management options here for 2018:
https://vermaden.wordpress.com/2018/11/28/the-power-to-serve-freebsd-power-management/

Maybe that will help you a little.

Maybe since late 2018 (its 2021 now) some new options been introduced.

I would also suggest a 'strange' but optimal thing:

  • when on battery use powerdxx
  • when on AC use powerd

The powerd increases clocks fast which makes sense on AC.
The powerdxx increases clocks slow which makes sense for battery.

You can set optimal intervals in powerdxx with some flags as -p and -s.

@grahamperrin

This comment has been minimized.

@vermaden
Copy link

You can set optimal intervals in powerdxx with some flags as -p and -s.

Its not about probing interval ... maybe I was not specific enough.

With powerd when there is some load then its quite fast that the CPU clock will be rised to close to maximum speed.

With powerdxx when there is some load then powerxx will increase the CPU speed but only a little - not close to maximum like powerd.

Personally I myself use powerd (better for interactive use due to this 'faster' speed change) and with limit on the maximum speed.

Currently my ThinkPad W520 has 4 cores with 2.3 GHz maximum speed + Turbo. I do not use Turbo at all and have limit of 1.8 GHz for maximum speed. This way even with 4 cores loaded at 100% I will not get that much high temperature and fan noise.

I wanted to create a script that would kill powerd and start powerdxx when on work on battery is discovered and do the opposite when AC power is available, but for most of the time I work on AC anyway so I did not created it.

If I would work on battery more then first I should replace my current battery as it has only 55% of its original capacity :)

% battery-capacity.sh 0
Battery '0' model '42T4791' has efficiency: 55%

Regards.

@vermaden
Copy link

@vermaden I love such strange advice!

My notebook has a good battery, but I rarely use it because it makes sense for me to rarely or never sleep the computer. Strange but true … https://github.com/helloSystem/ISO/issues/72

In other words, I'm reverting to powerd. Thanks!

Thanks :)

I use suspend/resume a lot but often I run some backup jobs at night so my system remains powered on anyway :)

@probonopd
Copy link
Member Author

I would also suggest a 'strange' but optimal thing:

when on battery use powerdxx
when on AC use powerd
The powerd increases clocks fast which makes sense on AC.
The powerdxx increases clocks slow which makes sense for battery.

Sounds to me like the authors of powerd and powerdxx should talk ;-)

@kettle-7
Copy link
Contributor

I have a portable heater in my bag ;~)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants