Comment 4 for bug 1738534

Revision history for this message
Shaun Crampton (fasaxc) wrote :

As a workaround, I created a post-resume script that runs the above commands at /lib/systemd/system-sleep/throttle-workaround. It works in the first scenario, but not if the full power cycle was done on battery power.

#!/bin/sh

# Action script to prevent CPU throttling after resume.

set -e

PATH=/sbin:/usr/sbin:/bin:/usr/bin

case "${1}" in
        post)
  x86_energy_perf_policy --turbo-enable 1
  cpufreq-set -r --max=3.0GHz
                ;;
esac