Discussion:
slackware64-current on thinkpad X61
(too old to reply)
m***@asd.home
2021-04-03 22:46:43 UTC
Permalink
I've installed this afternoon, the system has an old ssd (about 100GB)
and 8GB RAM, with middleton bios installed to get 300GB/s sata xfer
rate.

Everything I have tried works. Wifi, suspend, resume, sound,
trackpoint, usb mouse, thinkpad buttons (eg screen brightness),
ethernet port, able to mount external usb drive. I'm running
windowmaker, haven't tried kde plasma but no reason to think it wouldn't
work. Performance is nice and fast. Trying out waterfox as a
de-telemeterised firefox, seems OK. The whole setup was really
impressive, got everything working in under an hour. Great stuff!:
m***@asd.home
2021-04-03 23:00:16 UTC
Permalink
Post by m***@asd.home
I've installed this afternoon, the system has an old ssd (about 100GB)
and 8GB RAM, with middleton bios installed to get 300GB/s sata xfer
rate.
Everything I have tried works. Wifi, suspend, resume, sound,
trackpoint, usb mouse, thinkpad buttons (eg screen brightness),
ethernet port, able to mount external usb drive. I'm running
windowmaker, haven't tried kde plasma but no reason to think it wouldn't
work. Performance is nice and fast. Trying out waterfox as a
de-telemeterised firefox, seems OK. The whole setup was really
A couple more notes while I'm here. X auto-configuration chose the
optimised glamor driver (I'm using intel chipset graphics). Mplayer
videos work, performance seems fine. Web videos work.
Powertop says the system is using about 15W on battery giving about
3.5 hours batt life, not bad for a 5-year old battery. I might be
able to tune power down a little. Xephyr port works.
System appears stable, no panics :-)

I used the iso from :-
http://slackware.uk/people/alien-current-iso/slackware64-current-iso/

Very impressed at how smoothly slack installs nowadays :-)
Henrik Carlqvist
2021-04-05 08:46:41 UTC
Permalink
Powertop says the system is using about 15W on battery giving about 3.5
hours batt life, not bad for a 5-year old battery. I might be able to
tune power down a little.
I call the following custom script from rc.local on Slackware 14.2:

cat /usr/local/etc/rc.d/rc.cpufreq

#!/bin/sh

# Fix cpu frequency adaption to load
/sbin/modprobe acpi-cpufreq 2>/dev/null && \
/sbin/modprobe cpufreq_ondemand && \
find /sys/devices/system/cpu -name scaling_governor -exec \
sh -c 'echo ondemand > {}' \; && \
echo CPU frequency will be adapted to load || \
echo No CPU frequency adaption on this machine...

echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load
echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold



The above script is not specific for laptops, I also use it for desktops
and servers. Without load or only nice loads cores will run at minimum
supported frequencies and when working the frequencies (and power
consumption) will be maximized. It is easy to check that the settings
work by doing:

cat /proc/cpuinfo | grep MHz
cpu MHz : 800.000
cpu MHz : 800.000
cpu MHz : 1200.000
cpu MHz : 3801.000
cpu MHz : 800.000
cpu MHz : 3801.000
cpu MHz : 800.000
cpu MHz : 800.000

regards Henrik
Per Christensen
2021-04-08 15:17:19 UTC
Permalink
On 4/5/21 10:46 AM, Henrik Carlqvist wrote:
---------------
Post by Henrik Carlqvist
cat /usr/local/etc/rc.d/rc.cpufreq
#!/bin/sh
# Fix cpu frequency adaption to load
/sbin/modprobe acpi-cpufreq 2>/dev/null && \
/sbin/modprobe cpufreq_ondemand && \
find /sys/devices/system/cpu -name scaling_governor -exec \
sh -c 'echo ondemand > {}' \; && \
echo CPU frequency will be adapted to load || \
echo No CPU frequency adaption on this machine...
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load
echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
Without load or only nice loads cores will run at minimum
supported frequencies and when working the frequencies (and power
consumption) will be maximized.
-----------------
Henrik, thank you for the script.

