Lower GPU clock of ODROID-XU4 for headless servers to save energy

Per default the Mali-T628 GPU inside the ODROID-XU4 will run at maximum speed (600MHz) the whole time.
This doesn’t consume that much energy if there is no load on the GPU. But nevertheless you can tune this a little bit if you don’t need the GPU at all.

Your kernel needs the following commit: mali: restore sysfs entries
Newer 3.10 ODROID-XU4 kernels should have this activated. I tested this with my own custom build kernel. You can grab it here. Source.
To flash this kernel you can use a script like this one.

To lock the GPU frequency to the lowest frequency possible (177MHz) do the following. This will automatically lower the voltage as well (see cat /sys/devices/11800000.mali/vol  before and after the change).

apt-get install sysfsutils
vi /etc/sysfs.conf

---
# lower mali gpu clock to min (Kernel 3.10)
devices/11800000.mali/dvfs_max_lock = 177

# UPDATE: for Kernel 4.9 do the following
devices/platform/11800000.mali\:/devfreq/11800000.mali\:/governor = powersave

# UPDATE2: for Kernel 4.14 do the following
devices/platform/11800000.mali/devfreq/devfreq0/governor = powersave
---

service sysfsutils start
I did some measurements with a power meter and this change reduced the power consumption by 0.7 – 0.8W. At first glance, this doesn’t sound that much, but it’s a reduction of about 20% compared to the idle power consumption of an ODROID-XU4 with ondemand governor, which is just 3-4W!
The SOC will be 1-3°C cooler as well 🙂 Perfect for headless servers.