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

    Display frontend on VGA666 CRT instead of HDMI with Pi4 and KMS

    Scheduled Pinned Locked Moved Help and Support
    kms drivervga666libretroattractmodehdmi
    3 Posts 2 Posters 790 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.
    • T
      TomBruise
      last edited by

      Hello! I am using RetroPie 4.8.4 on a Pi4. Image was installed using RaspberryPi Imager.
      I am using libretro from master (installed from source after instructing retropie-setup.sh to fetch from master).

      I have a setup with a CRT screen connected to a VGA666 adapter, and a second screen connected via HDMI to be used as a dynamic marquee.

      Using fkms/legacy I am able to display emulators/frontends (tried with attractmode and emulationstation) on the CRT screen while the HDMI is connected. To my understanding, this is accomplished with these lines in config.txt:

      enable_dpi_lcd=1
      display_default_lcd=1
      

      I then switched to KMS, mainly because I am interested in using the KMS-based SwitchRes integration recently added in Retroarch. After generating an EDID for the CRT screen using SwitchRes, I am able to display emulators on the CRT screen when the HDMI marquee is unplugged.

      When I boot with the marquee plugged in (either HDMI 0 or 1) , the HDMI screen becomes the "main" display, emulators are shown there instead of the CRT, and I can only see console output on the CRT.

      What is the correct way to display frontends and emulators on the CRT with KMS and this configuration?

      I am attaching my config and cmdline files below.

      Thanks!

      config.txt:

      # For more options and information see
      # http://rpf.io/configtxt
      # Some settings may impact device functionality. See link above for details
      
      # uncomment if you get no picture on HDMI for a default "safe" mode
      #hdmi_safe=1
      
      # uncomment this if your display has a black border of unused pixels visible
      # and your display can output without overscan
      #disable_overscan=1
      
      # uncomment the following to adjust overscan. Use positive numbers if console
      # goes off screen, and negative if there is too much border
      #overscan_left=16
      #overscan_right=16
      #overscan_top=16
      #overscan_bottom=16
      
      # uncomment to force a console size. By default it will be display's size minus
      # overscan.
      #framebuffer_width=1280
      #framebuffer_height=720
      
      # uncomment if hdmi display is not detected and composite is being output
      #hdmi_force_hotplug=1
      
      # uncomment to force a specific HDMI mode (this will force VGA)
      #hdmi_group=1
      #hdmi_mode=1
      
      # uncomment to force a HDMI mode rather than DVI. This can make audio work in
      # DMT (computer monitor) modes
      #hdmi_drive=2
      
      # uncomment to increase signal to HDMI, if you have interference, blanking, or
      # no display
      #config_hdmi_boost=4
      
      # uncomment for composite PAL
      #sdtv_mode=2
      
      #uncomment to overclock the arm. 700 MHz is the default.
      #arm_freq=800
      
      # Uncomment some or all of these to enable the optional hardware interfaces
      #dtparam=i2c_arm=on
      #dtparam=i2s=on
      #dtparam=spi=on
      
      # Uncomment this to enable infrared communication.
      #dtoverlay=gpio-ir,gpio_pin=17
      #dtoverlay=gpio-ir-tx,gpio_pin=18
      
      # Additional overlays and parameters are documented /boot/overlays/README
      
      # Enable audio (loads snd_bcm2835)
      dtparam=audio=on 
      dtparam=i2c_arm=off
      dtparam=i2s=off
      dtparam=spi=off
      enable_uart=0
      boot_delay=5
      
      [pi4]
      # Enable DRM VC4 V3D driver on top of the dispmanx display stack
      #dtoverlay=vc4-fkms-v3d
      #dtoverlay=vga666
      
      dtoverlay=vc4-kms-v3d-pi4,nohdmi0
      dtoverlay=vc4-kms-vga666,ddc
      
      
      gpio=2-21=a2
      disable_overscan=1
      max_framebuffers=2
      enable_dpi_lcd=1
      display_default_lcd=1
      dpi_group=2
      dpi_mode=87
      hdmi_drive=1
      hdmi_timings 320 1 15 30 42 240 1 4 3 15 1 0 0 60 0 6400000 1
      

      cmdline.txt:

      console=serial0,115200 console=tty1 root=PARTUUID=e643d180-02 rootfstype=ext4 fsck.repair=yes rootwait loglevel=3 consoleblank=0 plymouth.enable=0 video=VGA-1:320x240M@60e drm.edid_firmware=VGA-1:arcade_15.bin video=HDMI-A-1:800x600@60e
      
      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by mitu

        [...]
        What is the correct way to display frontends and emulators on the CRT with KMS and this configuration?
        [...]

        I'm surprised this configuration worked with fkms, but I think it's no longer going to work on kms alone. I've seen your - similar - post on the RPI forums, the definitive answer if this configuration is supported should come from a RP engineer (6by9 is their expert on this).

        EDIT: one thing to note, the RetroPie image is currently based on the legacy RaspiOS buster version, a lot of work has been done on the pure KMS driver on the current Linux kernel. You can get the current RP Linux kernel with rpi-update (not recommended) or by manually installing RetroPie on current RaspiOS bullseye (still in beta at the moment), my recommendation would be the latter.

        I guess you're using the RetroArch master for the switchres support added after v1.15 ?

        T 1 Reply Last reply Reply Quote 0
        • T
          TomBruise @mitu
          last edited by TomBruise

          @mitu said in Display frontend on VGA666 CRT instead of HDMI with Pi4 and KMS:

          Thanks for taking the time to answer!

          I'm surprised this configuration worked with fkms, but I think it's no longer going to work on kms alone. I've seen your - similar - post on the RPI forums, the definitive answer if this configuration is supported should come from a RP engineer (6by9 is their expert on this).

          Yeah, that's the first place I asked. I was hoping it was some stupid mistake on my side.

          EDIT: one thing to note, the RetroPie image is currently based on the legacy RaspiOS buster version, a lot of work has been done on the pure KMS driver on the current Linux kernel. You can get the current RP Linux kernel with rpi-update (not recommended) or by manually installing RetroPie on current RaspiOS bullseye (still in beta at the moment), my recommendation would be the latter.

          I did try a rpi-update as an extreme attempt, ready to start from scratch. Unfortunately the situation didn't change.

          The other idea is to have a second Pi driving the marquee, which is a solution I have mostly working with one last annoying quirk that I wasn't able to iron out yet.
          It would be great to do everything from one device though.

          I guess you're using the RetroArch master for the switchres support added after v1.15 ?

          Yes that's correct. And it seems to work great, possibly much better than the "old" Pi3-style runcommand trickery based on fbset and vcgencmd.

          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.