On "***@asd.home" Thinkpad Powertop is already installed so I guess the
TLP Battery Management Tool (also running as a service) could be well as
good as your provided script as "TLP’s default settings are already
optimized for battery life and implement Powertop’s recommendations out
of the box"

https://linrunner.de/tlp/
m***@asd.home
2021-04-10 21:41:53 UTC
Permalink
Post by Per Christensen
---------------
Post by Henrik Carlqvist
cat /usr/local/etc/rc.d/rc.cpufreq
#!/bin/sh
# Fix cpu frequency adaption to load
/sbin/modprobe acpi-cpufreq 2>/dev/null && \
/sbin/modprobe cpufreq_ondemand && \
find /sys/devices/system/cpu -name scaling_governor -exec \
sh -c 'echo ondemand > {}' \; && \
echo CPU frequency will be adapted to load || \
echo No CPU frequency adaption on this machine...
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load
echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
Without load or only nice loads cores will run at minimum
supported frequencies and when working the frequencies (and power
consumption) will be maximized.
-----------------
Henrik, thank you for the script.
TLP Battery Management Tool (also running as a service) could be well as
good as your provided script as "TLP’s default settings are already
optimized for battery life and implement Powertop’s recommendations out
of the box"
https://linrunner.de/tlp/
Interesting to read about tlp. I have also discoverd that powertop has
a --auto-tune option that can be invoked from rc.local to set all its
tunables to the 'good' setting at boot time.

Then I discovered someone has tested whether the powertop recommendations
actually reduce power, the answer is "ymmv", he found by experiment that
some of the settings reduce power consumption and some increase it(!)
see :-
https://kernel.ubuntu.com/~cking/power-benchmarking/\
powertop-good-bad-recommendations/results.txt

