Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moonlight-qt not working on the lastest Raspbian Bookworm Lite on RPi 5 #1133

Closed
azsde opened this issue Dec 2, 2023 · 10 comments
Closed

Moonlight-qt not working on the lastest Raspbian Bookworm Lite on RPi 5 #1133

azsde opened this issue Dec 2, 2023 · 10 comments

Comments

@azsde
Copy link

azsde commented Dec 2, 2023

On a fresh install of Rasbian Bookworm Lite, I have done:

  • sudo apt update
  • sudo apt upgrade
  • curl -1sLf 'https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-qt/setup.deb.sh' | distro=raspbian sudo -E bash
  • sudo apt install moonlight-qt

Then I tried to launch moonlight-qt:

azsde@moonlight:~ $ moonlight-qt
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.29.0
00:00:00 - SDL Info (0): Running with SDL 2.29.0
00:00:00 - Qt Info: No translation available for "en_GB"
00:00:00 - Qt Info: No existing credentials found
00:00:00 - Qt Info: Wrote new identity credentials to settings
00:00:01 - Qt Fatal: Cannot create window: no screens available
Aborted

This issue also occurs on the full rasbian bookworm OS when configuring the OS to boot into the console rather than in the graphical environment. When in the graphical environement, everything is working properly.

Note that moonlight-qt works from a console environement when transfering the configured raspbian-lite sd card into a RPi 4, it is however not working on the RPi 5.

@othnos
Copy link

othnos commented Dec 6, 2023

As a workaround could launch moonlight-qt from console by doing this https://forums.raspberrypi.com/viewtopic.php?t=287800#p1742985

E.g.

echo '{ "device": "/dev/dri/card1" }' > eglfs.json
QT_QPA_EGLFS_KMS_CONFIG=eglfs.json moonlight-qt

This comment states following which might relate to this also?

The GPU on Pi4 is split into 2 - the 3D side, and the rendering side. ... typically the 3D side is card0 whilst rendering is card1. The 3D side doesn't support any form of rendering

@azsde
Copy link
Author

azsde commented Dec 6, 2023

I will need to try this, but it is weird that the workaround is not required on my Pi 4 running Bookmworm Lite

@abn0mad
Copy link

abn0mad commented Dec 11, 2023

Same issue here. The workaround suggested by @othnos partially works; it allows moonlight-qt to start in TTY mode instead of crashing, but it doesn't recognise any hardware acceleration. Can't connect to the streaming host; neither in hardware accelerated mode, nor forced software decoder mode.

@othnos
Copy link

othnos commented Dec 16, 2023

I tried fresh Raspberry Pi OS Lite (64-bit) installation done with Raspberry Pi Imager v1.8.3 to USB stick. Seems to work with both software and hardware video decoder. Micro HDMI cable is connected to the port next to power connector.

Following is pretty much all I did in addition to Imager ssh etc. setup and connecting PS4 controller with Bluetooth.

sudo apt update
sudo apt full-upgrade
curl -1sLf 'https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-qt/setup.deb.sh' | distro=raspbian sudo -E bash
sudo apt install moonlight-qt
sudo apt update
sudo apt upgrade

# Set cli resolution to Full HD just to get text bigger
sudo sed -i '1s/^/video=HDMI-A-1:1920x1080M@60 video=HDMI-A-2:1920x1080M@60 /' /boot/firmware/cmdline.txt
# Use card1 and set hdmi output to Full HD
cat << EOF > eglfs.json
{
  "device": "/dev/dri/card1",
  "outputs": [
    {
      "name": "HDMI1",
      "mode": "1920x1080"
    }
  ]
}
EOF
QT_QPA_EGLFS_KMS_CONFIG=eglfs.json moonlight-qt

card1 seems to be gpu-card

$ ls -l /dev/dri/by-path/
total 0
lrwxrwxrwx 1 root root  8 Dec 16 16:20 platform-1002000000.v3d-card -> ../card0
lrwxrwxrwx 1 root root 13 Dec 16 16:20 platform-1002000000.v3d-render -> ../renderD128
lrwxrwxrwx 1 root root  8 Dec 16 16:20 platform-axi:gpu-card -> ../card1

edit: Host machine is Windows PC with Nvidia GeForce RTX 4070 Ti running sunshine.

@abn0mad
Copy link

abn0mad commented Dec 18, 2023

Sorry.. My bad... because of some rather elaborate proxying at my end I couldn't use the default command and lazily did some of the commands manually.. I only just realised I had the debian repo activated, not the raspbian one. After switching and reinstalling all is well now. Sorry for wasting time ... :(

@erikreed
Copy link

@othnos nice fix -- this did the trick on a fresh bookworm installation on a raspberry pi 5. And as a bonus I can read the console text now too 😄

@MarAlder
Copy link

MarAlder commented Feb 1, 2024

@othnos nice fix -- this did the trick on a fresh bookworm installation on a raspberry pi 5. And as a bonus I can read the console text now too 😄

Same for me, thanks @othnos!

@SGTTEMEPST
Copy link

Thanks for the solution @othnos !

No issues connecting from my pi5 to my Mag-15 running sunshine now!

@cgutman
Copy link
Member

cgutman commented Apr 6, 2024

Fixed by 011feab

The workaround in #1133 (comment) can be used until the next Moonlight release.

@cgutman cgutman closed this as completed Apr 6, 2024
@cgutman cgutman pinned this issue Apr 6, 2024
@kolroser
Copy link

When will the update that fixes this problem be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants