Recently, I built a new computer with ASRock J3455-ITX which has a Apollo Lake processor build-in to run Force.com IDE and VisualStudio Code. I have to use OpenSuSE Tumbleweed to replace my favorite Leap because it requires the latest kernel to support Apollo Lake.
Everything seems fine but it becomes very slow after resume / suspend. I have tested many power-related settings in UEFI (Unified Extensible Firmware Interface) and none of them help. If I logout GNOME and login again, I regain my normal speed.
I try to google “linux slow after resume” and found some useful information. It seems related to
Doug Smythies and jat255 provide detail explain and a solution to restore CPU frequency as a service in Slowdown after resume from suspend on ArchLinux.
Compare CPU Frequency
First, you need to compare CPU frequency before and after suspend to validate if this is the case. You may compare CPU frequency before and after suspend.
sudo cpupower frequency-info
Rewrite MSR If Not Zero
First to run modprobe to add a loadable kernel module (LKM) msr-tools to the Linux kernel. You need to run it every reboot.
MSR Tools project provides utilities to access the processor MSRs and CPU ID directly.
This project is composed of three different user space console applications.
rdmsr – read MSR from any CPU or all CPUs
wrmsr – write values to MSR on any CPU or all CPUs
cpuid – show identification and feature information of any CPU
#sudo modprobe msr
Run the utility to read MSR information.
#sudo rdmsr -a 0x19a
If the returned value is not 0, then write 0 into MSR.
sudo cpupower frequency-info sudo wrmsr -a 0x19a 0x0
CPU clock slower after each resume from sleep on AskUbuntu reported it doesn’t work because his case is not clock modulation (register 0x19A) related.
Reference
- ArchLinux: Slowdown after resume from suspend
- AskUbuntu: CPU clock slower after each resume from sleep
- AskUbuntu: Slow CPU after resume
- AskUbuntu: Ubuntu 16.04 LTS too slow after suspend and resume
- ASRock J3455-ITX
- GNOME
- Intel 01.org: msr-tools
- Intel: Intel Atom® Processor E3900 Series, Intel® Celeron® Processor N3350, and Intel® Pentium® Processor N4200, Formerly Apollo Lake
- OpenSuSE
- OpenSuSE Leap
- OpenSuSE Tumbleweed
- Salesforce Developers: Force.com IDE
- VisualStudio Code
- Wiki: modprobe
- Wiki: Unified Extensible Firmware Interface