Thank you for your donation!


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


Problem: systemd-backlight@backlight:rpi_backlight.service fails to start
#1
Hello,

after update from v9.0.1 to v9.0.2, systemd-backlight@backlight:rpi_backlight.service fails to start on my Rpi 5. Is it normal ?

Startup log :
Code:
20240614 154609 worker: --
20240614 154609 worker: -- Start moOde 9 series
20240614 154609 worker: --
20240614 154609 worker: Successfully daemonized
20240614 154609 worker: Wait for Linux startup
20240614 154615 worker: Linux startup complete
20240614 154615 worker: Boot config is ok
20240614 154615 worker: Session loaded
20240614 154616 worker: Package locks applied
20240614 154616 worker: File check complete
20240614 154616 worker: Debug logging on
20240614 154616 worker: --
20240614 154616 worker: -- System
20240614 154616 worker: --
20240614 154616 worker: Host name:     salon
20240614 154616 worker: RPi model:     Pi-5B 1.0 8GB
20240614 154616 worker: moOde release: 9.0.2 2024-06-12
20240614 154616 worker: RaspiOS:       12.5 Bookworm 64-bit
20240614 154616 worker: Linux Kernel:  6.6.28 64-bit
20240614 154616 worker: MPD version:   0.23.14
20240614 154616 worker: User id:       tux
20240614 154616 worker: Home folder:   /home/tux
20240614 154616 worker: Time zone:     Europe/Paris
20240614 154616 worker: Kbd layout:    fr
20240614 154616 worker: HDMI ports(s): on
20240614 154617 worker: Sys LED0:      off
20240614 154617 worker: Sys LED1:      on
20240614 154617 worker: Reduce power:  on
20240614 154617 worker: CPU governor:  ondemand
20240614 154617 worker: Integ audio:   vc4-kms-v3d
20240614 154617 worker: --
20240614 154617 worker: -- Network
20240614 154617 worker: --
20240614 154617 worker: Eth0
20240614 154617 worker: Ethernet: adapter exists
20240614 154617 worker: Ethernet: timeout up to 90 secs
20240614 154617 worker: Ethernet: method  static
20240614 154617 worker: Ethernet: address 192.168.1.12
20240614 154617 worker: Ethernet: netmask 255.255.255.0
20240614 154617 worker: Ethernet: gateway 192.168.1.254
20240614 154617 worker: Ethernet: pri DNS fd0f:ee:b0::1
20240614 154617 worker: Ethernet: domain  none found
20240614 154617 worker: Wlan0
20240614 154617 worker: Wireless: adapter does not exist
20240614 154617 worker: --
20240614 154617 worker: -- File sharing
20240614 154617 worker: --
20240614 154617 worker: SMB file sharing:  on
20240614 154617 worker: NFS file sharing:  on
20240614 154617 worker: DLNA file sharing: off
20240614 154617 worker: --
20240614 154617 worker: -- Special configs
20240614 154617 worker: --
20240614 154617 worker: Plexamp:          not installed
20240614 154617 worker: RoonBridge:       not installed
20240614 154617 worker: Allo Piano 2.1:   not detected
20240614 154617 worker: Allo Boss 2:      not detected, OLED script ok
20240614 154617 worker: IQaudIO AMP*:     not detected
20240614 154617 worker: --
20240614 154617 worker: -- ALSA debug
20240614 154617 worker: --
20240614 154617 worker: Cards:  0:AUDIO           1:vc4hdmi0        2:vc4hdmi1        3:empty          
20240614 154617 worker:         4:empty           5:empty           6:empty           7:empty          
20240614 154617 worker: Mixers: 0:none            1:none            2:none            3:none            
20240614 154617 worker:         4:none            5:none            6:none            7:none            
20240614 154617 worker: --
20240614 154617 worker: -- Audio configuration
20240614 154617 worker: --
20240614 154617 worker: Audio device:  2:SMSL USB AUDIO
20240614 154617 worker: ALSA card:     has been reassigned to 0 from 2
20240614 154617 worker: MPD config:    updated
20240614 154617 worker: ALSA output:   USB
20240614 154617 worker: ALSA mode:     Default (plughw)
20240614 154618 worker: ALSA mixer     none exists
20240614 154621 worker: ALSA volume:   controller not detected
20240614 154621 worker: ALSA maxvol:   100%
20240614 154621 worker: ALSA loopback: off
20240614 154621 worker: MPD mixer      Software
20240614 154621 worker: Audio formats: S32_LE, SPECIAL, DSD_U32_BE
20240614 154621 worker: CamillaDSP:    off
20240614 154621 worker: CDSP volume:   0dB
20240614 154621 worker: CDSP volrange: 60dB
20240614 154621 worker: --
20240614 154621 worker: -- MPD startup
20240614 154621 worker: --
20240614 154621 worker: MPD service:        started
20240614 154621 worker: MPD port 6600:      accepting connections
20240614 154621 worker: MPD ALSA Default:   on
20240614 154621 worker: MPD ALSA Bluetooth: off
20240614 154621 worker: MPD HTTP Server:    off
20240614 154621 worker: MPD volume:         75
20240614 154621 worker: Saved MPD vol:      -1
20240614 154621 worker: Saved SRC vol:      0
20240614 154621 worker: MPD crossfade:      off
20240614 154621 worker: MPD ignore CUE:     no
20240614 154621 worker: MPD CDSP volsync:   off
20240614 154621 worker: --
20240614 154621 worker: -- Music sources
20240614 154621 worker: --
20240614 154621 worker: USB drive:      USB
20240614 154621 worker: NAS sources:    no music sources defined
20240614 154621 worker: --
20240614 154621 worker: -- Feature availability
20240614 154621 worker: --
20240614 154621 worker: Input select:    available, Source: MPD, Output: SMSL USB AUDIO
20240614 154622 worker: Bluetooth:       started, PIN: None, ALSA/CDSP maxvol: 100%/0dB, ALSA outmode: Standard
20240614 154622 startAirPlay(): (/usr/bin/shairport-sync -v -a "Moode AirPlay (salon)" -- -d _audioout > /var/log/moode_shairport-sync.log 2>&1 &)
20240614 154622 worker: AirPlay:         started
20240614 154622 worker: Spotify Connect: available
20240614 154622 worker: Squeezelite:     available
20240614 154622 worker: UPnP client:     available
20240614 154622 worker: Plexamp:         not installed
20240614 154622 worker: RoonBridge:      not installed
20240614 154622 worker: Multiroom:       available
20240614 154622 worker: GPIO buttons:    available
20240614 154622 worker: HTTPS mode:      available
20240614 154622 worker: Stream recorder: n/a
20240614 154622 worker: --
20240614 154622 worker: -- Peripherals
20240614 154622 worker: --
20240614 154623 worker: Local display:   on
20240614 154623 worker: On-screen kbd:   off
20240614 154623 worker: HDMI 4K 60Hz:    off
20240614 154623 worker: Rotary encoder:  off
20240614 154623 worker: USB volume knob: off
20240614 154623 worker: LCD updater:     off
20240614 154623 worker: --
20240614 154623 worker: -- Miscellaneous
20240614 154623 worker: --
20240614 154623 worker: Software update:   Automatic check on
20240614 154623 worker: Software update:   Checking for available update...
20240614 154623 worker: Software update:   Software is up to date
20240614 154623 worker: Auto-CoverView:    on
20240614 154623 worker: CoverView timeout: Never
20240614 154623 worker: Auto-shuffle:      off
20240614 154623 worker: Auto-play:         off
20240614 154623 worker: Web SSH server:    off
20240614 154623 worker: Maintenance task:  360 mins
20240614 154623 worker: Current view:      reset to Playback
20240614 154623 worker: Active flags:      all false
20240614 154623 worker: Reset flags:       skipped
20240614 154623 worker: Session check:     ok
20240614 154623 worker: --
20240614 154623 worker: -- Startup complete
20240614 154623 worker: --
20240614 154623 worker: Mount monitor:    off
20240614 154623 worker: Radio monitor:    off
20240614 154623 worker: Watchdog monitor: started
20240614 154623 worker: Responsiveness:   Boosted
20240614 154623 worker: Sleep intervals:  worker=3, waitworker=1, watchdog=6, mountmon=30, mpdmon=6, gpiobuttons=1
20240614 154623 worker: Ready
20240614 154624 enhanceMetadata(): error: currentsong file is NULL
20240614 154629 enhanceMetadata(): error: currentsong file is NULL
20240614 154631 waitWorker(): Start sys-config, w_active=0
20240614 154631 waitWorker(): End   sys-config, w_active=0
20240614 154631 enhanceMetadata(): error: currentsong file is NULL

