Closed nicolaspernoud closed 2 years ago
Fellow user here. Investigating the same issue, small fonts on a 65" 4k tv. This is probably it:
https://github.com/moonlight-stream/moonlight-qt/issues/466
Maybe if the issue can be solved by setting QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT then this plugin might be able to do it for us. But I haven't confirmed yet that setting those variables does solve the problem.
If I'm right, you didn't have this issue with X11 because in that environment QT doesn't need those variables set.
I'll start testing this hypothesis this evening.
Ok, thanks a lot !
Hi, let me know if adding extra environment vars helps. I clould add them to the environment when starting moonlight-qt.
Hi @veldenb, an apparently straightforward test went sideways pretty badly.
My TV is a Sony Bravia A80J, 4k, 65", which is about a meter and a half wide.
I exported both variables in bootstrap_moonlight-qt.sh, with no effect at all. Moreover, the testing has been garbled by a new bug, basically the fonts are messed up - moonlight-qt is picking one of those funny fonts that 60 year old people pick for their grandchildren birthday cards. I'm no longer confident my system is pristine enough to do any serious testing. Last thing I installed was Jellyfin, an Embuary fork.
Funny granny font:
Wrong font size in settings:
This second picture is still a good illustration of the bug. Even when the font itself was OK, the size was this small. You do have to put your face right up to the screen to read it.
I originally assumed it was just designed for monitors and I had to live with it, but that doesn't seem to be the case.
Relevant snippet from bootstrap_moonlight-qt.sh:
Solar:~/.kodi/addons/plugin.program.moonlight-qt/resources/bin # tail -n 10 bootstrap_moonlight-qt.sh
# Start moonlight-qt and log to log file
echo "--- Starting Moonlight ---"
export QT_QPA_EGLFS_PHYSICAL_WIDTH=1450
export QT_QPA_EGLFS_PHYSICAL_HEIGHT=835
#export QT_QPA_EGLFS_WIDTH=3840
#export QT_QPA_EGLFS_HEIGHT=2160
./moonlight-qt "$@"
Documentation: https://doc.qt.io/qt-5/embedded-linux.html
QT_QPA_EGLFS_PHYSICAL_WIDTH and height: millimeters
QT_QPA_EGLFS_WIDTH and height: pixels
None of those variables have any effect.
Until someone finds something out I'll keep trying. I'll build a new system on a spare USB key and see if I can perform some proper testing.
Thanks!
Hello. I am sure it isn't because it's designed for monitors, because when used with lightdm on raspbian, moonlight qt looks perfect. It seems not to be able to pick the correct font or font size in standalone mode...
@veldenb this appears to be a moonlight-qt bug or possibly something even lower level like a driver bug, I don't believe there's anything you can do right now.
You can keep an eye on https://github.com/moonlight-stream/moonlight-qt/issues/466
I won't notify you about this issue in the future until something relevant happens.
Thanks
Sadly there isn't much I can do about this issue here because it's an upstream problem. I'll close the issue, feel free to add more information.
Any chance of adding the ability to set a value for QT_SCALE_FACTOR
in the addon settings to help with the small fonts? I was having a similar issue with the moonlight-qt gui fonts being impossible to read and setting the scale factor to something like 1.8 seems to help significantly.
I added some scaling to this pre-release: https://github.com/veldenb/plugin.program.moonlight-qt/releases/download/v0.1.4/plugin.program.moonlight-qt.zip
Can you test it if it works on 4K but also in 1080p? 4K seems to work here but I do not have a 1080p display at hand.
This piece of code is added:
# Hack to scale interface on 4K display's. QT_SCALE_FACTOR higher than 1.28 corrupts the layout.
if [ -z "$DISPLAY" ]; then
echo Applying QT custom scaling factor...
export QT_SCALE_FACTOR=1.28
export QT_QPA_EGLFS_PHYSICAL_WIDTH=750
export QT_QPA_EGLFS_PHYSICAL_HEIGHT=422
fi
Those scaling settings in the 1.4 release look great on my 1080p TV. I must've accidentally grabbed the 1.3 release the other day. I don't know if other resolutions could have issues with hardcoded defaults so maybe consider exposing those items in the addon settings and passing them to the launcher script?
1.4 is still in pre-release, I have to do some tests before I can release it but great that the scaling also works on 1080p :) Other resolutions should be ok since QT calculates the DPI based on screen size, detected resolution and scale factor. The default scale factor was a bit small for TV's and I hard coded a 16:9 TV-size of 75cm x 42cm, should be good for any TV.
I'll mark this issue as closed, feel free to re-open if you run into other scaling issues.
Well, it is not solved for me : after applying the update on Librelec 10.0.1 (official/RPi4), updating Moonlight from the addon, and rebooting : there is nothing written anywhere anymore (but the close dialog, strangely) !
My TV is an (quite old) 1080p 40inches Sony
@nicolaspernoud could you post your moonlight-qt.log?
Here it is :
Platform 'rpi' running 'libreelec' detected...
Using QT library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5...
Applying QT custom scaling factor...
Custom ALSA audio device: 'hdmi:CARD=vc4hdmi0,DEV=0'
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 - SDL Info (0): Compiled with SDL 2.0.21
00:00:00 - SDL Info (0): Running with SDL 2.0.21
00:00:00 - Qt Info: Successfully loaded translation for "fr"
00:00:00 - Qt Warning: qrc:/gui/main.qml:12:1: QML ApplicationWindow: ToolTip must be attached to an Item
00:00:01 - Qt Info: Found "gamecontrollerdb.txt" at "/storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-home/.cache/Moonlight Game Streaming Project/Moonlight/gamecontrollerdb.txt"
00:00:01 - SDL Info (0): Loaded 175 new gamepad mappings
00:00:01 - SDL Info (0): V-sync disabled
00:00:01 - SDL Info (0): Using MMAL renderer
00:00:01 - FFmpeg: [h264_mmal @ 0x16e4370] Format mmal chosen by get_format().
00:00:01 - FFmpeg: [h264_mmal @ 0x16e4370] Using MMAL H264 encoding.
00:00:01 - FFmpeg: [h264_mmal @ 0x16e4370] Changing output format.
00:00:01 - SDL Info (0): Chose MmalRenderer for codec h264_mmal due to preferred pixel format: 0x75
00:00:01 - SDL Info (0): FFmpeg-based video decoder chosen
00:00:01 - Qt Info: Found "gamecontrollerdb.txt" at "/storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-home/.cache/Moonlight Game Streaming Project/Moonlight/gamecontrollerdb.txt"
00:00:01 - SDL Info (0): Loaded 175 new gamepad mappings
00:00:02 - SDL Info (0): Captured Qt EGLFS DRM master fd (legacy): 5
00:00:02 - Qt Debug: Current Moonlight version: "3.2.0"
00:00:02 - Qt Info: Discovered mDNS host: "mistral.local."
00:00:02 - Qt Info: Resolved "mistral.local." to QHostAddress("192.168.1.89")
00:00:02 - Qt Info: Resolved "mistral.local." to QHostAddress("2a02:8429:827e:a201:2ed5:9be0:99bd:d078")
00:00:02 - Qt Info: Resolved "mistral.local." to QHostAddress("2a02:8429:827e:a201:b167:8de8:6b15:2f54")
00:00:02 - Qt Info: Resolved "mistral.local." to QHostAddress("2a02:8429:827e:a201:64c9:aeb5:9794:8de1")
00:00:02 - Qt Info: Resolved "mistral.local." to QHostAddress("fe80::b167:8de8:6b15:2f54")
00:00:02 - Qt Info: Latest supported GFE server: "99.99.99.99"
00:00:02 - Qt Info: "MISTRAL" is now online at "192.168.1.89:47989"
00:00:02 - Qt Info: Downloaded updated gamepad mappings
00:00:04 - Qt Info: Processing new PC at "192.168.1.89:47989" from mDNS with IPv6 address "[2a02:8429:827e:a201:2ed5:9be0:99bd:d078]:47989"
00:00:04 - Qt Info: Executing request: "http://192.168.1.89:47989/serverinfo?uniqueid=0123456789ABCDEF&uuid=b06e09f70c7e442992cf1d29795f52c2"
00:00:04 - Qt Info: Executing request: "https://192.168.1.89:47984/serverinfo?uniqueid=0123456789ABCDEF&uuid=c8a79b3b43c8426d93125c2ef1aa0852"
00:00:12 - Qt Warning: qrc:/gui/PcView.qml:11:1: QML PcView: StackView has detected conflicting anchors. Transitions may not execute properly.
00:01:16 - Qt Warning: qrc:/gui/PcView.qml:11:1: QML PcView: StackView has detected conflicting anchors. Transitions may not execute properly.
@nicolaspernoud nothing strange to see, does it make a difference when you switch your language to English?
edit: do you have any custom Kodi skin installed? Looks like Moonlight cannot find your fonts or something like that.
@nicolaspernoud I think I found your problem, connect a mouse to your Pi and start moonlight and no fonts appear. Seems to be an upstream bug: https://github.com/moonlight-stream/moonlight-qt/issues/233
I added QT_QPA_EGLFS_HIDECURSOR=1
to the 0.1.5 release. If you download and install it again the problem should be gone. Can you confirm this?
I confirm that solves the problem ! Thanks a lot for your dedication, your work, and this very nice addon !
Hello,
Thanks for this amazing work. It works perfectly with LibreElec 10.0.0 on a Raspberry Pi 4 albeit for a very small issue : the fonts are very tiny in Moonlight GUI and almost impossible to read on a 40 inches 1080p TV, particularly in settings. Moonlight launched from X11 with raspbian did not have the same issue. It should be missing some font or parameter !?
Best regards.