Thank you for your donation!


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


Local UI Delay
#1
Hi,

I am using moode on a pi 3B.
Have attached a PCM5102 DAC, but using using Bluetooth out to Sony SA-D20 speakers. Network connection through WiFi. Recently connected a 5 inch HDMI display (800 x 480) to the setup and noticed that the local UI takes too long to start.
I added the following lines to /boot/config.txt for the local display:


Code:
# HDMI Mode (848x480 60Hz)
hdmi_group=2
hdmi_mode=14


As I power on, I am able to see the boot text on the HDMI screen. As soon as the boot finishes the screen goes blank. The HDMI signal is still there as the screen does not power off (it has this built in functionality). After more than two minutes, the screen flashes white and UI appears. After that the system runs fine. I tested the screen on my other PIs and my TV receiver before I attached it to this system, and it worked fine everywhere else, so I believe the screen is OK.

I checked the moode log (attached) at /var/log/moode.log and noticed that the entry "worker: LocalUI started" appears around three minutes after the first log entry. And that is the dead end for me. Don't know what to check further. Would you be able to help me find the real problem here?

Thanks,
-Jass
Reply
#2
It could be some sort of hardware or compatibility issue with that particular screen.

Below is Moode startup log after powering up a Pi that has the Pi 7" Touch display attached. The LocalUI service starts instantly.

