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

    Howto : optimized /boot/config.txt

    Scheduled Pinned Locked Moved Ideas and Development
    raspberry pi 4boot configoverclocking
    4 Posts 3 Posters 9.1k 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
      bilu
      last edited by

      Below my simplified /boot/config.txt (Rpi4 4GB, HW version 1.1), followed by explanations.

      disable_splash=1
      disable_overscan=1
      hdmi_group=1
      hdmi_mode=4
      hdmi_drive=2
      hdmi_ignore_cec_init=1
      arm_freq=2048
      v3d_freq=750
      over_voltage=6
      dtparam=i2c_arm=on
      dtparam=audio=on
      enable_uart=1
      [pi4]
      dtoverlay=vc4-fkms-v3d
      [all]
      hdmi_enable_4kp60=1

      Hardware revision?
      www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
      www.cnx-software.com/2020/02/24/raspberry-pi-4-rev-1-2-fixes-usb-c-power-issues-improves-sd-card-resilience/

      Seems my RPi4 version is more sensitive to what chargers I can use, therefore limits overclocking options.

      cat /proc/cpuinfo | grep Revision
      Revision : c03111

      Overclocking
      Reference: www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md

      These are the speeds I achieve with arm_freq=2048. arm_freq=2047 reports a lower scaling_max_freq which can be noticed in games like God of War: Chains of Olympus (one of the games I used as benchmark). v3d_freq=750 is the max GPU overclock, over_voltage=6 required to provide extra juice (over_voltage=5 worked for me with arm_freq=2000).

      cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      2194967

      echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
      vcgencmd measure_clock arm
      frequency(48)=2048519552

      As for hdmi_enable_4kp60=1 I also use it for overclocking reasons, as the only way to increase the GPU core_freq from 500 to 550, enable_tvout underclocks to 360:
      "Specific to Pi 4B: The core_freq of the Raspberry Pi 4 can change from the default if either hdmi_enable_4kp60 or enable_tvout are used, due to relationship between internal clocks and the particular requirements of the requested display modes."

      HDMI options and resolution
      Reference: www.raspberrypi.org/documentation/configuration/config-txt/video.md

      hdmi_group=1, hdmi_mode=4, hdmi_drive=2 : these options set the RPi at 16:9 720p using the standard CEA TV timings and sending audio through HDMI.

      hdmi_ignore_cec_init=1 "prevents a CEC-enabled TV from coming out of standby and channel-switching when you are rebooting your Raspberry Pi."
      Channel switching on reboots was quite annoying indeed :)

      No gpu_mem parameters??
      Reference: www.raspberrypi.org/documentation/configuration/config-txt/memory.md

      That's right! :) "On the Raspberry Pi 4 the 3D component of the GPU has its own memory management unit (MMU), and does not use memory from the gpu_mem allocation. Instead memory is allocated dynamically within Linux. This may allow a smaller value to be specified for gpu_mem on the Pi 4, compared to previous models."

      The performance of N64 Conker's Bad Fur Day increased noticeably after removing all gpu_mem parameters.

      mituM D 2 Replies Last reply Reply Quote 0
      • B
        bilu
        last edited by

        My other relevant threads
        https://retropie.org.uk/forum/topic/27429/howto-emulator-performance-tweaks-for-psp-and-n64-and-quality-for-psx
        https://retropie.org.uk/forum/topic/27431/howto-major-performance-boost-on-retroarch-based-emulators
        https://retropie.org.uk/forum/topic/27428/howto-change-output-resolution-to-720p-on-libretro-retroarch-emulators

        1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @bilu
          last edited by

          @bilu The gpu_mem parameters are still needed for the GPU's video decoders (MP4/MP5). Without it set up to at least 256M, you'll get issues when playing videos.

          Regarding the other settings

          • RetroPie allows you to switch to the performance governor through the Runcommand settings, so you don't need to manually do that.
          • hdmi_drive is ignored on the PI4
          1 Reply Last reply Reply Quote 1
          • D
            downerhouse @bilu
            last edited by

            @bilu just to say thanks. To date, I've been underwhelmed by the PI4 performance since I swapped from my pi3.

            I've been struggling with all kinds of screen tearing issues, despite overclocking to 2.1ghz.

            I borrowed this configuration and everything is now running buttery smooth.

            Thanks for sharing.

            1 Reply Last reply 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.