Debian Bookworm for OpenFrame

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
User avatar
roobarb!
Posts: 1747
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Debian Bookworm for OpenFrame

Post by roobarb! »

Man in a van wrote: Tue Jul 25, 2023 10:58 am This is repeated for the download available today (25th July)
Looks like an external issue with the repos being updated at the same time as the image build was attempted, it's in the log for that build.

Code: Select all

Failed to fetch http://deb.debian.org/debian/dists/bookworm/main/i18n/Translation-en.xz  File has unexpected size (6077872 != 6075628). Mirror sync in progress? 
I've also cleared out the caches as it'll be building again tonight anyway (6.1.42 is out) and Bookworm 12.1 changed a bunch of packages.

Looks like it has a busy night ahead, 5.10.188 is out for the Bullseye release too. Wish it luck! 😁
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
Man in a van
Posts: 486
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Debian Bookworm for OpenFrame

Post by Man in a van »

:) Thanks Boss, trouble at t'mill solved :)

I tried that Mastodon, but used another username (what was the nickname for a bus conductor?)

anyways I could not get connected to the dvsn server

all good now. I'll check Bullseye when I get time

ronnie
User avatar
roobarb!
Posts: 1747
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Debian Bookworm for OpenFrame

Post by roobarb! »

Odd little thing, it would seem that permissions for cron are not being set correctly while the image is being built. Next images have a fix applied on first boot, but if you get an "access denied" error when setting up your crontab, do this:

Code: Select all

sudo -s
chown :crontab /usr/bin/crontab
chmod 2755 /usr/bin/crontab
chown :crontab /var/spool/cron/crontabs
chmod 1730 /var/spool/cron/crontabs
reboot
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
cszhy
Posts: 137
Joined: Sun Apr 24, 2011 5:25 am

Re: Debian Bookworm for OpenFrame

Post by cszhy »

hi roobarb:
thanks for the build!
is this bookworm version with a squeezeplay in it originally?
Man in a van
Posts: 486
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Debian Bookworm for OpenFrame

Post by Man in a van »

@cszhy

Just run

Code: Select all

sudo of-install squeezeplay
and you will get your answer :)

ronnie
cszhy
Posts: 137
Joined: Sun Apr 24, 2011 5:25 am

Re: Debian Bookworm for OpenFrame

Post by cszhy »

Man in a van wrote:Thanks Boss :)

I have been playing with the Release Candidates for a while.

Apparently there will be a point release in a month or; it was pushed out with over a 100 bugs still to be squashed! :shock:

Anyway, I had already built the Binaries for LMS, so here is O2 Joggler running LMS v8.4.0, Squeezelite on the internal speaker, and Jivelite for control.
Logitech Media Server Version: 8.4.0 - 1686847919 @ Thu 15 Jun 2023 07:26:26 PM CEST
Hostname: openframe
Server IP Address: 192.168.1.123
Server HTTP Port Number: 9000
Operating system: Debian - EN - utf8
Platform Architecture: i686-linux
Perl Version: 5.36.0 - i686-linux-gnu-thread-multi-64int
Audio::Scan: 1.06
IO::Socket::SSL: 2.081
Database Version: DBD::SQLite 1.58 (sqlite 3.22.0)
Total Players Recognized: 1
openframe
Player Model: SqueezeLite
Player Type: squeezelite
Firmware: v1.9.9-1414
Player IP Address: 192.168.1.123
Player MAC Address:
Image


ronnie
Hi Ronni:
do u mean that both the LMS and squeezelite can both running on joggler's internal memory drive?

通过我的 PCCM00 上的 Tapatalk发言

Man in a van
Posts: 486
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Debian Bookworm for OpenFrame

Post by Man in a van »

cszhy wrote: Thu Sep 21, 2023 3:22 pm Hi Ronni:
do u mean that both the LMS and squeezelite can both running on joggler's internal memory drive?

