Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Local GUI on 4K screens
#1
When using the local GUI on 4K resolution screens, the objects are incorrectly scaled relative to their labels on the main configuration screens. This issue has been described by me, along with screenshots, in the following post:

https://moodeaudio.org/forum/showthread....2#pid54192

The workaround for this issue is to change the zoom settings in the built-in web browser. This does not affect all other GUI elements, which are influenced by the font size change in Moodeaudio Preferences. The problem is that this change only remains effective until Moodeaudio or the local GUI is restarted. If there were a method to save the default zoom value in the browser settings from the Moodeaudio GUI (for the local GUI), it would solve this problem.
Reply
#2
Try adding the bolded line below to the file /home/pi/.xinitrc
- Replace 0.80 with the percent zoom you are using
- You may have to put quotes around the value "0.80"

#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2014 The moOde audio player project / Tim Curtis
#

# Turn off display power management
xset -dpms

# Screensaver timeout in secs or 'off' for no timeout
xset s 600

# Capture screen size
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"

# Clear browser cache
$(/var/www/util/sysutil.sh clearbrcache)

# Launch chromium browser
chromium-browser --app="http://localhost/" \
--window-size="$SCREENSIZE" \
--window-position="0,0" \
--enable-features="OverlayScrollbar" \
--no-first-run \
--disable-infobars \
--disable-session-crashed-bubble \
--force-device-scale-factor=0.80 \
--kiosk
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(06-05-2024, 12:06 PM)Tim Curtis Wrote: Try adding the bolded line below to the file /home/pi/.xinitrc
- Replace 0.80 with the percent zoom you are using
- You may have to put quotes around the value "0.80"

#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2014 The moOde audio player project / Tim Curtis
#

# Turn off display power management
xset -dpms

# Screensaver timeout in secs or 'off' for no timeout
xset s 600

# Capture screen size
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"

# Clear browser cache
$(/var/www/util/sysutil.sh clearbrcache)

# Launch chromium browser
chromium-browser --app="http://localhost/" \
--window-size="$SCREENSIZE" \
--window-position="0,0" \
--enable-features="OverlayScrollbar" \
--no-first-run \
--disable-infobars \
--disable-session-crashed-bubble \
--force-device-scale-factor=0.80 \
--kiosk

The zoom change triggered from the Chromium Browser menu works differently from the proposed change to the force-device-scale-factor parameter. Setting this parameter to, for example, 1.25, scaled the entire displayed area to be larger than the physical size of the screen. On the other hand, the Zoom command seemed to perform two operations. The solution turned out to be changing two parameters simultaneously: setting force-device-scale-factor to 2.00 and changing the window-size parameter to "1920,1080". I realize this is not an elegant or proper solution, but at least it works. Below is the content of the ~/.xinitrc file with the changes highlighted in bold.

#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2014 The moOde audio player project / Tim Curtis
#

# Turn off display power management
xset -dpms                                                                                                    

# Screensaver timeout in secs or 'off' for no timeout
xset s off                                                                                                    

# Capture screen size
SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"                                         

# Clear browser cache                                                                                         
$(/var/www/util/sysutil.sh clearbrcache)

# Launch chromium browser
chromium-browser --app="http://localhost/" \
--window-size="1920,1080" \
--window-position="0,0" \
--enable-features="OverlayScrollbar" \
--no-first-run \
--disable-infobars \
--disable-session-crashed-bubble \
--force-device-scale-factor=2.00 \
--kiosk


I can propose a solution where a switch named 4K for the LocalGUI settings would change the contents of the ~/.xinitrc file. Of course, this issue would also occur when displaying the Moodeaudio GUI on a PC with a 4K screen resolution, but setting the zoom level, which would be remembered in the web browser preferences, essentially solves this problem automatically. I currently don't have a PC (and simultaneously Moodeaudio) with a resolution higher than FullHD at hand, so I can't confirm if this problem also occurs at such resolutions for the web browser window on a PC or tablet with a 4K resolution (I think, for now, there are no smartphones with such a resolution, at most slightly higher than 1920x1080, such as 1920x1200 can be found).
Reply
#4
I'll add to the TODO list.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
HI,
Please excuse me if I misunderstood your problem, but I think it's the same thing I encountered on my LG 4K.
My problem was solved like this:
I changed these two lines from the config.txt file
dtoverlay=vc4-kms-v3d
max_framebuffers=2
with
#dtoverlay=vc4-kms-v3d
#max_framebuffers=2
I disabled them, although I think the problem was just the dtoverlay
v.
Reply
#6
-> Venerdi
I don't want to lose the offered extra functionality for the HDMI port.

However, for Moodeaudio with the local GUI, only one monitor is actually needed. I can suggest setting the following variables in the config.txt file:


hdmi_force_hotplug:0=1                                                                                          
hdmi_force_hotplug:1=0                                                                                          
max_framebuffers=1        
Reply


Forum Jump: