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
The SOC will be 1-3°C cooler as well 🙂 Perfect for headless servers.
For all the alarm (arch linux arm) users who cannot use the debian/ubuntu sysfsutils mentioned here:
Create
# 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’:
KERNEL==”11800000.gpu”
SUBSYSTEM==”devfreq”
DRIVER==””
ATTR{available_frequencies}==”177000000 266000000 350000000 420000000 480000000 543000000 600000000″
ATTR{available_governors}==”userspace powersave performance simple_ondemand”
ATTR{cur_freq}==”177000000″
ATTR{governor}==”powersave”
ATTR{max_freq}==”600000000″
ATTR{min_freq}==”177000000″
ATTR{name}==”11800000.gpu”
ATTR{power/control}==”auto”
ATTR{power/runtime_active_time}==”0″
ATTR{power/runtime_status}==”unsupported”
ATTR{power/runtime_suspended_time}==”0″
ATTR{target_freq}==”177000000″
Have fun!
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.
Hey, thanks for letting me know. I did forget to update the post for 4.14 kernel. Fixed now 🙂
Realy realy great. Thank you for this great tip.
Will this work with 4.9.x branch?
Have a look at the post. I updated it 🙂
Thanks for posting your patched 4.9 build, I meant has the 4.9.y source pulled in this change and it looks like it hasn’t so I still need to patch this manually for my own builds from the hardkernel repo.
https://github.com/hardkernel/linux/blob/odroidxu4-4.9.y/drivers/gpu/arm/midgard/platform/exynos5422/mali_kbase_config_platform.h
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. 😉
Greetz,
Zeg
Can you please explain how to upgrade to your kernel which has mali support?
Reason why I am asking is because the default kernel for OMV3 doesn’t have mali support. I tried with your script but it doesn’t work: https://gist.github.com/Obihoernchen/28c02a8eeb37f816b4f3e9ea6f150f42 <- I have commented on your gist. Thank you for your work. Much appreciated.
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
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
powersave
# cat /sys/devices/platform/11800000.mali\:/devfreq/11800000.mali\:/cur_freq
177000000
Could you explain why you switch to your own custom Kernel ? Are there any advantages or did you customized it for a private project ?
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.
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?
Thanks!
Then you probably have to update your kernel to include more advanced mali settings.
You can get the latest 3.10 kernel from my ftp: ftp://obihoernchen.net/ODROID-XU4-KERNEL/
Works fine on omv 2.2.8.
Thank you!
Thanks for your guides man !
All others worked fine but this one seems to not working for me.
Can you help me ?
I need some more information to help you 😉