通过我的 PCCM00 上的 Tapatalk发言
I am certain that I have answered this before

I don't think it is worhwhile using the internal Joggler ram with either Bullseye or Bookworm.

This is LMS 8.4.0 installed on a sd card (Bullseye image) which has not been expanded (so it replicates the size of the Joggler internal ram)
of@openframe:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 243M 0 243M 0% /dev
tmpfs 50M 2.8M 47M 6% /run
/dev/sda2 923M 608M 269M 70% /
tmpfs 246M 0 246M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 192M 24K 192M 1% /tmp
tmpfs 256M 69M 188M 27% /var/cache/apt
tmpfs 256M 128M 129M 50% /var/lib/apt/lists
tmpfs 16M 252K 16M 2% /var/log
/dev/sda1 41M 14M 28M 34% /boot
tmpfs 50M 0 50M 0% /run/user/1000
One can see that there is only 30% of space left

ronnie
Man in a van
Posts: 486
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Debian Bookworm for OpenFrame

Post by Man in a van »

I have just installed a copy of Ralphy's Squeezeplay on the above Bullesye image

I added the Radio Paradise Plugin to the LMS

Image
/dev/sda2 923M 626M 251M 72% /
It needs more work; the appearance of album art is sporadic / non existant, it's currently started by command line instruction.

It's using the internal default speaker, the screen calibration is not correct.

Improving on these settings requires time and, just as importantly, extra ram.

ronnie
Man in a van
Posts: 486
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Debian Bookworm for OpenFrame

Post by Man in a van »

I would use the prior one (but remember this image is for experimentaion, so I treat it a bit like a beta :)

Also Debian have just updated Bookworm to version 12.2 (I don't know if this effects the build process)

Hopefully @roobarb! will pick up on this thread in a day or so

ronnie
Man in a van
Posts: 486
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Debian Bookworm for OpenFrame

Post by Man in a van »

I have this up and running with a Topping DX3 Pro dac attatched.

I used

Code: Select all

https://www.jogglerwiki.com/forum/viewtopic.php?f=2&t=5141
and changed the version to squeezelite-1.9.9.1421-i686.tar.gz

I tried to create the reboot/shutdown script from your Bullseye but without any success :roll:

ronnie
stripwax
Posts: 19
Joined: Sun Dec 29, 2019 12:51 pm

Re: Debian Bookworm for OpenFrame

Post by stripwax »

Man in a van wrote: Wed Oct 11, 2023 12:16 pm I tried to create the reboot/shutdown script from your Bullseye but without any success :roll:

Not too surprised by that. I can take a look at Bookworm maybe later.
stripwax
Posts: 19
Joined: Sun Dec 29, 2019 12:51 pm

Re: Debian Bookworm for OpenFrame

Post by stripwax »

Man in a van wrote: Tue Oct 10, 2023 9:43 am I would use the prior one (but remember this image is for experimentaion, so I treat it a bit like a beta :)
Happy to report that it worked for me, after a bit of fiddling which I suspect was related to iffy wifi during the setup process (and aforementioned memory stick corruption). I think what actually happened was that the setup process failed, then I couldn't log in via SSH, so I had to pull the power to reboot, which caused usb to remount readonly, and then all sorts of problems after that. This time, clean download, and having strong wifi signal, all was good. And as you said on the other thread, BBC Sounds worked out-of-the-box :-) (I'm using headphone out)

I'll take a look at the reboot/shutdown permissions next ;)
stripwax
Posts: 19
Joined: Sun Dec 29, 2019 12:51 pm

Re: Debian Bookworm for OpenFrame

Post by stripwax »

stripwax wrote: Wed Oct 11, 2023 12:43 pm
Man in a van wrote: Wed Oct 11, 2023 12:16 pm I tried to create the reboot/shutdown script from your Bullseye but without any success :roll:

Not too surprised by that. I can take a look at Bookworm maybe later.
Ok here we go. Bookworm has the newer policykit , so the rules definitions are totally different. But because I now sortof know what I'm doing, this was easy:

Code: Select all

cd /etc/polkit-1
sudo nano rules.d/60-squeezeplay.rules
Then paste in the following and save it

Code: Select all

polkit.addRule(function(action, subject) {
    if (subject.user == "squeezeplay") {
        // permit reboot/etc actions for squeezeplay user (jive UI)
        if (action.id == "org.freedesktop.login1.power-off" ||
            action.id == "org.freedesktop.login1.reboot" ||
            action.id == "org.freedesktop.login1.set-wall-message" ||
            action.id == "org.freedesktop.login1.power-off-multiple-sessions" ||
            action.id == "org.freedesktop.login1.reboot-multiple-sessions") {
            return polkit.Result.YES;
        }
    }
});
(Or use a different editor if you don't like using nano)

That's all there is to it. Don't even need to reboot to pick up changes, since polkit monitors the rules.d directory.
User avatar
roobarb!
Posts: 1747
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Debian Bookworm for OpenFrame

Post by roobarb! »

Man in a van wrote: Tue Oct 10, 2023 9:43 am
I would use the prior one (but remember this image is for experimentaion, so I treat it a bit like a beta :)

Also Debian have just updated Bookworm to version 12.2 (I don't know if this effects the build process)

Hopefully @roobarb! will pick up on this thread in a day or so

ronnie
Fixed!

Looks like apt got a bit upset during the last run, complaining about an incomplete repo. It would likely have worked the next time a build was triggered by a new kernel, but I really should have it remove failed builds and redirect to the previous version automatically.
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
Man in a van
Posts: 486
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Debian Bookworm for OpenFrame

Post by Man in a van »

@roobarb!

Thanks Boss ;)

ronnie
stripwax
Posts: 19
Joined: Sun Dec 29, 2019 12:51 pm

Re: Debian Bookworm for OpenFrame

Post by stripwax »

1. Do we think that adding the polkit stuff should be part of the "of-install squeezeplay" script, or is it part of upstream Squeezeplay, or something else? Would be good to get that upstream somewhere, but point me in the right direction if I should take that elsewhere!


2. Unrelated observation: I noticed that /tmp was mounted from /dev/sda2 - feels like that should just be tmpfs instead? I can confirm that this seems to work fine (I picked 8M although that's certainly way too much, only using 28K currently)

Code: Select all

# /etc/fstab
tmpfs    /tmp                 tmpfs   noatime,size=8M       0    0

Code: Select all

root@openframe:/tmp# du -h -d 0 /tmp
28K     /tmp

3. Also, I'm glad (?) to report that all the other problems I had seemed to be caused by random filesystem corruption for whatever reason. Clues were all here:
viewtopic.php?t=5045&start=20
viewtopic.php?p=32683

I got into a messy bootloop recently, and a swift fsck sorted that out.
So that got me thinking - does it really make sense for the fstab to have the remount-ro flag but NOT have the pass=1 set (which would enable filesystem to be automatically fsck'd , as I understand it)? I'm not a Linux sysadmin so I don't really know what the downsides might be, it just seems like a good option to automatically fsck, rather than mount readonly and then get in a confusing slightly-unusable state. Thoughts?

Other thoughts - how many files are actually written to in practice, apart from the /tmp and /var/log stuff? The main culprits seem to be the stuff in userpath/settings:

Code: Select all

root@openframe:/home/squeezeplay/.squeezeplay/userpath/settings# ls
AlarmSnooze.lua        NowPlaying.lua          SetupAppletInstaller.lua  SlimDiscovery.lua
ChooseMusicSource.lua  OpenFrameBacklight.lua  SetupDateTime.lua
CustomizeHomeMenu.lua  Playback.lua            SetupLanguage.lua
DesktopJive.lua        ScreenSavers.lua        SetupWelcome.lua
It feels a bit like a bug that NowPlaying.lua is updated every few seconds with content that isn't actually changing. Fixing this (upsteam in Squeezeplay?) sounds like a good thing to look into. Happy to try, if you think that makes sense. (Update: https://github.com/ralph-irving/squeezeplay/issues/18)
User avatar
roobarb!
Posts: 1747
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Debian Bookworm for OpenFrame

Post by roobarb! »

stripwax wrote: Mon Oct 16, 2023 11:42 pm 1. Do we think that adding the polkit stuff should be part of the "of-install squeezeplay" script, or is it part of upstream Squeezeplay, or something else? Would be good to get that upstream somewhere, but point me in the right direction if I should take that elsewhere!
I've thrown that into the install script for Bookworm now, ta!

The scripts don't auto-update any more, so this'll only appear in new builds. There used to be a cool update server thing, but it felt like overkill.
stripwax wrote: Mon Oct 16, 2023 11:42 pm2. Unrelated observation: I noticed that /tmp was mounted from /dev/sda2 - feels like that should just be tmpfs instead? I can confirm that this seems to work fine (I picked 8M although that's certainly way too much, only using 28K currently)
Now I forget precisely why, but I'm certain something gets upset (apt, maybe?) when it can't dump a bunch o' stuff in /tmp for a few moments. That's why it reverts to normal storage rather than tmpfs when an external device is used and the of-expand command is run.

This may have been a bug in earlier versions, let me know if you bump into any weirdness.
stripwax wrote: Mon Oct 16, 2023 11:42 pm3. Also, I'm glad (?) to report that all the other problems I had seemed to be caused by random filesystem corruption for whatever reason. Clues were all here:
viewtopic.php?t=5045&start=20
viewtopic.php?p=32683

I got into a messy bootloop recently, and a swift fsck sorted that out.
So that got me thinking - does it really make sense for the fstab to have the remount-ro flag but NOT have the pass=1 set (which would enable filesystem to be automatically fsck'd , as I understand it)? I'm not a Linux sysadmin so I don't really know what the downsides might be, it just seems like a good option to automatically fsck, rather than mount readonly and then get in a confusing slightly-unusable state. Thoughts?
This harps back to considering the device like a lamp and not ever getting properly shut down, just powered off from the wall. As I remember things, having an fsck check at boot essentially caused it to fsck on every boot, which takes a while, and as we're using ext2 and treating this thing like an appliance it should just come back up and not whine about it. ;)
stripwax wrote: Mon Oct 16, 2023 11:42 pm Other thoughts - how many files are actually written to in practice, apart from the /tmp and /var/log stuff? The main culprits seem to be the stuff in userpath/settings:

Code: Select all

root@openframe:/home/squeezeplay/.squeezeplay/userpath/settings# ls
AlarmSnooze.lua        NowPlaying.lua          SetupAppletInstaller.lua  SlimDiscovery.lua
ChooseMusicSource.lua  OpenFrameBacklight.lua  SetupDateTime.lua
CustomizeHomeMenu.lua  Playback.lua            SetupLanguage.lua
DesktopJive.lua        ScreenSavers.lua        SetupWelcome.lua
It feels a bit like a bug that NowPlaying.lua is updated every few seconds with content that isn't actually changing. Fixing this (upsteam in Squeezeplay?) sounds like a good thing to look into. Happy to try, if you think that makes sense. (Update: https://github.com/ralph-irving/squeezeplay/issues/18)
I am happy to check out at this point. That's an application problem, not an OS issue! :lol:
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
stripwax
Posts: 19
Joined: Sun Dec 29, 2019 12:51 pm

Re: Debian Bookworm for OpenFrame

Post by stripwax »

roobarb! wrote: Tue Oct 17, 2023 12:49 pm I've thrown that into the install script for Bookworm now, ta!
The scripts don't auto-update any more, so this'll only appear in new builds. There used to be a cool update server thing, but it felt like overkill.
Got it - thanks! (BTW I also did a corresponding polkit entry for Bullseye - other thread)
roobarb! wrote: Tue Oct 17, 2023 12:49 pm Now I forget precisely why, but I'm certain something gets upset (apt, maybe?) when it can't dump a bunch o' stuff in /tmp for a few moments. That's why it reverts to normal storage rather than tmpfs when an external device is used and the of-expand command is run.
This may have been a bug in earlier versions, let me know if you bump into any weirdness.
No weirdness spotted yet... I had NOT realized/appreciated that this only happens when using of-expand. So if I run from external device, but don't expand, then /tmp would still be tmpfs? And if I run from internal, /tmp is tmpfs too? (Makes sense if so; and probably explains why I've not seen weirdness?)
roobarb! wrote: Tue Oct 17, 2023 12:49 pm
stripwax wrote: Mon Oct 16, 2023 11:42 pmdoes it really make sense for the fstab to have the remount-ro flag but NOT have the pass=1 set (which would enable filesystem to be automatically fsck'd , as I understand it)?
...
Other thoughts - how many files are actually written to in practice, apart from the /tmp and /var/log stuff? The main culprits seem to be the stuff in userpath/settings
This harps back to considering the device like a lamp and not ever getting properly shut down, just powered off from the wall. As I remember things, having an fsck check at boot essentially caused it to fsck on every boot, which takes a while, and as we're using ext2 and treating this thing like an appliance it should just come back up and not whine about it. ;)
Yeah, fsck on every boot would certainly suck. I'm trying to best understand the alternative i.e. the recommended "here's a configuration that's supposed to work". If /home/squeezeplay/.userpath/settings (and MAYBE /tmp) are readwrite on the flash, then power-off-from-the-wall is likely to always corrupt (especially if there's a lot of regular write activity there). And then the device will restart with flash mounted readonly, and then it won't work propertly, because /tmp and /home/squeezeplay/.userpath/settings won't be writeable (where the latter causes the Now Playing to stop working, and the former I think maybe causes some of the bootlooping), and fsck is disabled.

So the recommendation must be to configure so that it works properly even if the flash is mounted readonly? So /home/squeezeplay should be tmpfs too? Or should I try out with a journal (ext3 or more likely ext4)? Not sure it's clicking into place for me yet.

If not using external storage, is this configured differently? maybe that's what I'm missing / not understanding.
roobarb! wrote: Tue Oct 17, 2023 12:49 pm
stripwax wrote: Mon Oct 16, 2023 11:42 pm (Update: https://github.com/ralph-irving/squeezeplay/issues/18)
I am happy to check out at this point. That's an application problem, not an OS issue! :lol:
Yeah, I agree :-) Eliminating some of this 'stuff' ought to make the chosen OS configuration more robust in the face of blips and failures.
Paul Webster
Posts: 155
Joined: Mon Jul 18, 2011 7:56 am

Re: Debian Bookworm for OpenFrame

Post by Paul Webster »

I thought I would give Bookworm a try.
I downloaded it a few days ago and had problems with it being very very slow (over an hour to install SqueezzePlay).
However, I was using new and unknown brand USB stick ...
So today I tried again with a SanDisk and it is much much better - back to normal.
However, I didn't download the new image from yesterday so I hit a problem that the recent update appears to have resolved .... anyway ... I'll mention it.

I switch from built-in audio to USB and SqueezePlay tells me to relaunch - but relaunch is not longer in the Quit menu.
I couldn't reboot from there because of the issue that the Polkit update has resolved and I didn't want to simply pull the plug ... so I ssh'd in and did a reboot from there.

In any case - I think it would be useful to have Relaunch in SqueezePlay again.

Edit:
Just been to birdslikewires to download latest and it is the same as one that I downloaded on evening of 16th.
So if the change is in there then I think it did not work.
Post Reply