Need help with ASUS GL702ZC processor scheduling while on battery

This good old laptop runs fine when plugged in, but when on battery, the laptop often runs at a very sluggish average clock speed (~550MHz, usually <1GHz) which is too slow to be usable in some cases.

Although the laptop is usually plugged in, I may sometimes use its battery like trying to discharge it from time to time (for maintaining its lifespan), or in case I only need to use it for a brief while within its capacity (like 5-10 mins), since its huge power adapter can be inconvenient to carry and set up.

Don’t know if there’s any way to configure the schedutil governor not to excessively underclock the CPU while on battery. Sometimes the laptop can run at full speed while on battery, but in most cases I see the CPU running severely underclocked.

EDIT: Attached some information of the laptop’s current state acquired with inxi. It doesn’t seem to filter information regarding my disks, so I removed them as it’s not really relevant to this issue.
PS: I also run Manjaro on some other devices with all kinds of configurations, so it’s not easy for me to write everything down in the profile. However, I mostly use XFCE and Cinnamon desktop environments.

For this laptop I don’t use any power saving features (technically, TLP doesn’t work, and I only know recently that this laptop doesn’t have advanced battery-related features compared to other ASUS ones). Just that I use nbfc for some more aggressive fan controlling to keep the system temperature under control.

Some system information
System:
  Kernel: 5.14.2-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/vmlinuz-5.14-x86_64 
  root=UUID=<filter> rw quiet 
  ec_sys.write_support=1 
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: xfwm 4.16.1 
  dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: ASUSTeK product: GL702ZC v: 1.0 serial: <filter> 
  Mobo: ASUSTeK model: GL702ZC v: 1.0 serial: <filter> 
  UEFI: American Megatrends v: GL702ZC.306 date: 07/05/2019 
Battery:
  ID-1: BAT0 charge: 70.4 Wh (92.6%) condition: 76.0/76.0 Wh (100.0%) 
  volts: 15.2 min: 15.2 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A 
  status: Discharging cycles: 14 
Memory:
  RAM: total: 31.29 GiB used: 5.2 GiB (16.6%) 
  Array-1: capacity: 64 GiB slots: 2 EC: None max-module-size: 32 GiB 
  note: est. 
  Device-1: DIMM 0 size: 16 GiB speed: 2400 MT/s type: DDR4 
  detail: synchronous unbuffered (unregistered) bus-width: 64 bits 
  total: 64 bits manufacturer: Corsair part-no: CMSX32GX4M2A2400C16 
  serial: <filter> 
  Device-2: DIMM 0 size: 16 GiB speed: 2400 MT/s type: DDR4 
  detail: synchronous unbuffered (unregistered) bus-width: 64 bits 
  total: 64 bits manufacturer: Corsair part-no: CMSX32GX4M2A2400C16 
  serial: <filter> 
CPU:
  Info: 8-Core model: AMD Ryzen 7 1700 socket: AM4 bits: 64 type: MT MCP 
  arch: Zen family: 17 (23) model-id: 1 stepping: 1 microcode: 8001137 cache: 
  L1: 768 KiB L2: 4 MiB L3: 16 MiB bogomips: 95850 
  Speed: 2040 MHz min/max: 1550/3000 MHz base/boost: 3000/3750 boost: enabled 
  volts: 1.2 V ext-clock: 100 MHz Core speeds (MHz): 1: 2040 2: 2121 3: 1435 
  4: 1472 5: 1636 6: 1629 7: 1426 8: 1473 9: 1403 10: 1458 11: 1468 12: 1469 
  13: 1468 14: 1469 15: 1476 16: 1486 
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1 
  bmi2 bpext clflush clflushopt clzero cmov cmp_legacy constant_tsc cpb cpuid 
  cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid f16c flushbyasid 
  fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb irperf lahf_lm lbrv lm mca 
  mce misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl 
  npt nrip_save nx osvw overflow_recov pae pat pausefilter pclmulqdq pdpe1gb 
  perfctr_core perfctr_llc perfctr_nb pfthreshold pge pni popcnt pse pse36 
  rapl rdrand rdseed rdtscp rep_good sep sev sha_ni skinit smap smca sme smep 
  ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 succor svm svm_lock syscall tce 
  topoext tsc tsc_scale v_vmsave_vmload vgif vmcb_clean vme vmmcall wdt 
  xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: 
  disabled, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 
  vendor: ASUSTeK driver: amdgpu v: kernel bus-ID: 0c:00.0 chip-ID: 1002:67df 
  class-ID: 0300 
  Device-2: Realtek USB2.0 HD UVC WebCam type: USB driver: uvcvideo 
  bus-ID: 1-8:2 chip-ID: 0bda:57fa class-ID: 0e02 serial: <filter> 
  Display: server: X.org 1.20.13 compositor: xfwm4 v: 4.16.1 driver: 
  loaded: amdgpu,ati unloaded: modesetting alternate: fbdev,vesa 
  resolution: <missing: xdpyinfo> 
  OpenGL: renderer: Radeon RX 580 Series (POLARIS10 DRM 3.42.0 
  5.14.2-1-MANJARO LLVM 12.0.1) 
  v: 4.6 Mesa 21.2.1 direct render: Yes 
Audio:
  Device-1: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] 
  vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 0c:00.1 
  chip-ID: 1002:aaf0 class-ID: 0403 
  Device-2: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel 
  v: kernel bus-ID: 12:00.3 chip-ID: 1022:1457 class-ID: 0403 
  Sound Server-1: ALSA v: k5.14.2-1-MANJARO running: yes 
  Sound Server-2: sndio v: N/A running: no 
  Sound Server-3: JACK v: 1.9.19 running: no 
  Sound Server-4: PulseAudio v: 15.0 running: yes 
  Sound Server-5: PipeWire v: 0.3.35 running: yes 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: ASUSTeK driver: r8169 v: kernel port: f000 bus-ID: 06:00.0 
  chip-ID: 10ec:8168 class-ID: 0200 
  IF: enp6s0 state: down mac: <filter> 
  Device-2: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi v: kernel 
  port: f000 bus-ID: 07:00.0 chip-ID: 8086:2725 class-ID: 0280 
  IF: wlp7s0 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: global 
  IP v6: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  IF-ID-1: vmnet1 state: unknown speed: N/A duplex: N/A mac: <filter> 
  IP v4: <filter> scope: global broadcast: <filter> 
  IP v6: <filter> scope: link 
  IF-ID-2: vmnet8 state: unknown speed: N/A duplex: N/A mac: <filter> 
  IP v4: <filter> scope: global broadcast: <filter> 
  IP v6: <filter> scope: link 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Intel AX210 Bluetooth type: USB driver: btusb v: 0.8 
  bus-ID: 1-10:4 chip-ID: 8087:0032 class-ID: e001 
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running 
  rfk-block: hardware: no software: yes address: see --recommends 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 10 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-8:2 info: Realtek USB2.0 HD UVC WebCam type: Video 
  driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA 
  chip-ID: 0bda:57fa class-ID: 0e02 serial: <filter> 
  Device-2: 1-9:3 info: ASUSTek ROG MacroKey type: Keyboard,Mouse 
  driver: asus,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s power: 100mA 
  chip-ID: 0b05:1837 class-ID: 0301 
  Device-3: 1-10:4 info: Intel AX210 Bluetooth type: Bluetooth driver: btusb 
  interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0032 
  class-ID: e001 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-3: 3-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-4: 4-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 51.6 C mobo: N/A gpu: amdgpu temp: 42.0 C 
  Fan Speeds (RPM): cpu: 2300 
Info:
  Processes: 483 Uptime: 4m wakeups: 1 Init: systemd v: 249 tool: systemctl 
  Compilers: gcc: 11.1.0 alt: 7/8/9 clang: 12.0.1 Packages: pacman: 2363 
  lib: 506 flatpak: 0 Shell: Zsh (sudo) v: 5.8 default: Bash v: 5.1.8 
  running-in: xfce4-terminal inxi: 3.3.06 
1 Like
  1. Please read this:
    How to provide good information
    and press the three dots below your post and press the :pencil2: to give us more information so we can see what’s really going on.
    Now we know the symptom of the disease, but we need some more probing to know where the origin lies… :grin:
  2. An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information for us to be able to help you. (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
    Also, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text.
  3. Which power-saving utility are you using? TLP? Something else? None?

:+1:

P.S. If you want to notify me that you did provide this information, please :heart: this message and I’ll come back and have another look.
P.P.S. If you enter a bit more details in your profile, we can also see which Desktop Environment you’re using, which exact CPU/GPU or Kernel, … you have without typing it every time

1 Like

First things first: please read this section at a minimum:

(though the other sections might catch your interest as well) :wink:
then change to an LTS kernel.

You should so you can change things as now you’re on the UEFI firmware defaults.

pamac install tlp, tplui
tlpui &

Everything is relevant and why we ask this information: your disks might be dying and then you get weird behaviour.

I’m not very familiar with AMD processors, so have a look if this directory and its subdirectories has anything relevant to:

  • performance
  • pstate
  • turbo

Please include all the information you’ve removed from the Inxi output in your original post

:bowing_man:

I’m not very familiar with AMD processors, so have a look if this directory and its subdirectories has anything relevant to:

  • performance
  • pstate
  • turbo

Alas, guess this is not the right place to ask my questions after all. But thanks for pointing out hints on where I should take a look at. Will mark this as solved for now.

Still, it always bugged me how it could throttle such as CPU to very low clock speeds.

… then change to an LTS kernel.

This processor scheduling issue existed since day one (that would be 3 years and many kernel versions ago), but it wasn’t a serious issue as while I do sometimes use the laptop on battery, it’s not that frequent, since its battery capacity is very limited, that if I have to use it for longer, I’d definitely set up the power adapter.

Off-topic

A problem for using LTS would be the Intel AX210 module which I recently replaced. Its bluetooth part doesn’t work with kernels before 5.12 (keeps restarting and spams the dmesg with errors). It was a firmware related issue and I don’t know if that’s been correctly backported to 5.10 LTS.

You should so you can change things as now you’re on the UEFI firmware defaults.

The laptop’s UEFI BIOS offers very limited options. I don’t recall seeing anything really worth tweaking, but I’ll take a look again when I have time.

Off-topic

Not to mention when I just bought the laptop, the BIOS didn’t even have the option to enable SVM (which was disabled by default). The toggle was only added in later BIOS updates.

Everything is relevant and why we ask this information: your disks might be dying and then you get weird behaviour.
Please include all the information you’ve removed from the Inxi output in your original post

All I removed were some SMART, partitions and swap sections as the inxi command doesn’t filter stuffs like labels and UUIDs which I consider identifiable. The issue had nothing to do with the disks as while I did replace/upgrade some disks with larger ones during these years, how the system behaves remained the same.

Urgh! forgot to include the directory:

/sys/devices/system/cpu/

5.14 is the correct one then. :+1:

No, that’s for actual solutions. I can close the topic for you without solution but it’s better to leave it open just in case an AMD expert shows up.

Note: We do have AMD experts and it’s just me not running on AMD right now, but as they run the same instruction set as Intels, they have the same kind of functionality, but you need to give me more info as I can’t tell you what to do exactly

That’s my point exactly and why you need TLP and TLPUI (easier to navigate than a config file)

Relevant! for this reason

:crossed_fingers:

Turned out I already had TLPUI installed before. I originally wanted to control the laptop’s charging threshold but I was not able to as that feature was not supported.

EDIT: Nope… it doesn’t make any difference…

The CPU_ENERGY_PERF_POLICY is only for Intel processors, and the other one, SCHED_POWERSAVE does not seem to have any effect either.

The moment the system feels a heavy load it drops down to 550MHz. Removing that load would make the clock speed return to normal. It’s also possible that the laptop is being power-capped as the battery may not be able to provide enough power to sustain heavy loads.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.