Code:
pi@rp5:~ $ moodeutl -l
20191115 090408 worker: -- Start
20191115 090408 worker: Successfully daemonized
20191115 090408 worker: Integrity check (warning: playerlib.js)
20191115 090408 worker: Integrity check (passed with warnings)
20191115 090408 worker: Session loaded
20191115 090408 worker: Debug logging (off)
20191115 090408 worker: Device raw: Card0 (ALSA) | Card1 () | I2Sdev (none)
20191115 090408 worker: Device cfg: Name (On-board audio device) | Card (0) | MPDdev (0) | Mixer (PCM) | Alsavol: (0)
20191115 090409 worker: ALSA volume set to (0%)
20191115 090410 worker: -- System
20191115 090413 worker: Host name     (rp5)
20191115 090413 worker: moOde release (6.4.0 2019-MM-DD)
20191115 090413 worker: Raspbian OS   (10.1)
20191115 090413 worker: Linux kernel  (4.19.79-v7+ #1273)
20191115 090413 worker: Platform      (Pi-3B 1GB v1.2)
20191115 090413 worker: Architecture  (armv7l)
20191115 090413 worker: MPD version   (0.21.16)
20191115 090413 worker: CPU governor  (ondemand)
20191115 090413 worker: USB boot not enabled yet
20191115 090416 worker: File system not expanded yet
20191115 090417 worker: HDMI port off
20191115 090417 worker: File check (OK)
20191115 090417 worker: -- Network
20191115 090417 worker: eth0 exists
20191115 090418 worker: eth0 address not assigned
20191115 090418 worker: wlan0 exists
20191115 090418 worker: wifi country (US)
20191115 090418 worker: wlan0 trying SSID (AirnetN2)
20191115 090418 worker: IP addr (192.168.1.197)
20191115 090418 worker: Netmask (255.255.255.0)
20191115 090418 worker: Gateway (192.168.1.1)
20191115 090418 worker: Pri DNS (192.168.1.1)
20191115 090418 worker: Domain  (home)
20191115 090418 worker: -- Audio
20191115 090418 worker: ALSA outputs unmuted
20191115 090418 worker: ALSA card number (0)
20191115 090418 worker: Audio output (On-board audio device)
20191115 090419 worker: Audio formats (U8, S16_LE)
20191115 090419 worker: ALSA mixer name (PCM)
20191115 090419 worker: MPD volume control (software)
20191115 090419 worker: Hdwr volume controller exists
20191115 090419 worker: Max ALSA volume (100%)
20191115 090419 worker: -- Services
20191115 090419 worker: Reset renderer active state
20191115 090421 worker: MPD conf updated
20191115 090422 worker: MPD started
20191115 090422 worker: MPD accepting connections
20191115 090422 worker: Configure MPD outputs
20191115 090422 worker: MPD output 1 ALSA default (on)
20191115 090422 worker: MPD output 2 ALSA crossfeed (off)
20191115 090422 worker: MPD output 3 ALSA parametric eq (off)
20191115 090422 worker: MPD output 4 ALSA graphic eq (off)
20191115 090422 worker: MPD output 5 ALSA polarity inversion (off)
20191115 090422 worker: MPD output 6 ALSA bluetooth (off)
20191115 090422 worker: MPD output 7 HTTP stream (off)
20191115 090422 worker: MPD crossfade (off)
20191115 090422 worker: Audio source (Local)
20191115 090422 worker: Output device (Local)
20191115 090422 worker: Airplay receiver started
20191115 090422 worker: USB auto-mounter (udisks-glue)
20191115 090422 worker: -- Music sources
20191115 090422 worker: USB source (VFAT128)
20191115 090422 worker: NAS and UPnP sources (none configured)
20191115 090422 worker: -- Miscellaneous
20191115 090422 worker: Saved MPD vol level (0)
20191115 090422 worker: Preamp volume level (0)
20191115 090423 worker: MPD volume level (10) restored
20191115 090423 worker: ALSA volume level (100%)
20191115 090423 worker: Auto-play (Off)
20191115 090423 worker: LocalUI started
20191115 090423 worker: Maintenance interval (6 hrs)
20191115 090423 worker: Screen saver activation (Never)
20191115 090423 worker: Session permissions (OK)
20191115 090423 worker: Watchdog started
20191115 090423 worker: Ready

Look for other delays in your log.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
I checked the logs on multiple reboots and spend the last night trying to locate the root cause.

I temporarily commented the line "After=nginx.service php7.0-fpm.service mpd.service" in localui.service, enabled the service and rebooted.
Chromium launched right after the boot finished, and I briefly got the white chromium display with the message "This webpage cannot be reached". Meanwhile moode web interface was getting ready (accessed on my PC). Soon after that the display turned black and screen was still running (display backlight was on). And the moode web interface became available on the PC.

So I believe the UI service is working fine, chromium is doing its job and the screen is OK. The problem, it seems, is that the system is displaying a blank black webpage in chromium. And it gets refreshed after 2-3 minutes, thus restoring the local display. Now I am back at the point where I don't know where to look further.
Reply
#4
Hi, you could try to raise the entropy from you system.
I had the same issue, and the solution that worked for me was to install the debian package [a href="https://packages.debian.org/buster/rng-tools"]rng-tools[/a]

make sure the service runs on reboot, and you will have a ui much faster.
Reply
#5
(11-18-2019, 03:31 PM)hjheins Wrote: Hi, you could try to raise the entropy from you system.
I had the same issue, and the solution that worked for me was to install the debian package [a href="https://packages.debian.org/buster/rng-tools"]rng-tools[/a]

make sure the service runs on reboot, and you will have a ui much faster.


I don't remember just when Tim added this service but it's certainly present in moOde 6.3 (probably a direct result of your investigationSmile ).

Looking at a freshly installed copy running on an RPi4B

Code:
pi@moode4b:~ $ dpkg --get-selections|grep rng-tools
rng-tools                    install

pi@moode4b:~ $ ps aux|grep rngd
root       342  0.0  0.0  27656    80 ?        SLsl 10:35   0:00 /usr/sbin/rngd -r /dev/hwrng
...

so the package is installed and the service has started.

Regards,
Kent
Reply
#6
Both rngd and haveged utilities are started at boot.

Code:
pi@rp3:~ $ haveged --help
Usage: haveged [options]
Collect entropy and feed into random pool or write to file.

pi@rp3:~ $ rngd --help
Usage: rngd [OPTION...]
Check and feed random data from hardware device to kernel entropy pool.

pi@rp3:~ $ pgrep rngd
334

pi@rp3:~ $ pgrep haveged
270
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
Oops, forgot to mention haveged. Sigh.
Reply


Forum Jump: