Powertop & TLP

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
joxn
Posts: 11
Joined: 28. Oct 2020, 19:15

Powertop & TLP

Post by joxn »

Hey. Wonder if someone can help with a couple of questions/issues. I searched the forum and the wiki to no avail.

I've used Sourcery (love it) to download PowerTop and TLP. I'd like them to both be started before login, and would assume to edit the rc.d file on another distro (and use & after the lines as I don't think they are daemonised) but I wanted to check the best way to do it with Salix (14.2.1)

Also, since I'm using a ThinkPad (T60) I normally would install the tp_smapi package as part of TLP's configuration (as it recommends). However doing this via Sourcery returned an error. The log is:
The following packages will be fetched:
tp_smapi
Fetching README... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
Fetching doinst.sh... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
Fetching modprobe.d/thinkpad_ec.conf... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
Fetching modprobe.d/tp_smapi.conf... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
Fetching slack-desc... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
Fetching tp_smapi.SlackBuild... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
Fetching tp_smapi.info... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
The following packages will be installed:
tp_smapi
Fetching README... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%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 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
Fetching slack-desc... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
Fetching tp_smapi.SlackBuild... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
Fetching tp_smapi.info... 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%100%100%100%100%Done
tp_smapi-tp-smapi-0.43/
tp_smapi-tp-smapi-0.43/.gitignore
tp_smapi-tp-smapi-0.43/CHANGES
tp_smapi-tp-smapi-0.43/Makefile
tp_smapi-tp-smapi-0.43/README
tp_smapi-tp-smapi-0.43/TODO
tp_smapi-tp-smapi-0.43/diff/
tp_smapi-tp-smapi-0.43/diff/Kconfig-thinkpad_ec.add
tp_smapi-tp-smapi-0.43/diff/Kconfig-tp_smapi.add
tp_smapi-tp-smapi-0.43/dkms.conf
tp_smapi-tp-smapi-0.43/hdaps.c
tp_smapi-tp-smapi-0.43/thinkpad_ec.c
tp_smapi-tp-smapi-0.43/thinkpad_ec.h
tp_smapi-tp-smapi-0.43/tp_smapi.c
tp_smapi-tp-smapi-0.43/tp_smapi.spec
ARCH=x86
make: *** No rule to make target '/lib/modules/4.4.19-smp/build', needed by 'modules'. Stop.
fakeroot -- sh tp_smapi.SlackBuild Failed
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Powertop & TLP

Post by mimosa »

Do you have the kernel source installed?

Code: Select all

sudo slapt-get -i kernel-source
You may want to upgrade your kernel in any case:
https://docs.salixos.org/wiki/How_to_in ... ent_kernel
joxn
Posts: 11
Joined: 28. Oct 2020, 19:15

Re: Powertop & TLP

Post by joxn »

mimosa wrote: 29. Oct 2020, 21:37 Do you have the kernel source installed?

Code: Select all

sudo slapt-get -i kernel-source
You may want to upgrade your kernel in any case:
https://docs.salixos.org/wiki/How_to_in ... ent_kernel
Thanks for the reply. I installed the kernel source code, and still get the same error.

My current kernel is 4.4.19-smp. I'm assuming the idea behind upgrading would be to support new hardware. Given this is a 2007 ThinkPad T60...would that still help?
joxn
Posts: 11
Joined: 28. Oct 2020, 19:15

Re: Powertop & TLP

Post by joxn »

Update: After RTFM I found that after the first time you run tlp-start, it will autostart on boot. D'oh. Couldn't find an obvious solution to the tp-smapi issue in Sourcery though.

https://linrunner.de/tlp/faq/operation.html
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Powertop & TLP

Post by gapan »

joxn wrote: 30. Oct 2020, 16:59 My current kernel is 4.4.19-smp. I'm assuming the idea behind upgrading would be to support new hardware. Given this is a 2007 ThinkPad T60...would that still help?
Yes. It would still help. In fact, it's the only way to make it work. It would still help since you would be upgrading to a newer kernel in the 4.4.x series, not a newer branch. This includes security fixes that you need to have. It's the only way to make it work, since the kernel-source for 4.4.19 is not available anymore anyway, and you need to have all your kernel-* packages in sync.
Image
Image
joxn
Posts: 11
Joined: 28. Oct 2020, 19:15

Re: Powertop & TLP [Solved]

Post by joxn »

Cheers. Followed the wiki steps, rebooted and the tp-smapi install worked from Sourcery. Am now runining update as suggested via Gslapt.
joxn
Posts: 11
Joined: 28. Oct 2020, 19:15

Re: Powertop & TLP

Post by joxn »

Had a thought, maybe it'd be a good idea to include an item about updating the kernel in the Start-Up Guide?
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Powertop & TLP

Post by mimosa »

That may well not be a bad idea. The Startup Guide has not been updated for a long time although it is still largely accurate. One reason it may not have been included is it is something of an advanced topic, depending on the kernel and bootloader you have. It took me a long time to get my head round it, and get in the habit of keeping the kernel regularly updated. But really, this is a good idea for all users, and at all stages of the release cycle, provided you stay within the same kernel series.

gapan, perhaps the way to handle this would be to mention that when fresher kernel packages are available from Slackware repositiories, they will appear as excluded packages, and point the reader of the Guide to the wiki page? That would be an easy change to make. However, I've never been happy with that page, which tries to strike an impossible balance between being newbie-friendly, and covering a variety of cases. It would still be too much for some.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Powertop & TLP

Post by gapan »

Yes, that may not be a bad idea. It should only cover the case of upgrading the kernel with updated packages, not compiling your own, or installing from current or anything else. I'll see what I can do.

Here's a one-liner that updates the kernel packages btw:

Code: Select all

sudo slapt-get -i `ls /var/log/packages/kernel-* | sed "s|/var/log/packages/\(.*\)-\(.*\)-\(.*\)-\(.*\)|\1|"`
But that's the easy part. It gets complicated if you have to cover lilo, elilo or even grub. And then you have to mention that you'll have to update any initrd that you might also have. And that's the main reason why it's not in the startup guide already. We had agreed on keeping things in there simple.
Image
Image
Post Reply