ODROID XU4 GPU speed never changes with simple_ondemand governor

Post Reply
AnnaVT
Posts: 5
Joined: Tue May 19, 2020 11:24 pm
languages_spoken: english
ODROIDs: XU4
Has thanked: 2 times
Been thanked: 1 time
Contact:

ODROID XU4 GPU speed never changes with simple_ondemand governor

Post by AnnaVT »

I know my code is using the GPU because it runs over 2x faster when the GPU is at 600MHz, but in simple_ondemand mode the GPU stays at 177MHz no matter what the code is doing. What triggers the GPU frequency to change in this mode? Is there anything I need to do to set it up?

My goal in figuring this out is to reduce my ODROID's temperature and power consumption a bit while still allowing the code to run fast. With the GPU constantly at 600MHz, it gets real hot and causes problems. I see in /sys/devices/platform/11800000.mali/devfreq/11800000.mali/available_frequencies that there are more than just 177MHz and 600MHz available - can I manually set the GPU to one of the middle values?

Running Ubuntu 18.04 kernel 4.14.173-173.

Thanks!

User avatar
odroid
Site Admin
Posts: 35297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1089 times
Been thanked: 824 times
Contact:

Re: ODROID XU4 GPU speed never changes with simple_ondemand governor

Post by odroid »

As far as I know, there are only two steps for the GPU DVFS.

Try using the Streamline debugger to monitor the GPU usage first.
https://wiki.odroid.com/odroid-xu4/appl ... ine_on_xu4

It is also very worth to keep checking the SoC temperature. The fifth sensor is placed near the GPU.

Code: Select all

odroid@odroid:~$ cat /sys/devices/virtual/thermal/thermal_zone*/temp            
49000                                                                           
51000                                                                           
50000                                                                           
49000                                                                           
52000
These users thanked the author odroid for the post:
AnnaVT (Fri Sep 04, 2020 10:39 pm)

AreaScout
Posts: 1432
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 65 times
Been thanked: 218 times
Contact:

Re: ODROID XU4 GPU speed never changes with simple_ondemand governor

Post by AreaScout »

    @AnnaVT

    It's working at least on 5.4.61 kernel, I don't have 4.14 installed but here is the output of 5.4.x kernel:

    Code: Select all

    root@openmediavault:~# cat /sys/devices/platform/soc/11800000.gpu/devfreq/11800000.gpu/governor
    simple_ondemand
    
    root@openmediavault:~# cat /sys/devices/platform/soc/11800000.gpu/devfreq/11800000.gpu/trans_stat
         From  :   To
               : 600000000 543000000 480000000 420000000 350000000 266000000 177000000   time(ms)
      600000000:         0         0         0         0         0         1         1  30192840
      543000000:         0         0         0         0         0         0         0         0
      480000000:         0         0         0         0         0         0         0         0
      420000000:         0         0         0         0         0         0         0         0
      350000000:         0         0         0         0         0         0         0         0
      266000000:         0         0         0         0         0         0         1       110
    * 177000000:         2         0         0         0         0         0         0  72410610
    Total transition : 5
    
    As you can see with no GPU activity it's on the lowest frequency 177Mhz and with some GPU activity it's

    Code: Select all

    root@openmediavault:~# cat /sys/devices/platform/soc/11800000.gpu/devfreq/11800000.gpu/trans_stat
         From  :   To
               : 600000000 543000000 480000000 420000000 350000000 266000000 177000000   time(ms)
      600000000:         0         2         0         0         1         1         1  30221710
      543000000:         1         0         1         0         0         0         0      6760
    * 480000000:         0         0         0         0         0         0         0      1700
      420000000:         0         0         0         0         0         0         0         0
      350000000:         1         0         0         0         0         0         0       240
      266000000:         0         0         0         0         0         0         1       110
      177000000:         3         0         0         0         0         0         0  72855240
    Total transition : 12
    
    That works very precisely !

    RG
    These users thanked the author AreaScout for the post:
    AnnaVT (Fri Sep 04, 2020 10:37 pm)

    AnnaVT
    Posts: 5
    Joined: Tue May 19, 2020 11:24 pm
    languages_spoken: english
    ODROIDs: XU4
    Has thanked: 2 times
    Been thanked: 1 time
    Contact:

    Re: ODROID XU4 GPU speed never changes with simple_ondemand governor

    Post by AnnaVT »

    odroid wrote:
    Fri Sep 04, 2020 11:26 am
    As far as I know, there are only two steps for the GPU DVFS.

    Try using the Streamline debugger to monitor the GPU usage first.
    https://wiki.odroid.com/odroid-xu4/appl ... ine_on_xu4

    It is also very worth to keep checking the SoC temperature. The fifth sensor is placed near the GPU.

    Code: Select all

    odroid@odroid:~$ cat /sys/devices/virtual/thermal/thermal_zone*/temp            
    49000                                                                           
    51000                                                                           
    50000                                                                           
    49000                                                                           
    52000
    Thanks!. Does anything like Streamline exist to monitor the GPU via terminal? My system is headless. Is the die temp part of what triggers the speed changes?

    @AreaScout, hmmm. My trans_stat shows no changes, stuck at 177 no matter what. I'm kind of stuck with this kernel for the moment but that's a good incentive to try an update at some point...

    I just figured out how to set the frequency manually, per a post here: https://github.com/ARM-software/Compute ... issues/225

    Code: Select all

    cd /sys/devices/platform/11800000.mali/devfreq/11800000.mali
    echo userspace > governor
    echo $freq > userspace/set_freq
    I've been manually switching between performance and powersave anyway, so that will at least give me some more flexibility.

    AreaScout
    Posts: 1432
    Joined: Sun Jul 07, 2013 3:05 am
    languages_spoken: german, english
    ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
    N1, Go, VU5A, Show2, CloudShell2,
    H2, N2, VU7A, VuShell, Go2, C4
    Has thanked: 65 times
    Been thanked: 218 times
    Contact:

    Re: ODROID XU4 GPU speed never changes with simple_ondemand governor

    Post by AreaScout »

      Ah ok, I was about to post the solution, anyway here is it again no matter if you have figured out it already

      Code: Select all

      root@openmediavault:~# echo userspace > /sys/devices/platform/soc/11800000.gpu/devfreq/11800000.gpu/governor
      root@openmediavault:~# echo 543000000 > /sys/devices/platform/soc/11800000.gpu/devfreq/11800000.gpu/userspace/set_freq
      
      I haven't played around with ARM Streamline Performance Analyzer but it looks like it has an option to remote connect to a machine and analyze data there

      RG

      Post Reply

      Return to “Ubuntu”

      Who is online

      Users browsing this forum: Baidu [Spider], hkim and 3 guests