Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Moonlight - ERROR mlPair() : could not pair.

    Emulator Arcade/PC/Console
    moonlight mlpair pair
    3
    5
    838
    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.
    • Training Day
      Training Day last edited by

      Hello Everyone,

      i have a fresh installation of Recalbox 9.2-experimental for a new Raspberry PI 5 8GB. No other tampering has been done. I have set up WIFI within Recalbox which seems to work.

      I can access Recalbox via WinSCP just fine. I open up the command box of WinSCP and enter

      /recalbox/scripts/moonlight/Moonlight.sh find
      

      That results in the following awnser.

      Listing available GFE servers :
      GFE Host User(showsmyip)  running GFE 3.23.0.74
      You can now run the following commands:
        /recalbox/scripts/moonlight/Moonlight.sh pair User
        /recalbox/scripts/moonlight/Moonlight.sh init User
      

      Now if i try to pair my PC (User) with

      /recalbox/scripts/moonlight/Moonlight.sh pair User
      

      The following shows up

      User(showsmyip) /recalbox/share/system/configs/moonlight/moonlight-User.conf | /recalbox/share/system/configs/moonlight/keydir-User
      When PIN is asked on your PC, enter the number ----> 7185 <----
      /recalbox/scripts/moonlight/Moonlight.sh: line 35:  4185 Aborted                 moonlight --pin "$pin" pair "$mlIp" > /dev/null 2>&1
      ERROR mlPair() : could not pair. Exiting ...
      

      Now on my PC End i run Sunshine Version 0.22.0. I also have GFE installed but in the version 3.27.0.120 and not 3.23.0.74 as the prompt of recalbox indicates.

      But i dont run GFE only Sunshine. I tried to only run GFE with no Sunshine but to no avail.

      I think i followed the moonlight-setup of your wiki quite well, but is there anything i missed?

      Any help would be much appreciated, and i will gladly give you more information if neccessary.

      Regards
      TrainingDay

      TCr 1 Reply Last reply Reply Quote 1
      • TCr
        TCr @Training Day last edited by

        @Training-Day

        today I also downloaded a fresh copy of recalbox 9.2-experimental for rpi5 and also wanted to connect it to my working moonlight.

        I also get the same error:

        # /recalbox/scripts/moonlight/Moonlight.sh find
        Listing available GFE servers :
        GFE Host pct(192.168.99.50)  running GFE 3.23.0.74
        You can now run the following commands:
          /recalbox/scripts/moonlight/Moonlight.sh pair pct
          /recalbox/scripts/moonlight/Moonlight.sh init pct
        # /recalbox/scripts/moonlight/Moonlight.sh pair pct
        Hostname mode
        pct(192.168.99.50) /recalbox/share/system/configs/moonlight/moonlight-pct.conf | /recalbox/share/system/configs/moonlight/keydir-pct
        When PIN is asked on your PC, enter the number ----> 3343 <----
        /recalbox/scripts/moonlight/Moonlight.sh: line 35:  4840 Aborted                 moonlight --pin "$pin" pair "$mlIp" > /dev/null 2>&1
        ERROR mlPair() : could not pair. Exiting ...
        

        I had no way to input the PIN on the sunshine webpage - moonlight on the recalbox shell immediately returns the error.

        TCr 1 Reply Last reply Reply Quote 0
        • TCr
          TCr @TCr last edited by

          I think I know why we get the error...

          When I manually execute the command, I get:

          # moonlight --pin 3343 pair 192.168.99.50
          00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this.
          00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this.
          00:00:00 - Qt Critical: drmModeGetResources failed (Operation not supported)
          00:00:00 - SDL Info (0): Compiled with SDL 2.26.5
          00:00:00 - SDL Info (0): Running with SDL 2.26.5
          00:00:00 - Qt Info: No translation available for  "C"
          00:00:00 - Qt Fatal: Cannot create window: no screens available
          Aborted
          
          TCr 1 Reply Last reply Reply Quote 0
          • TCr
            TCr @TCr last edited by

            I managed to get the paring and list working by hacking the file /recalbox/scripts/moonlight/Moonlight.sh

            # cp /recalbox/scripts/moonlight/Moonlight.sh /tmp/
            # diff -Nru /recalbox/scripts/moonlight/Moonlight.sh /tmp/Moonlight.sh
            --- /recalbox/scripts/moonlight/Moonlight.sh    2024-03-28 23:44:14.000000000 +0100
            +++ /tmp/Moonlight.sh   2024-05-19 15:19:16.836516762 +0200
            @@ -1,10 +1,12 @@
             #!/bin/bash
             SCRIPT=`realpath $0`
            -SCRIPTPATH=`dirname $SCRIPT`
            +SCRIPTPATH=/recalbox/scripts/moonlight
             source "${SCRIPTPATH}/moonlight.inc.sh"
             source "${SCRIPTPATH}/generic.inc.sh"
             #source ./moonlight.inc.sh
             #source ./generic.inc.sh
            +echo '{ "device": "/dev/dri/card1" }' > /tmp/eglfs.json
            +export QT_QPA_EGLFS_KMS_CONFIG=/tmp/eglfs.json
            
             mlGameList=$moonlightConf/gamelist.txt
             mlRomDir=/recalbox/share/roms/moonlight
            

            Info from https://forums.raspberrypi.com/viewtopic.php?t=361454

            # /tmp/Moonlight.sh find
            Listing available GFE servers :
            GFE Host pct(192.168.99.50)  running GFE 3.23.0.74
            You can now run the following commands:
              /tmp/Moonlight.sh pair pct
              /tmp/Moonlight.sh init pct
            

            but later we get the same problem:

            from the log /recalbox/share/system/logs/frontend.log

            [2024/05/19 15:11:54.424] (INFO ) : [Run] Configgen Output:
            Running command: XDG_DATA_DIRS=/recalbox/share/system/configs SHELL=/bin/sh RUNLEVEL=S MESA_LOADER_DRIVER_OVERRIDE=vc4 PWD=/ _=/usr/bin/python SDL_VIDEO_GL_DRIVER=/usr/lib/libGLESv2.so HOME=/recalbox/share/system LANG=de_DE.UTF-8 SDL_NOMOUSE=1 TERM=linux label=RECALBOX SDL_VIDEO_EGL_DRIVER=/usr/lib/libEGL.so INIT_VERSION=sysvinit- SHLVL=3 CONSOLE=/dev/console PATH=/sbin:/usr/sbin:/bin:/usr/bin PREVLEVEL=N /usr/bin/moonlight stream 192.168.99.50 Desktop
            Process exitcode: -6
            00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this.
            00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this.
            00:00:00 - Qt Critical: drmModeGetResources failed (Operation not supported)
            00:00:00 - SDL Info (0): Compiled with SDL 2.26.5
            00:00:00 - SDL Info (0): Running with SDL 2.26.5
            00:00:00 - Qt Info: Successfully loaded translation for  "de_DE"
            00:00:00 - Qt Fatal: Cannot create window: no screens available
            
            1 Reply Last reply Reply Quote 0
            • kristianwh
              kristianwh last edited by kristianwh

              Hi, I had the same problem after SSH'ing into recalbox and executing Moonlight.sh pair <hostname>

              Turns out display forwarding wasn't working, so I changed the QT_QPA_PLATFORM setting.

              Run the following command:
              export QT_QPA_PLATFORM=offscreen
              then run ./Moonlight.sh pair <hostname> as normal

              1 Reply Last reply Reply Quote 1
              • Referenced by  arcueid arcueid 
              • First post
                Last post

              Want to support us ?

              49
              Online

              98.6k
              Users

              28.1k
              Topics

              187.0k
              Posts

              Copyright © 2021 recalbox.com