• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Overclocking the Pi3b+ GPU (Results)

Scheduled Pinned Locked Moved General Discussion and Gaming
pi3 b+overclockgpu
133 Posts 18 Posters 39.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    Brunnis @dankcushions
    last edited by Brunnis 2 Sept 2019, 14:02 9 Feb 2019, 08:44

    @dankcushions said in Overclocking the Pi3b+ GPU (Results):

    @Brunnis said in Overclocking the Pi3b+ GPU (Results):

    @dankcushions

    i think the sampling_down_factor might be the one we would tweak:

    • sampling_down_factor:

      This parameter controls the rate at which the kernel makes a decision

      on when to decrease the frequency while running at top speed. When set

      to 1 (the default) decisions to reevaluate load are made at the same

      interval regardless of current clock speed. But when set to greater

      than 1 (e.g. 100) it acts as a multiplier for the scheduling interval

      for reevaluating load when the CPU is at its top speed due to high

      load. This improves performance by reducing the overhead of load

      evaluation and helping the CPU stay at its top speed when truly busy,

      rather than shifting back and forth in speed. This tunable has no

      effect on behavior at lower speeds/lower CPU loads.

    I don't think that will work either. The problem is, again, that the average load is too low. Whether we stretch out the sample period over 1, 2, 10 frames, the average load will be close to the same and far below the required 95% that's needed to stay at the highest speed.

    agree i think you’d also have to raise that threshold also (which is possible)

    Well, if you tweak the "ondemand" governor so that it considers the emulator load to be high enough to not down clock inbetween frames, then it will perform the same as the "performance" governor. But then there's no point in doing the optimization in the first place, since it won't save you any power consumption over the "performance" governor anyway!

    for those situations, absolutely, but the issue is that using the performance governer puts ALL applications launched via run command at full speed, which includes multithreaded or otherwise low-load applications (kodi, pixel desktop (??), maybe even some emulators like gambette, etc). i still like the idea of finding a way to make the ondemand governer work for us.

    I was still stuck in thinking emulation (for which I’m not convinced ondemand is a great idea). I agree for Kodi and the likes.

    As for trying out an optimization: I’d start out by either testing half as long sampling_rate OR decreasing the up_threshold to something like 50%. It won’t fix all possible performance issues, but there’s a good chance it’s much better than the defaults for the RetroPie use case.

    1 Reply Last reply Reply Quote 1
    • R
      Rascas
      last edited by 9 Feb 2019, 16:47

      Here is the default settings of Libreelec:
      https://github.com/LibreELEC/LibreELEC.tv/blob/libreelec-9.0/projects/RPi/initramfs/platform_init
      I believe they are the same now on Raspbian/RetroPie. The only difference is the io_is_busy, which improves performance when in heavy reading/writing to the sdcard, for example streaming a torrent. But probably not so usefull for emulation.

      H 1 Reply Last reply 9 Feb 2019, 23:26 Reply Quote 2
      • H
        hhromic @Rascas
        last edited by 9 Feb 2019, 23:26

        @Rascas said in Overclocking the Pi3b+ GPU (Results):

        I believe they are the same now on Raspbian/RetroPie.

        Can confirm from one of my Raspbian devices:

        /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy: 0
        /sys/devices/system/cpu/cpufreq/ondemand/up_threshold: 50
        /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate: 100000
        /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor: 50
        
        1 Reply Last reply Reply Quote 0
        • S
          Silent
          last edited by 10 Feb 2019, 09:31

          I really like the snippet with setting individual emulators to performance governor! I'd love to have that set eg. for PSX but I wouldn't necessarily want it for GBC or Kodi. Onstart sounds like a good way to optimally utilize the option!

          1 Reply Last reply Reply Quote 0
          • Q
            quicksilver
            last edited by quicksilver 26 Feb 2019, 13:27

            So after a lot of testing it looks like the two pi3b+'s are stable at 590mhz core_freq and 615mhz respectively. Compared to my 3b which was stable up to 565mhz core_freq this is a pretty good jump. My old pi2's were only stable up to 525 and 535mhz core_freq. And they are all supposed to have the same GPU which means there must be some improvements with the manufacturing process from each generation of pi or perhaps power regulation is better too. I know that my testing sample is fairly small but there is a clear trend in the 6-7 different pis I have tested that shows that even though the GPU is the same in all models, later models definitely seem to have more GPU overclocking headroom. While this may not mean much to most people, it makes a noticeable difference when trying to run N64 or Dreamcast games that are right on the edge of being playable, in some cases an overclock is just enough to push it into the playable zone.

            I should also note that while its often discussed that the CPU is not the bottleneck for N64 emulation on the pi, this is only true of the pi3b and 3b+. Going back and testing my pi2's there were quite a few N64 games that were pushing its cpu past 100% usage, even when overclocked to 1075mhz.

            M B 2 Replies Last reply 26 Feb 2019, 13:46 Reply Quote 0
            • M
              mitu Global Moderator @quicksilver
              last edited by 26 Feb 2019, 13:46

              @quicksilver said in Overclocking the Pi3b+ GPU (Results):

              I should also note that while its often discussed that the CPU is not the bottleneck for N64 emulation on the pi, this is only true of the pi3b and 3b+.

              Well, the PI3B / 3B+ have a slightly different CPU than the Pi2:

              • PI2 - Broadcom BCM2836 SoC, with quad-core ARM Cortex-A7 900 MHz processor
              • PI3B/3B+ - Broadcom BCM2837 SoC, with quad-core ARM Cortex-A53 1200 MHz processor
              Q H 2 Replies Last reply 26 Feb 2019, 13:49 Reply Quote 0
              • Q
                quicksilver @mitu
                last edited by 26 Feb 2019, 13:49

                @mitu correct, just the GPU has remained the same. I just felt it was important distinction to make, especially for those using older pi devices.

                1 Reply Last reply Reply Quote 1
                • H
                  hhromic @mitu
                  last edited by hhromic 26 Feb 2019, 13:50

                  Also don't forget that the RPI2 has two revisions, one with BCM2836 and another with BCM2837 (underclocked).

                  09c63171-a59d-4a96-a711-346c63e86da0-image.png

                  Ref: https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
                  Ref: https://elinux.org/RPi_HardwareHistory

                  Q 1 Reply Last reply 26 Feb 2019, 13:53 Reply Quote 0
                  • Q
                    quicksilver @hhromic
                    last edited by 26 Feb 2019, 13:53

                    @hhromic Interesting! I think I remember hearing that, though I had forgotten about it. Something to the effect that they took the BCM2837's that couldnt handle being clocked at 1200 mhz and used them on the revised pi2's.

                    1 Reply Last reply Reply Quote 1
                    • B
                      Brunnis @quicksilver
                      last edited by 28 Feb 2019, 08:27

                      @quicksilver Thanks for the results! Out of curiosity, how does the instability manifest itself when you push the core_freq too far? I'm asking because I just changed from using a large heatsink sandwich to a Flirc case and I'm having issues. With the previous heatsink, I had run stability tests for days in total and saw no issues at all. With the Flirc case, I quickly ran into a few issues:

                      • Crash (black screen) while at Raspbian desktop
                      • Floating point error while running sysbench (within 30 minutes)
                      • Tainted kernel (memory paging issue) while idling in RetroPie over night. EmulationStation still running, but not responding to input.

                      My current quess is that these issues have mainly cropped up due to a temperature difference. The Flirc case is not as good at cooling the Pi as the heatsink sandwich and this probably pushes the system over the edge. It still doesn't explain the tainted kernel issue at idle, though. Maybe that issue was there before changing case.

                      I'm going to try three things:

                      • Increase CPU voltage one step
                      • Lower core_freq overclock from 600 to 550 MHz
                      • Increase SDRAM voltage one step
                      1 Reply Last reply Reply Quote 0
                      • B
                        Brunnis
                        last edited by Brunnis 28 Feb 2019, 10:40

                        A small FYI (I think we've touched on this before in this thread):

                        • On my Pi 3B+, only over_voltage=1 has an effect. Increasing over_voltage setting to 2 or more has no effect at all. Maximum allowed CPU voltage is 1.4V and since my Pi already runs at 1.375V, it makes sense that any setting higher than 1 (which adds 0.025V) would have no effect.
                        • Default SDRAM voltages on my Pi are: sdram_c=1.25V, sdram_i=1.25V, sdram_p=1.225V. The over_voltage_sdram setting assumes 1.20V is default. So, using over_voltage_sdram=1 has no effect on my board (since it's 1.225V, which is the same or lower than the defaults). Using over_voltage_sdram=2 only affects sdram_p (it's raised to 1.25V). Using over_voltage_sdram=3 finally increases voltage on all three SDRAM rails to 1.275V.

                        I don't know if the defaults are the same for all Pi 3B+ boards. Check your voltages with:

                        for id in core sdram_c sdram_i sdram_p ; do echo -e "$id:\t$(vcgencmd measure_volts $id)" ; done
                        

                        Please note that you should put a load on the CPU before running this command, otherwise you'll just see the default 1.2V used in downclocked state.

                        Q 1 Reply Last reply 28 Feb 2019, 12:32 Reply Quote 0
                        • Q
                          quicksilver @Brunnis
                          last edited by quicksilver 28 Feb 2019, 12:32

                          @Brunnis instability from having core freq too high has always shown up for me as a freeze. Quake 3 is running but suddenly locks up, though I can still ssh in and reboot my pi. I should note that my max overclock is only achievable with maximum overvoltage (1.397v, not sure why your pi won't go this high), anything less will freeze very quickly at these speeds. If I overclock v3d frequency too high I get visual artifacts onscreen followed by a freeze.

                          Twice I encountered an issue where I left my pi idle in emulation station to find that it had frozen hours later. One of those times my pi was overheating and my case fan which is programed to turn on at 65C was not on. Not entirely sure what would cause the pi to overheat when idle. But after removing my sdram and CPU overclocks I have not had that issue since. I haven't had time to thoroughly test them yet so I'll just leave them off for now.

                          B 1 Reply Last reply 28 Feb 2019, 12:53 Reply Quote 0
                          • B
                            Brunnis @quicksilver
                            last edited by 28 Feb 2019, 12:53

                            @quicksilver No, you misunderstood me. My Pi also goes up to 1.39V. However, since default voltage is 1.375V, the only over_voltage setting that does anything is over_voltage=1 (which will give 1.39V). The Pi is not allowed to go over 1.4V, so setting over_voltage to 2 or higher will still result in the same 1.39V as over_voltage=1.

                            Thanks for sharing your experience. That over heating condition sounds...weird. I have modified a few of my overclock settings and will see if that helps (lowered core_freq from 600 to 550, lowered video related clocks from 400 to 367 and increased SDRAM voltages by 0.025V).

                            arm_freq=1475
                            core_freq=550
                            v3d_freq=367
                            h264_freq=367
                            isp_freq=367
                            sdram_freq=550
                            over_voltage=1
                            over_voltage_sdram_c=3
                            over_voltage_sdram_i=3
                            over_voltage_sdram_p=2
                            temp_soft_limit=70

                            Q 1 Reply Last reply 28 Feb 2019, 14:46 Reply Quote 0
                            • Q
                              quicksilver @Brunnis
                              last edited by quicksilver 28 Feb 2019, 14:46

                              @Brunnis are you sure about the over voltage values? I just did a test and this is what I got on my pi3b+:

                              No over voltage= 1.344V
                              Over_voltage 1= 1.369V
                              Over_voltage 2= 1.388V
                              Over_voltage 3= 1.394V (not 1.397v like I said earlier)

                              So for me over_voltage 3 is max setting. Are you sure yours is different?

                              B 1 Reply Last reply 28 Feb 2019, 14:58 Reply Quote 0
                              • B
                                Brunnis @quicksilver
                                last edited by 28 Feb 2019, 14:58

                                @quicksilver Yep, absolutely sure. Default voltage for mine is 1.375V. They probably bin the chips with different default voltages during production, just like AMD and Intel do.

                                So, you're lucky and have received a chip that's two bins lower on the voltage scale than mine!

                                Q 1 Reply Last reply 28 Feb 2019, 18:19 Reply Quote 0
                                • Q
                                  quicksilver @Brunnis
                                  last edited by 28 Feb 2019, 18:19

                                  @Brunnis the official raspberry pi documentation is very vague about this. I see it uses adaptive voltage scaling (is this used based on CPU load?) but their default voltage table doesn't seem very accurate:

                                  "This table describes the overvoltage settings for the various Pi models. The firmware uses Adaptive Voltage Scaling (AVS) to determine the optimum voltage to set. Note that for each integer rise in over_voltage, the voltage will be 25mV higher."

                                  Version Default Overvoltage Setting
                                  Pi 1 1.2V 0
                                  Pi 2 1.2-1.3125V 0
                                  Pi 3 1.2-1.3125V 0
                                  Pi Zero 1.35V 6

                                  B 1 Reply Last reply 1 Mar 2019, 08:17 Reply Quote 0
                                  • B
                                    Brunnis @quicksilver
                                    last edited by 1 Mar 2019, 08:17

                                    @quicksilver Yup, the documentation doesn't really go into details on that. Would be interesting if others reported their default voltages.

                                    By the way, I let my Pi stand on the EmulationStation main menu over night, using the revised overclocking settings posted above. No issues this time. I'll let it run continuously and let you know if the issue is 100% fixed. If so, I don't think I'll investigate which exact setting it was that provided stability. Already spent too much time tinkering with this overclock...

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      Brunnis
                                      last edited by Brunnis 3 Jan 2019, 14:54 1 Mar 2019, 14:47

                                      Ugh... Just locked up again. Video is outputting fine, but USB is down (at the very least). Nothing in /var/log/messages or /var/log/syslog this time. I'll remove overclock settings one by one to see what fixes it. Actually, I should probably start by removing all overclock settings to see if it's even stable at stock...

                                      Q 1 Reply Last reply 1 Mar 2019, 14:52 Reply Quote 0
                                      • Q
                                        quicksilver @Brunnis
                                        last edited by 1 Mar 2019, 14:52

                                        @Brunnis Im am curious about this as well so please report back if you find anything out. Im wondering if the ES freeze issues I have had could be the same or related to yours. Odd that we can hammer the pi with quake 3+sysbench+memtester and run for hours but sitting idle in ES would lock things up?

                                        B 1 Reply Last reply 1 Mar 2019, 14:56 Reply Quote 0
                                        • B
                                          Brunnis @quicksilver
                                          last edited by 1 Mar 2019, 14:56

                                          @quicksilver Yeah, it is quite odd, really. That's why I'll probably let it sit at stock settings over the weekend and see if it can survive that. Then I'll start adding back the overclock. I'll let you know how it goes.

                                          H 1 Reply Last reply 1 Mar 2019, 15:16 Reply Quote 0
                                          • First post
                                            Last post

                                          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                                            This community forum collects and processes your personal information.
                                            consent.not_received