Thanks in advance
Reply
#2
Where do you see that message?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Interesting. I hadn't noticed this until now...{ETA} but then only my Pi 3B+ has the 7-in touchscreen attached.

With moOde 9.0.2 on Pi 3A+, Pi 3B+, Pi 4B this service starts and finishes without drama according to journalctl or systemctl.

On a Pi 5B, however,


Code:
rho@m902pi5b:~ $ systemctl status systemd-backlight@backlight:rpi_backlight.service
× systemd-backlight@backlight:rpi_backlight.service - Load/Save Screen Backlight Brightness of backlight:rpi_backlight
    Loaded: loaded (/lib/systemd/system/systemd-backlight@.service; static)
    Active: failed (Result: exit-code) since Thu 2024-06-13 10:18:47 EDT; 24h ago
      Docs: man:systemd-backlight@.service(8)
  Main PID: 345 (code=exited, status=1/FAILURE)
       CPU: 7ms

Jun 13 10:18:47 m902pi5b systemd[1]: Starting systemd-backlight@backlight:rpi_backlight.service - Load/Save Screen Backlight Brightness of backlight:rpi>
Jun 13 10:18:47 m902pi5b systemd-backlight[345]: rpi_backlight: Failed to write system 'brightness' attribute: Invalid argument
Jun 13 10:18:47 m902pi5b systemd[1]: systemd-backlight@backlight:rpi_backlight.service: Main process exited, code=exited, status=1/FAILURE


