RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Changing resolution and refresh rate on the fly on the Pi 4 - any news?

    Scheduled Pinned Locked Moved Help and Support
    refresh ratefkmskmspi 4script
    10 Posts 3 Posters 1.8k 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.
    • A
      Amplifuzz
      last edited by

      I'm porting a script I made for the older Pis to the 4, to dynamically change the monitor refresh rate depending on a specific game or system in Retropie.

      The main part goes like this:

      vcgencmd hdmi_cvt $x_res $y_res $refresh 0 0 0 1
      tvservice -e "DMT 87"
      fbset -depth 8
      fbset -depth 16

      It's always worked flawlessly on the 3b+, but results in a black screen on the Pi 4. Apparently it can't work anymore due the switch to FKMS. Is there a way to do it on the Pi 4 yet? Or a way to disable FKMS? Emulationstation refuses to launch if I do that in config.txt

      1 Reply Last reply Reply Quote 0
      • A
        Amplifuzz
        last edited by

        I'm porting a script I made for the older Pis to the 4, to dynamically change the monitor refresh rate depending on a specific game or system in Retropie.

        The main part goes like this:

        vcgencmd hdmi_cvt $x_res $y_res $refresh 0 0 0 1
        tvservice -e "DMT 87"
        fbset -depth 8
        fbset -depth 16

        It's always worked flawlessly on the 3b+, but results in a black screen on the Pi 4. Apparently it can't work anymore due the switch to FKMS. Is there a way to do it on the Pi 4 yet? Or a way to disable FKMS? Emulationstation refuses to launch if I do that in config.txt

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

          Please don't double post, it's enough to post your topic in a single category.

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

            RetroArch recently merged a change to allow the resolution switching based on custom resolutions ( based on a hdmi_timings config ) - 11590.
            RetroArch also has an CRT Switch Resolution feature, supporting the KMS/DRM video drivers for the Pi4 is not yet part of it, but it's planned/worked on.

            M 1 Reply Last reply Reply Quote 0
            • M
              myzar @mitu
              last edited by

              @mitu I'm very interested to this, i use a crt cab and we miss resolution switching badly , so i've tried adding

              crt_switch_timings = "1920 1 152 247 280 240 1 3 7 12 0 0 0 60 0 40860000 1"

              in retroarch.cfg , but doesn't seem to do anything useful

              https://pastebin.com/W9i88zUW

              Is this supposed to work with vc4-fkms-v3d ?

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

                @myzar said in Changing resolution and refresh rate on the fly on the Pi 4 - any news?:

                Is this supposed to work with vc4-fkms-v3d ?

                I think so, but the change is in RetroArch's master branch and it will be available in version 1.9.1, while RetroPie has 1.8.8.

                M 1 Reply Last reply Reply Quote 0
                • M
                  myzar @mitu
                  last edited by

                  @mitu yeah i know but i've compiled master Built: Dec 3 2020 Version: 1.9.0 Git: db2cd8f , this is newer than the merged commit referred here , should i ask in the pull https://github.com/libretro/RetroArch/pull/11590 if it is going to do anything ?

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

                    @myzar Make sure you have video_fullscreen = yes set also, if that still doesn't work, you can add your log to the PR and ask the author - maybe further configuration is needed.

                    EDIT: you should also make sure you're editing the correct retroarch.cfg, the log file doesn't show which one is used.

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      myzar @mitu
                      last edited by

                      @mitu my bad i was using the vulkan driver it doesn't do anything with that, i have switched back to gl and now it does something

                      [INFO] [DRM]: Connector 0 assigned to monitor index: #1.
                      [INFO] [DRM]: Mode 0: (FIXED_MODE) 320 x 240, 60 Hz
                      [INFO] [GL]: Found GL context: kms
                      [INFO] [GL]: Detecting screen resolution 1920x240.
                      [INFO] [DRM]: custom mode requested: CRT_1920x240_60
                      [INFO] [EGL] Falling back to eglGetDisplay
                      [INFO] [EGL]: EGL version: 1.4
                      [INFO] [EGL]: Current context: 0xaa81ffa8.
                      [INFO] [KMS]: New FB: 1920x240 (stride: 7680).
                      [INFO] [GL]: Vendor: Broadcom, Renderer: V3D 4.2.
                      [INFO] [GL]: Version: OpenGL ES 3.1 Mesa 21.0.0-devel (git-872c4bcd27).
                      [INFO] [GL]: Using resolution 1920x240
                      [INFO] [GL]: Default shader backend found: glsl.
                      

                      But it's pretending that it switched res it's delusional like fbset , let me try to explain even tho english isn't my native language , it thinks to be @ 1920x240 but it's still drawing @ 320x240 , the result is that everything is super mega giant like you zoomed with a 4x multiplier.
                      The point is that isn't really switching res , i'm sure because i can put bogus values which my monitor wouldn't be able to sync. Such a shame i was so excited we miss pixel perfects res badly on the rpi4

                      1 Reply Last reply Reply Quote 0
                      • M
                        myzar
                        last edited by

                        it was too good to be true :( i was right it doesn't work https://github.com/libretro/RetroArch/pull/11590#issuecomment-743402918

                        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.