LinuxQuestions.org
Help answer threads with 0 replies.
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 09-05-2019, 03:04 PM   #31
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,633

Rep: Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926

Quote:
Originally Posted by ajevremovic View Post
After some more research and tuning, I realized it's better to change the plan than the governor. So here is the updated /etc/pm/power.d/cpufreq script:
Code:
#!/bin/sh

# Default value on battery [$1 = "true"]
SCALING_PLAN_BAT="powersave"

# Default value on AC [$1 = "false"]
SCALING_PLAN_AC="balanced"

set_cpufreq() {
  case $1 in
    bat) SCALING_PLAN=$SCALING_PLAN_BAT;;
    ac) SCALING_PLAN=$SCALING_PLAN_AC;;
  esac
  printf "Setting CPU frequency scaling plan to %s..." "$SCALING_PLAN"
  /usr/local/bin/pstate-frequency -S -p $SCALING_PLAN
  [ "$?" -eq 0 ] && echo Done. || echo Failed.
}

case $1 in
  true) set_cpufreq bat;;
  false) set_cpufreq ac;;
  *) exit $NA;;
esac

exit 0
You might want to take a look at gegechris99's work - his blog entry: ACPI configuration to handle AC adapter events
https://www.linuxquestions.org/quest...ml#post5903041
 
Old 10-02-2019, 12:31 AM   #32
ajevremovic
Member
 
Registered: May 2011
Location: Serbia
Posts: 78

Original Poster
Rep: Reputation: 40
Update: https://www.notebookcheck.net/Lenovo....435549.0.html
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Thinpads - T480/T580, etc CPU throttling SqdnGuns Slackware 0 06-15-2018 06:45 AM
Set Clock Frequency on a Frequency Scaling Disabled Kernel mobin.seven Linux - Kernel 3 02-18-2017 10:33 PM
moved harddrive from t61 lenovo to t60 lenovo, now cpu freezes Peter Shepard Ubuntu 3 10-26-2009 06:11 PM
cpu frequency scaling with Pentium(R) Dual-Core CPU E5200 @ 2.50GHz tramni1980 Slackware 5 08-16-2009 08:29 AM
Curious to hear other people's experiences of the Thinkpad 240x nowhere.elysium Linux - Laptop and Netbook 1 01-15-2009 12:20 AM

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

All times are GMT -5. The time now is 06:44 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