I am also reading about 'laptop-mode-tools' which are also supposed to
help with power optimisation, and found there is a slackbuild for that.
When I get more time I'll look into it further!
m***@asd.home
2021-04-10 21:50:59 UTC
Permalink
Post by m***@asd.home
Post by Per Christensen
---------------
Post by Henrik Carlqvist
cat /usr/local/etc/rc.d/rc.cpufreq
#!/bin/sh
# Fix cpu frequency adaption to load
/sbin/modprobe acpi-cpufreq 2>/dev/null && \
/sbin/modprobe cpufreq_ondemand && \
find /sys/devices/system/cpu -name scaling_governor -exec \
sh -c 'echo ondemand > {}' \; && \
echo CPU frequency will be adapted to load || \
echo No CPU frequency adaption on this machine...
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load
echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
Without load or only nice loads cores will run at minimum
supported frequencies and when working the frequencies (and power
consumption) will be maximized.
-----------------
Henrik, thank you for the script.
TLP Battery Management Tool (also running as a service) could be well as
good as your provided script as "TLP’s default settings are already
optimized for battery life and implement Powertop’s recommendations out
of the box"
https://linrunner.de/tlp/
Interesting to read about tlp. I have also discoverd that powertop has
a --auto-tune option that can be invoked from rc.local to set all its
tunables to the 'good' setting at boot time.
Then I discovered someone has tested whether the powertop recommendations
actually reduce power, the answer is "ymmv", he found by experiment that
some of the settings reduce power consumption and some increase it(!)
see :-
https://kernel.ubuntu.com/~cking/power-benchmarking/\
powertop-good-bad-recommendations/results.txt
I am also reading about 'laptop-mode-tools' which are also supposed to
help with power optimisation, and found there is a slackbuild for that.
When I get more time I'll look into it further!
Just for interest, with all powertop tunables set to 'good', it shows a
discharge rate of about 9 W when the system is idle; and upower reports
that the battery claims a life of 4.5 hours, although I suspect that may
be an overestimate. My particular X61 variant is an X61s, fitted with
an L7500 cpu at 1.6GHz, so I've got a fairly low-power cpu compared to a
standard X61.
m***@asd.home
2021-04-10 21:32:08 UTC
Permalink
Post by Henrik Carlqvist
Powertop says the system is using about 15W on battery giving about 3.5
hours batt life, not bad for a 5-year old battery. I might be able to
tune power down a little.
cat /usr/local/etc/rc.d/rc.cpufreq
#!/bin/sh
# Fix cpu frequency adaption to load
/sbin/modprobe acpi-cpufreq 2>/dev/null && \
/sbin/modprobe cpufreq_ondemand && \
find /sys/devices/system/cpu -name scaling_governor -exec \
sh -c 'echo ondemand > {}' \; && \
echo CPU frequency will be adapted to load || \
echo No CPU frequency adaption on this machine...
echo 1 > /sys/devices/system/cpujk/cpufreq/ondemand/ignore_nice_load
echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
The above script is not specific for laptops, I also use it for desktops
and servers. Without load or only nice loads cores will run at minimum
supported frequencies and when working the frequencies (and power
consumption) will be maximized. It is easy to check that the settings
cat /proc/cpuinfo | grep MHz
cpu MHz : 800.000
cpu MHz : 800.000
cpu MHz : 1200.000
cpu MHz : 3801.000
cpu MHz : 800.000
cpu MHz : 3801.000
cpu MHz : 800.000
cpu MHz : 800.000
regards Henrik
Hi Henrik, thanks for your script. It appears that slackware-current is
already setup to use the ondemand scaling governor (at least, in the
recent image that I downloaded!), however I found the
sampling_down_threshold is set to 1 (instead of your value of 100) and
the up_threshold is set to 95 (instead of 50) by default. I have tried
running some loads and watching the cpu frequencies reported by
/proc/cpuinfo, and they correctly scale up to the max under load and
drop back down when idle; and each core is scaled individually.
So it would appear that slackware-current has implemented something
similar to your script by default.
Henrik Carlqvist
2021-04-11 09:34:37 UTC
Permalink
Post by m***@asd.home
Hi Henrik, thanks for your script. It appears that slackware-current is
already setup to use the ondemand scaling governor (at least, in the
recent image that I downloaded!),
Great!
Post by m***@asd.home
however I found the sampling_down_threshold is set to 1 (instead of
your value of 100) and the up_threshold is set to 95 (instead of 50) by
default.
I think that those 1 and 95 are the default values from the kernel. As I
said my script is not laptop-specific but also used on workstations and
servers. Those settings were added to the script after some users had
complained that the machines were unnecessary slow for short workloads.
Those users wanted to disable the script to get more responsive machines.
These settings made them accept the script.

sampling_down_factor was increased from default 1 (default and lowest
possible) to 100 (its max possible value is 100000) to more quickly
respond to the current load and up_threshold was lowered to make the
machines more willing to increase cpu frequency at load.

If on_demand now is the default governor in Slackware current altering
those settings might be good on powerful machines used for calculations
as it will give better responsiveness, much closer to the performance you
would get by allways running the CPUs at max frequency.

regards Henrik
m***@asd.home
2021-04-11 14:59:26 UTC
Permalink
Post by Henrik Carlqvist
Post by m***@asd.home
Hi Henrik, thanks for your script. It appears that slackware-current is
already setup to use the ondemand scaling governor (at least, in the
recent image that I downloaded!),
Great!
Post by m***@asd.home
however I found the sampling_down_threshold is set to 1 (instead of
your value of 100) and the up_threshold is set to 95 (instead of 50) by
default.
I think that those 1 and 95 are the default values from the kernel. As I
said my script is not laptop-specific but also used on workstations and
servers. Those settings were added to the script after some users had
complained that the machines were unnecessary slow for short workloads.
Those users wanted to disable the script to get more responsive machines.
These settings made them accept the script.
sampling_down_factor was increased from default 1 (default and lowest
possible) to 100 (its max possible value is 100000) to more quickly
respond to the current load and up_threshold was lowered to make the
machines more willing to increase cpu frequency at load.
If on_demand now is the default governor in Slackware current altering
those settings might be good on powerful machines used for calculations
as it will give better responsiveness, much closer to the performance you
would get by allways running the CPUs at max frequency.
regards Henrik
Interesting, thanks.

Loading...