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

    Moonlight Screen Rotation

    Scheduled Pinned Locked Moved Help and Support
    moonlightscreen rotation
    16 Posts 2 Posters 2.9k 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
      Applepie2
      last edited by

      I have just setup Moonlight and the streaming works perfectly. However, my setup is using a DPI screen which is portrait by default, so I have already had to configure emulationstation, retroarch etc to rotate the screen 90 (or 270) degrees.

      For most non-libretro core emulators I find that there is not normally a screen rotation built in. However I found on the Moonlight embedded github that there is actually an option in the configuration for this.

      However, when I add rotate = 90 into the global Moonlight config at ~/config/all/moonlight/global.conf, I don't get any change to the screen orientation. I've tried other options in the config and it appears they all work, but I can' work out why rotate isn't.

      I had a brief skim over the moonlight.sh file and it doesn't appear that the rotation variable from the config is actually being passed to Moonlight (as far as I can tell). Am I correct in this assumption, and if so, is this because the version of Moonlight on Retropie doesn't support this feature, or has it just not be included?

      Any advice on how to successfully achieve screen rotation for Moonlight would be much appriciated.

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

        Please fill out the info requested in https://retropie.org.uk/forum/topic/3/read-this-first.

        A 1 Reply Last reply Reply Quote 0
        • A
          Applepie2 @mitu
          last edited by

          @mitu Sorry about that, it totally slipped my mind!

          Pi Model or other hardware: Raspberry Pi 4B
          Power Supply used: Official 3A RPI Power Supply
          RetroPie Version Used: 4.8.2
          Built From: Raspberry Pi Imager - No background OS
          USB Devices connected: Custom Teensyduino Controller
          Controller used: Custom Teensyduino Controller
          Emulator: Moonlight
          How to replicate the problem: Use the rotation = x parameter in the Moonlight global.conf

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

            As far as I can tell, the rotation parameter is supported when using the omx video decoder (when platform=pi) and it should work with the default RetroPie 4.8.2 image.
            Can you add verbose to the .conf file and then - after running moonlight - post the log file (/dev/shm/runcommand.log) to pastebin.com ?

            A 1 Reply Last reply Reply Quote 0
            • A
              Applepie2 @mitu
              last edited by

              @mitu Here is the pastebin of the log:

              https://pastebin.com/9FTYzvXT

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

                Hm, that doesn't look like a verbose log. Perhaps running manually the command line (shown at the top of the log file) with -verbose or -debug would display more diagnostic info ? I think you can run it manually from a SSH session (just exit EmulationStation before starting moonlight).

                A 1 Reply Last reply Reply Quote 0
                • A
                  Applepie2 @mitu
                  last edited by Applepie2

                  @mitu I've managed to launch Moonlight directly from the .sh file, although I did have to edit the -config parameter slightly from how it appeared in the runcommand.log. Instead of passing in "/home/pi$, I had to include the full path to the config for it to successfully launch ("/home/pi/.config/moonlight/global.conf").

                  The -verbose flag worked successfully, please find the full verbose log here:

                  https://pastebin.com/QJLN2SjV

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

                    @Applepie2 said in Moonlight Screen Rotation:

                    The -verbose flag worked successfully, please find the full verbose log here:
                    https://pastebin.com/QJLN2SjV

                    Cannot see the log: Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it.

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      Applepie2 @mitu
                      last edited by

                      @mitu If I posted it as a guest post it kept getting auto-removed, so I tried to post it through my account instead and it appears that has triggered moderation.

                      I'm guessing it is some of the game names in the xml tags that might be causing issues. I've removed the xml tags relating to my desktop PC system, steam and game names. Where these have been removed I've just replaced them with <REDACTED>.

                      Hopefully this version is accessible:
                      https://pastebin.com/WB02eXLM

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

                        @Applepie2 Yes, it's accessible now, though unfortunately I don't see anything related to rotation there, just the messages regarding the viewport (wxh@fps). It does detect the correct platform (Pi).

                        Can you try adding -rotation 90 parameter to the command line and see if it works this way ?

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          Applepie2 @mitu
                          last edited by

                          @mitu I try to use either a parameter -rotation 90 or --rotation 90 to the command line, then it tries to connect to an ip address of 90. Sadly, I don't think rotation is supported that way.

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

                            @Applepie2 Try with -rotate 90.

                            A 1 Reply Last reply Reply Quote 0
                            • A
                              Applepie2 @mitu
                              last edited by Applepie2

                              @mitu You've got it! That did the trick!

                              Do you know which file calls this, so I can permenantly add the -rotate 90 parameter?

                              EDIT: Turns out the parameter for the config is (of course) also just called rotate rather than rotation. Just double checked their GitHub again and their example config definitely has the wrong parameter.

                              Thanks again for all your help!

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

                                @Applepie2 said in Moonlight Screen Rotation:

                                Just double checked their GitHub again and their example config definitely has the wrong parameter.

                                Good find ! It will need to be corrected.

                                A 1 Reply Last reply Reply Quote 0
                                • A
                                  Applepie2 @mitu
                                  last edited by Applepie2

                                  @mitu I've raised this as an issue on their repository, hopefully they will correct their example before too long. Thank you again for your assistance in this matter.

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

                                    I meant to send a PR myself, but looks like the Github's web interface didn't go through with it. I've amended their Wiki page with the command line options and sent a small PR to fix the sample .conf from the repository.

                                    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.