CPU Frequency Scaling not working

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
visseroth
Level 2
Level 2
Posts: 64
Joined: Sun Feb 02, 2014 5:09 am

CPU Frequency Scaling not working

Post by visseroth »

I just purchased a Asus ZenBook which has a Intel Core i7-8550U with a clock speed of 2Ghz, Turbo of 4Ghz and a idle of 800Mhz.
Scaling wasn't working at all at first, the 1st core was stuck at 4Ghz the rest at 2 and needless to say the battery died fast and the machine was running warm. After hours of searching forums and playing around I managed to get scaling to work for the most part but the min frequency still likes to stick at 1.7Ghz on battery. I changed it from 1700 to 400 in /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq but as soon as I switch it from ondemand to anything else and then back again to ondemand using the cpu frequency applet then the scaling_min file defaults back to 1.7Ghz.
Question is why, and how can I set it so that the 1st core's max is 4Ghz but all cores min is 400 and how to make it stick or is there another way to get scaling working correctly.
Scaling wasn't working at all until I added intel_pstate=disable to grub but I would like to have the CPU in ondemand all the time, idling as low as possible but able to boost to 4Ghz as requested.

Any help and/or thoughts are appreciated.

Hardware Specs...
System: Host: LMZB Kernel: 4.15.10-041510-generic x86_64 (64 bit gcc: 7.2.0)
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3) Distro: Linux Mint 18.3 Sylvia
Machine: System: ASUSTeK (portable) product: UX430UNR v: 1.0
Mobo: ASUSTeK model: UX430UNR v: 1.0 Bios: American Megatrends v: UX430UNR.300 date: 10/06/2017
CPU: Quad core Intel Core i7-8550U (-HT-MCP-) cache: 8192 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 15936
clock speeds: max: 2001 MHz 1: 1583 MHz 2: 1256 MHz 3: 1307 MHz 4: 1289 MHz 5: 1234 MHz 6: 1268 MHz
7: 1253 MHz 8: 1253 MHz
Graphics: Card-1: Intel Device 5917 bus-ID: 00:02.0
Card-2: NVIDIA Device 1d10 bus-ID: 01:00.0
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.01hz
GLX Renderer: Mesa DRI Intel Kabylake GT1.5 GLX Version: 3.0 Mesa 17.2.8 Direct Rendering: Yes
Audio: Card Intel Device 9d71 driver: snd_hda_intel bus-ID: 00:1f.3 Sound: ALSA v: k4.15.10-041510-generic
Network: Card: Intel Device 24fd driver: iwlwifi bus-ID: 02:00.0
IF: wlp2s0 state: up speed: N/A duplex: N/A mac: <filter>
Drives: HDD Total Size: 512.1GB (5.6% used) ID-1: /dev/sda model: SanDisk_SD8SN8U5 size: 512.1GB temp: 44C
Partition: ID-1: / size: 205G used: 12G (7%) fs: ext4 dev: /dev/sda5
ID-2: swap-1 size: 17.03GB used: 0.00GB (0%) fs: swap dev: /dev/dm-0
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 48.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 280 Uptime: 1:21 Memory: 2294.7/15897.4MB Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
visseroth
Level 2
Level 2
Posts: 64
Joined: Sun Feb 02, 2014 5:09 am

Re: CPU Frequency Scaling not working

Post by visseroth »

The other problem I run into is the scaling_min_freq gets set to 1700000 or 2001000 which sets the cpu low to what is actually the CPU's high. The CPU's low is actually 800Mhz, not 1.7 or 2Ghz.
I've been sitting on this laptop currently all day, and out of the blue started to notice all cores bouncing from 2Ghz all the way up to 3.8Ghz, never settling below 2.

I then took a look at scaling_min_freq and it was 2001000. I adjusted it back to 400000 and the cores settled back down to 700 and 800Mhz while in Conservative mode.

Anyone have any idea why the scaling_min_freq keep changing back to a higher frequency?
visseroth
Level 2
Level 2
Posts: 64
Joined: Sun Feb 02, 2014 5:09 am

Re: CPU Frequency Scaling not working

Post by visseroth »

Looks like I may have fixed it.
I added TLP, edited /etc/default/tlp to match what I want which included setting the min and max frequency of the CPU, left cpufrequtils installed so I can adjust the CPU when I want, as I want and on restart I'm able to get the CPU down to 400Mhz at idle without editing anything on every single startup.
Intel lists the CPU as being able to go down to 800Mhz, the CPU says it goes down to 400, base frequency is 1.8Ghz peaks 4Ghz. I've seen all cores bounce around 3.5Ghz.
Now we'll see if it sticks for a while.
visseroth
Level 2
Level 2
Posts: 64
Joined: Sun Feb 02, 2014 5:09 am

Re: CPU Frequency Scaling not working

Post by visseroth »

I stand corrected, when I pull the power adapter and it changes from ondemand to conservative some of the cores will get set with a minimum frequency of 2Ghz. If I edit the scaling_min_freq file and change it back to 400Mhz the cores drop back down to normal.
visseroth
Level 2
Level 2
Posts: 64
Joined: Sun Feb 02, 2014 5:09 am

Re: CPU Frequency Scaling not working

Post by visseroth »

If I restart TLP the cores start acting like they should again.
visseroth
Level 2
Level 2
Posts: 64
Joined: Sun Feb 02, 2014 5:09 am

Re: CPU Frequency Scaling not working

Post by visseroth »

Removed cpufrequtils and tested, results are the same. I can only get the CPU cores to scale properly if I restart the tlp service (sudo service tlp restart)
I also changed it from conservative on bat to ondemand on both ac and bat. The minimum scaling frequency gets stuck at 2Ghz on a random amount of cores until the service is restarted.
BananaTech

Re: CPU Frequency Scaling not working

Post by BananaTech »

i think every time you change modes it deletes the old config file for the mode you switched from
Locked

Return to “Hardware Support”