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

    Is there a way to get a cocktail cab experience for basically everything on Rpi4?

    Scheduled Pinned Locked Moved Help and Support
    raspberry pi 4rotate screenikemen-gococktailcocktail mode
    14 Posts 2 Posters 875 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.
    • J
      Jesuszilla @mitu
      last edited by Jesuszilla

      @mitu Which file would I modify? /home/pi/RetroPie/roms/ports/I.K.E.M.E.N GO.sh or /opt/retropie/ports/ikemen-go/ikemen-go.sh?

      The contents of I.K.E.M.E.N GO.sh are as follows

      #!/bin/bash
      "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 _PORT_ "ikemen-go" ""
      

      And the contents of ikemen-go.sh are as follows:

      #!/bin/bash
      export MESA_GL_VERSION_OVERRIDE=2.1
      xset -dpms s off s noblank
      xterm -g 1x1+0-0 -e 'cd /opt/retropie/ports/ikemen-go && ./Ikemen_GO'
      
      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @Jesuszilla
        last edited by mitu

        @Jesuszilla said in Is there a way to get a cocktail cab experience for basically everything on Rpi4?:

        @mitu Which file would I modify? /home/pi/RetroPie/roms/ports/I.K.E.M.E.N GO.sh or /opt/retropie/ports/ikemen-go/ikemen-go.sh?

        Yes, that would be the start script. You'll need to add your own startx command there and make sure that the configs/ports/ikemen-go/emulators.cfg file doesn't containt the XINIT: prefix before the script, since that would start startx before your script.

        J 2 Replies Last reply Reply Quote 0
        • J
          Jesuszilla @mitu
          last edited by

          @mitu Which file? I mentioned two.

          1 Reply Last reply Reply Quote 0
          • J
            Jesuszilla @mitu
            last edited by Jesuszilla

            @mitu I tried editing the /opt/retropie/ports/ikemen-go/ikemen-go.sh file like so and I keep getting errors:

            #!/bin/bash
            export MESA_GL_VERSION_OVERRIDE=2.1
            xset -dpms s off s noblank
            startx -g 1x1+0-0 -e --rotate right --reflect y 'cd /opt/retropie/ports/ikemen-go && ./Ikemen_GO'
            
            

            This is the contents of the run log:

            Parameters: 
            Executing: /opt/retropie/ports/ikemen-go/ikemen-go.sh
            xset:  unable to open display ""
            
            
            X.Org X Server 1.20.4
            X Protocol Version 11, Revision 0
            Build Operating System: Linux 5.4.0-109-generic armv8l Raspbian
            Current Operating System: Linux retropie 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
            Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1280x960M@60 smsc95xx.macaddr=E4:5F:01:69:5C:8A vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=4b235288-02 rootfstype=ext4 fsck.repair=yes rootwait loglevel=3 consoleblank=0 plymouth.enable=0
            Build Date: 04 April 2023  07:50:56AM
            xorg-server 2:1.20.4-1+rpt4+deb10u9 (https://www.debian.org/support) 
            Current version of pixman: 0.36.0
            	Before reporting problems, check http://wiki.x.org
            	to make sure that you have the latest version.
            Markers: (--) probed, (**) from config file, (==) default setting,
            	(++) from command line, (!!) notice, (II) informational,
            	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
            (==) Log file: "/home/pi/.local/share/xorg/Xorg.0.log", Time: Sat Dec 16 23:38:58 2023
            (==) Using system config directory "/usr/share/X11/xorg.conf.d"
            (EE) 
            Fatal server error:
            (EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
            (EE) 
            (EE) 
            Please consult the The X.Org Foundation support 
            	 at http://wiki.x.org
             for help. 
            (EE) Please also check the log file at "/home/pi/.local/share/xorg/Xorg.0.log" for additional information.
            (EE) 
            (EE) Server terminated with error (1). Closing log file.
            xinit: giving up
            xinit: unable to connect to X server: Connection refused
            xinit: server error
            
            

            I already added my pi user to the tty and video groups, so I don't know what to do

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

              @Jesuszilla said in Is there a way to get a cocktail cab experience for basically everything on Rpi4?:

              I already added my pi user to the tty and video groups, so I don't know what to do

              This looks like an error from the legacy xserver wrapper - do you have the xserver-xorg-legacy package installed ? If so, remove the package and try again.
              Does the command works if you're executing it from the terminal, after exiting EmulationStation ?

              J 1 Reply Last reply Reply Quote 0
              • J
                Jesuszilla @mitu
                last edited by

                @mitu I do not appear to have that package installed.

                sudo apt remove xserver-xorg-legacy
                Reading package lists... Done
                Building dependency tree       
                Reading state information... Done
                Package 'xserver-xorg-legacy' is not installed, so not removed
                0 upgraded, 0 newly installed, 0 to remove and 196 not upgraded.
                
                1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator
                  last edited by

                  OK, so the error is not caused by the Xorg wrapper. I don't know what's the cause of the error then.

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    Jesuszilla @mitu
                    last edited by

                    @mitu I notice sudo startx has no problems starting but I just get a black screen and no audio. What do I do?

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

                      @Jesuszilla sudo is never the answer and it shouldn't be used as a brute-force option.

                      What do I do?

                      Try replicating what runcommand does to start an X session - using the same command and arguments and add your own argument(s) to it. Experiment directly from the terminal until it works, before creating a script to be run from EmulationStation.

                      J 1 Reply Last reply Reply Quote 0
                      • J
                        Jesuszilla @mitu
                        last edited by Jesuszilla

                        @mitu Well I got a little further by duplicating runcommand,sh into a separate runcommand_cocktail.sh that I intend to use solely for IKEMEN-Go and other ports that don't have shader configurability. I successfully managed to get the image to rotate and flip (though the latter is not really what I wanted).

                        The contents of the file are as follows:
                        https://pastebin.com/tM4Qa7aB

                        However, the --reflect option appears to only reflect the single image (video is backwards; I tried both X and Y), not mirror an image on two sides like I want. What's the next step to mirroring the image on both sides? Do I need to set up a virtual output or something? What's a good guide to look at for this? I have to go the script route because xrandr returns "Can't open display" every time I try to run it, either over SSH or locally on the Pi, doesn't matter, so I can't even get basic monitor info this way.

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

                          @Jesuszilla said in Is there a way to get a cocktail cab experience for basically everything on Rpi4?:

                          have to go the script route because xrandr returns "Can't open display" every time I try to run it, either over SSH or locally on the Pi, doesn't matter, so I can't even get basic monitor info this way.

                          Not sure what options are available for rotation, but 'xrandr' can only work from an Xorg session, not from terminal/SSH/etc. You can add the 'xrandr' command and its arguments to the 'ikemen-go.sh' script, before the actual port command and after 'xset' - assuming you're using the original script which uses XINIT: to start the port and not your own command line that starts the Xorg session

                          #!/bin/bash
                          export MESA_GL_VERSION_OVERRIDE=2.1
                          xset -dpms s off s noblank
                          xrandr # arguments here...
                          xterm -g 1x1+0-0 -e 'cd /opt/retropie/ports/ikemen-go && ./Ikemen_GO'
                          
                          J 1 Reply Last reply Reply Quote 0
                          • J
                            Jesuszilla @mitu
                            last edited by

                            @mitu xrandr doesn't do anything if I put it there; it only does anything if I use a modified runcommand script

                            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.