Off the top of my head I have no idea what's different about the Pi 5.,

Regards,
Kent
Reply
#4
Look in config.txt for the section below. The overlay is needed to make this path valid which allows the Pi Touch brightness to be set. /sys/class/backlight/rpi_backlight/brightness
I tested on a Pi-3B. Hopefully it's same on a 5 ?

# Pi Touch
dtoverlay=rpi-backlight
#dtoverlay=vc4-kms-dsi-7inch,invx,invy
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(06-14-2024, 02:58 PM)Tim Curtis Wrote: Look in config.txt for the section below. The overlay is needed to make this path valid which allows the Pi Touch brightness to be set. /sys/class/backlight/rpi_backlight/brightness
I tested on a Pi-3B. Hopefully it's same on a 5 ?

# Pi Touch
dtoverlay=rpi-backlight
#dtoverlay=vc4-kms-dsi-7inch,invx,invy

All the moOde/Pi-model combos I mentioned has the same Pi Touch entries in config.txt

All of them have a file /sys/class/backlight/rpi_backlight/brightness with the same permissions* and containing the string 255.

Only the Pi 5B suffers the service failure. Since I don't have a display on that device and since the failure  doesn't affect performance otherwise, I never noticed.

Maybe tonight I'll get a chance to look up the source for the binary /lib/systemd/systemd-backlight and see what it's trying to do.

Regards,
Kent

*[ETA] Oops - Actually, the permissions and group ownership are slightly different on the Pi 4B for some reason, but that didn't affect the result.
Reply
#6
Hi Kent,

I supposedly will have to use the following string, as I have an officvial 7'' display attached (well, without the comment "#"):

#dtoverlay=vc4-kms-dsi-7inch,invx,invy

where can I look up the available parameters, such as "invx", to the overlay? I am a bit titubant to update to 9.x just because of the square vs rectangle pixel...
Just wondering if something like invx, invy, pixsquare was available
Reply
#7
This overlay plus two other params is only used for rotating the screen
#dtoverlay=vc4-kms-dsi-7inch,invx,invy

Have a look at function updBootConfigTxt($action, $value) in inc/common.php

I still haven't found a solution for achieving "square" pixels when using the default KMS vidercore driver.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
I am just trying to collect some information about the "old way of doing it", in order to - possibly - get attention, and clues (from the RPi core guys) about how to make the Bookworm achieve the same result...

Thanks for the info; I'll most probably look into it Sunday evening. Have a nice w/e.
Reply


Forum Jump: