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.

17 thoughts on “Lower GPU clock of ODROID-XU4 for headless servers to save energy”

  1. For all the alarm (arch linux arm) users who cannot use the debian/ubuntu sysfsutils mentioned here:
    # vi /etc/udev/rules.d/50-gpu-scaling-governor.rules
    SUBSYSTEM==”devfreq”, ACTION==”add”, KERNEL==”11800000.gpu”, RUN+=”/bin/sh -c ‘echo powersave > /sys/devices/platform/soc/11800000.gpu/devfreq/11800000.gpu/governor'”

    check it after reboot with

    # udevadm info –attribute-walk –path=/devices/platform/soc/11800000.gpu/devfreq/11800000.gpu

    looking at device ‘/devices/platform/soc/11800000.gpu/devfreq/11800000.gpu’:
    ATTR{available_frequencies}==”177000000 266000000 350000000 420000000 480000000 543000000 600000000″
    ATTR{available_governors}==”userspace powersave performance simple_ondemand”

    Have fun!

  2. Not sure if I did it the right way, but on Linux kernel 4.14 I had to set the path as:

    devices/platform/11800000.mali/devfreq/devfreq0/governor = powersave

    Also doing a “service sysfsutils start” didn’t update the governor. But a reboot worked.

        1. Hi folks,
          to prevent mixups since OMV3 has evolved as well:
          The latest OMV distro with (…37) and relevant kernel need no further tuning and contain the latest tweaks already (except the useful enlargement of the system graphs of OMV and Temp measurements).

          Nevertheless, if you want to have the very latest tiny improvements, just exchange the actual default /etc/init.d/armhwinfo with this one: https://github.com/armbian/build/blob/c36918212fd6ff1db933d5e8873a2ef3d4e2941a/packages/bsp/common/etc/init.d/armhwinfo#L90-L102 and you’re done. Nothing to struggle. 😉


        1. Hi,

          I wrote this way back for OMV2. I think it’s not compatible with a new OMV3 installation in it’s current state.

          The default OMV3 kernel has no mali support? Do you use the newest one from armbian?
          I have one Odroid XU-4 with default OMV3 kernel as well and mali is supported:

          # apt-cache policy linux-image-next-odroidxu4
          Installed: 5.32.170727
          Candidate: 5.32.170727
          Package pin: (not found)
          Version table:
          *** 5.32.170727 500
          500 http://apt.armbian.com/ jessie/main armhf Packages
          100 /var/lib/dpkg/status

          # cat /proc/version
          Linux version 4.9.37-odroidxu4 (root@devel) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05) ) #18 SMP PREEMPT Wed Jul 26 22:23:31 CEST 2017

          # cat /sys/devices/platform/11800000.mali\:/devfreq/11800000.mali\:/governor

          # cat /sys/devices/platform/11800000.mali\:/devfreq/11800000.mali\:/cur_freq

  3. Could you explain why you switch to your own custom Kernel ? Are there any advantages or did you customized it for a private project ?

    1. Back when I wrote this I wanted to have xfs support and kernel updates. Because OMV or debian don’t provide kernel updates for the XU4.

      The official hardkernel repo was kind of outdated, so I forked the official kernel, updated it, added xfs support, wrote a small script to automate the update process and compiled it with a newer toolchain. Now I can recompile it every time there is a new minor kernel release.

      Today the hardkernel repo is faster with updates and except xfs support my repo is the same.

  4. Hi there, I’m trying to change this but I don’t see the file “vol” in the directory /sys/devices/11800000.mali/. How did you acquire that file?

    Also, is there a way to show in real time the GPU frequency as well?


  5. Thanks for your guides man !
    All others worked fine but this one seems to not working for me.
    Can you help me ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.