LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-06-2022, 02:47 AM   #1
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,352

Rep: Reputation: 75
TLP, power management, battery saving in laptop


I have installed tlp in an attempt to improve battery life in my laptop. There are a few things that are puzzling me.

According to the README

Quote:
# Configure tlp to be run at startup
add "/etc/rc.d/rc.tlp start" (without quotes) to /etc/rc.d/rc.local
I had thought that everything in rc.d was run at startup. Is that not the case? Does this really have to be in rc.local?


I am not sure if I should be doing anything with the configuration. My laptop has an AMD Ryzen processors with AMD Radeon graphics.
 
Old 07-06-2022, 03:11 AM   #2
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 622

Rep: Reputation: 300Reputation: 300Reputation: 300Reputation: 300
No - merely putting a file in rc.d does NOT make it run. If it did, the first issue here would be : what order ? You still have to call your script directly from some other script that IS known to run.
 
Old 07-06-2022, 04:58 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,408

Rep: Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338
Of course, /etc/rc.d/rc.tlp also has to be executable.
 
Old 07-06-2022, 05:48 AM   #4
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,352

Original Poster
Rep: Reputation: 75
Quote:
Originally Posted by business_kid View Post
Of course, /etc/rc.d/rc.tlp also has to be executable.
I'm not that stupid.
 
Old 07-06-2022, 06:18 AM   #5
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,407

Rep: Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140Reputation: 4140
If you want to know what is launched at startup, look in /etc/rc.d/rc.M
 
Old 07-06-2022, 06:44 AM   #6
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by Mark Pettit View Post
No - merely putting a file in rc.d does NOT make it run. If it did, the first issue here would be : what order ? You still have to call your script directly from some other script that IS known to run.
It's worth pointing out that you can use the runlevel directories (/etc/rc.d/rc.*) if you want a script to run without having to call it from elsewhere.
 
Old 07-06-2022, 06:50 AM   #7
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,979

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Quote:
Originally Posted by arubin View Post
I had thought that everything in rc.d was run at startup. Is that not the case? Does this really have to be in rc.local?
Most of the default rc scritps do as long as you turn them on "x" including rc.local which runs from rc.M. Unless tlp need to run before specific events the rc.local should be good enough.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: TLP 1.3 Linux Laptop Battery Extender Released LXer Syndicated Linux News 0 02-05-2020 05:23 AM
LXer: Essential System Tools: TLP – power management package LXer Syndicated Linux News 0 11-12-2019 04:02 AM
LXer: Linux Laptop Battery Optimization Tool TLP 1.2 Released LXer Syndicated Linux News 0 03-12-2019 04:40 PM
LXer: TLPUI Is A Graphical User Interface For TLP Power Management Tool (Ubuntu Installation Instructions) LXer Syndicated Linux News 0 09-11-2018 08:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration