veldenb / plugin.program.moonlight-qt

A launcher and updater for running Moonlight-qt on LibreELEC.
GNU General Public License v3.0
88 stars 12 forks source link

Streaming in 1080p on 4k TVs #19

Closed awoelfl closed 2 years ago

awoelfl commented 2 years ago

Dear maintainers,

The value of QT_SCALE_FACTOR in this commit https://github.com/veldenb/plugin.program.moonlight-qt/commit/d28988edd0d1b1c31e2bb9cc1149b8f4edcf994f broke a feature (at least in my setup) added by the moonlight-qt team in 3.2.0 that allows the moonlight gui to output a signal in the same resolution as the game stream.

I do have a 4k TV, but want to output the game stream in 1080p for two reasons:

A QT_SCALE_FACTOR of 0.93 as defined in _bootstrapmoonlight.sh for 1080p lets moonlight-qt crash (without any meaningful logs), whereas a value of 1 seems fine (except for a broken UI, but hey, the stream works).

Please see some logs and the disussion on the topic at the moonlight-qt repo: https://github.com/moonlight-stream/moonlight-qt/issues/645

Note that this is FYI, i do not expect anyone to take action. As there is a workaround, i am super happy with the addon. It is the first no-compromises solution as everything works (starting moonlight from Kodi, streaming in 1080p@60hz, working game controllers, hvec, etc.). Thank you very much for your effort!

veldenb commented 2 years ago

Hi,

Thanks for reporting, the qt scale factor is a bit hacky from my pov but it's the only way to make moonlight-qt display a readable UI on EGL systems like LibreELEC. The issue might also by related to the kernel, I rolled back to LibreELEC 10.0.1 because 10.0.2 was unstable on my pi4.

Maybe there is some sort of a workaround possible but I need to dig in to that.

veldenb commented 2 years ago

@awoelfl I comitted a new version of the bootstrap script: 5c0cfa04d9febac6a3637d1b6b31a9f799a8d5a4. When you uncomment one of the forced modes on the top of the script you should be able to force a mode without the need for kernel parameters etc. Should work on plain LibreELEC. I'm not sure about the crashes, I didn't experience them so maybe that's due to altering setting in the kernel parameters or /flash/config.txt. The pi can be very picky when you alter those settings.

Forcing the mode works using a Qt-var QT_QPA_EGLFS_KMS_CONFIG. The script generates a JSON-file that feeds Qt with the requested display modes. More information about this: https://doc.qt.io/qt-5/embedded-linux.html#eglfs-with-the-eglfs-kms-backend.

It's the only way I've found so far that's flexible enough. Let me know if this script works on your setup, I think I'll add some configuration parameters in Kodi so configuring it is somewhat easier.

awoelfl commented 2 years ago

awesome, thank you very much for your effort!

edit I just found the time to test properly. Works flawlessly without any kernel parameters! The gui looks perfect!

veldenb commented 2 years ago

I added GUI support for setting the resolution in c63701b558719fc17bb64d72e1a2bef183b6ee89, it's in the v0.1.6 release.