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

Doesn't Work On Raspberry Pi 5 Libreelec 12 Using Composite Output! #76

Open
03stevensmi opened this issue Sep 25, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@03stevensmi
Copy link

Hey Guys,
The Title Says It All!

Using Card1 On Raspberry Pi 5 Via Composite Output Just Crashes!

Here is the log!:

` GNU nano 7.2 moonlight-qt.log
Platform rpi (aarch64) running libreelec 12.0 detected...
Loading LibreELEC profile for setting up environment...
Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib...
Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5...
Running without window manager...
Forcing KMS mode:
{
"device": "/dev/dri/card1"
}

Detected resolution 720,576...
Using Qt scale factor 0.9...
Using Kodi hooks for libreelec...
--- Starting Moonlight ---
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 Warning: QStandardPaths: wrong permissions on runtime directory /var/run/, 0755 instead of 0700
00:00:00 - SDL Info (0): Compiled with SDL 2.31.0
00:00:00 - SDL Info (0): Running with SDL 2.31.0
00:00:00 - Qt Info: No translation available for "C"
00:00:00 - Qt Fatal: Cannot create window: no screens available
Aborted (core dumped)
`

Please, Can You Fix This?

@03stevensmi
Copy link
Author

03stevensmi commented Sep 25, 2024

Holy F*** I actually fixed it. I can't believe I actually cracked it!
So.... yeah, I found a guy here mentioning this tutorial:
#45 (comment)
so, I looked at the directory he mentioned (/dev/dri/) and I noticed there was a "card2"
so I filled this tutorial here:

Hi, I recently bought a pi5 and started to use it with libreelec.

Neither of the libreelec 11 (nightly for pi5) and libreelec 12 (also nightly) worked with this addon.

But I managed to make it work, I followed the answer of this post https://stackoverflow.com/questions/64312387/rpi4-qt5-qml-drmmodegetresources-failed-error

I updated the file "/storage/.kodi/addons/plugin.program.moonlight-qt/resources/bin/launch_moonlight-qt.sh" and added the line:

export QT_QPA_EGLFS_KMS_CONFIG="/storage/.kodi/addons/plugin.program.moonlight-qt/resources/bin/eglfs.json"

Then I added a file "/storage/.kodi/addons/plugin.program.moonlight-qt/resources/bin/eglfs.json" with content:

{ "device": "/dev/dri/card1" }

And it works. By the way I have no idea of what I'm doing and the cause of the issue. Is the bug from libreelec side or should it be managed by this addon ?

By the way I'm really thankfull for all your work this addon really means a lot to me :)

Best regards

But instead of setting just /dev/dri/card1...
I set it as:

{ "device": "/dev/dri/card2" }
{ "device": "/dev/dri/card1" }

Then I went to the addons resources ./resources/settings.xml
And added this:

<constraints>
                        <options>
                            <option>-</option>
                            <!-- It would be better to populate this list from the system itself: /dev/dri/* -->
                            <option>card0</option>
                            <option>card1</option>
                            <option>card2</option>
                        </options>
                    </constraints>

and Composite-1 here:

<constraints>
                        <options>
                            <option>-</option>
                            <!-- It would be better to populate this list from the system itself: /sys/class/drm/card0-* -->
                            <option>HDMI1</option>
                            <option>HDMI2</option>
                            <option>HDMI3</option>
                            <option>HDMI4</option>
                            <option>HDMI5</option>
                            <option>HDMI6</option>
                            <option>Composite-1</option>
                            <option>DP1</option>
                            <option>DP2</option>
                            <option>DP3</option>
                            <option>DP4</option>
                            <option>DP5</option>
                            <option>DP6</option>
                            <option>eDP1</option>
                            <option>eDP2</option>
                            <option>LVDS1</option>
                            <option>LVDS2</option>
                            <option>VGA1</option>
                            <option>VGA2</option>
                        </options>
                    </constraints>

then lastly added the resolution here:

<constraints>
                        <options>
                            <option>-</option>
                            <option>720x576</option>
                            <option>1280x720</option>
                            <option>1920x1080</option>
                            <option>2560x1440</option>
                            <option>3440x1440</option>
                            <option>3840x2160</option>
                        </options>
                    </constraints>

and rebooted... And BOOM!!... jk it Works Fantastic!

You may want to patch this in a new update.

Hope this helps anyone else with my issue.

@veldenb
Copy link
Owner

veldenb commented Oct 7, 2024

Hi, feel free to create a pull request for it.

@veldenb veldenb added the enhancement New feature or request label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants