Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

slackware64-current on thinkpad X61

19 views
Skip to first unread message

m...@asd.home

unread,
Apr 3, 2021, 6:46:50 PM4/3/21
to
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

unread,
Apr 3, 2021, 7:00:21 PM4/3/21
to
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

unread,
Apr 5, 2021, 4:46:42 AM4/5/21
to
On Sat, 03 Apr 2021 23:00:16 +0000, me wrote:
> 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

unread,
Apr 8, 2021, 11:19:43 AM4/8/21
to
On 4/5/21 10:46 AM, Henrik Carlqvist wrote:
---------------
> 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
>
> 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 "m...@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

unread,
Apr 10, 2021, 5:32:14 PM4/10/21
to
On 2021-04-05, Henrik Carlqvist <Henrik.C...@deadspam.com> wrote:
> On Sat, 03 Apr 2021 23:00:16 +0000, me wrote:
>> 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/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
> 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

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.

m...@asd.home

unread,
Apr 10, 2021, 5:41:58 PM4/10/21
to
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

unread,
Apr 10, 2021, 5:51:03 PM4/10/21
to
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.

Henrik Carlqvist

unread,
Apr 11, 2021, 5:34:39 AM4/11/21
to
On Sat, 10 Apr 2021 21:32:08 +0000, me wrote:
> 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!

> 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

unread,
Apr 11, 2021, 10:59:30 AM4/11/21
to
Interesting, thanks.
0 new messages