User avatar
loboris
Posts: 133
Joined: Sun May 10, 2020 10:18 pm

Re: New Ubuntu Mate arm64 RaspberryPi 4 image (minimal and server images also available)

Wed Apr 28, 2021 2:56 pm

forbiddenera wrote:
Wed Apr 28, 2021 4:37 am
Found this image looking for a 'minimal' install as I want to get the system as lean as possible and booting into a chromium kiosk as quick as possible, was hoping to setup the most minimal system then install X and lightdm/chromium for kiosk mode as currently, I was developing on a Pi4B with the official 20.04, using lightdm, though the Chromium snap seems to be missing some features? WebUSB/WebSerial/WebBT do not work.. was going to compile myself, you say your version 'works better' but don't clarify..?

curious if MATE is a better option than lightdm. As I'm using kiosk mode fullscreen, I don't actually need a window manager, desktop environment or any other GUI apps besides Chromium.

Ideally I want to get booted to full screen Chromium in under 20 seconds. I'm not against using some sort of hibernation tricks even but ideally would rather just get it light enough to not require that.

Also, does this use u-boot or what? On my pi4b with regular Ubuntu, I had to recompile u-boot for two reasons - to eliminate the boot delay and prevent it from spitting anything to the UART console (which will be used otherwise)
You've posted a lot of questions, I don't have the time to answer in more detailes now, here are just a short notes.

Mate is a Desktop Environment and lightdm is a display manager, they cannot be compared.
There are some simple ways to run Chromium in kiosk mode, I've done it long time ago on RPi 1. You don't need to install any desktop environment. There are quite a few guides on Internet, search... (example)
This image uses the standard RPi kernel, there is no initramfs (and it is not needed).
There is no u-boot also as it is not needed.
For overclock just uncomment in config.txt, notthing else is needed.
Do not do things you are not absolutelly sure are needed.

NicknDi
Posts: 59
Joined: Tue Jul 07, 2020 9:47 am

Re: New Ubuntu Mate arm64 RaspberryPi 4 image (minimal and server images also available)

Fri Apr 30, 2021 5:18 pm

Audio configuration?

Which file(s) do I need to edit, and how, so that default sound output uses usb soundcard and input uses usb webcam microphone? Currently we have to open the sound settings after every reboot and set the output to the usb soundcard. (The webcam is usually set as input/microphone, but it would be good to know which file determines that too.)

I've looked at multiple posts, but many are out of date and anyway for straight Raspberry OS. The /etc/modprobe.d/alsa-base-conf file on this image looks quite complex and unlike any others cited in various posts. I'm reluctant to edit it without being sure of what I'm doing.

My sound output devices are as follows:

Code: Select all

di@DiPi:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 2: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 4: Device [USB Audio Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

forbiddenera
Posts: 8
Joined: Wed Feb 17, 2021 2:16 am

Re: New Ubuntu Mate arm64 RaspberryPi 4 image (minimal and server images also available)

Sat May 01, 2021 3:29 am

loboris wrote:
Wed Apr 28, 2021 2:56 pm
You've posted a lot of questions, I don't have the time to answer in more detailes now, here are just a short notes.

Mate is a Desktop Environment and lightdm is a display manager, they cannot be compared.
There are some simple ways to run Chromium in kiosk mode, I've done it long time ago on RPi 1. You don't need to install any desktop environment. There are quite a few guides on Internet, search... (example)
This image uses the standard RPi kernel, there is no initramfs (and it is not needed).
There is no u-boot also as it is not needed.
For overclock just uncomment in config.txt, notthing else is needed.
Do not do things you are not absolutelly sure are needed.
Thanks, TL/DR is in bold below.

I am not familiar with MATE to know whitch part of the X stack it was in; openbox/lightdm is perfect for my setup. Getting Chromium running in Kiosk mode is no problem, I didn't need any help setting this up as we were already doing it with Pi4B - was only working towards getting the boot times for running kiosk mode as low as possible.

My main remaining issues:
1. Without initramfs, how am I able to get plymouth running for boot screens? Normally it's triggered there in Canoncial's release, I believe.. Should I just try to trigger it as early as possible in systemd maybe? Does the standard build use bootscreens/plymouth, if so how's it setup? The default installed config isn't working as like I said I believe it's triggered earlier than systemd ..?
2. Can you please update your Chromium build to version 90+? thanks
3. I'd like to be able to strip & rebuild the kernel if you can help, I believe your post mentioned that the sources are pre-installed, not sure if this is still the case for minimal..do you have any config/prep scripts for it with your boot process being a bit different?

Out of curiosity, why is u-boot not needed? canoncial's release uses u-boot and I had to modify it to get rid of any boot delays and prevent it from using the UART. I'm not as immediately familiar with the booting process on arm or why u-boot was used if it wasn't needed. I haven't actually tested but it seems like this minimal install is taking more time to init the kernel than the Canoncial release with u-boot set for no delay; but this is an empirical feeling and also comparing pi4b (canoncial/uboot) vs cm4 (your minimal)

I've gotten the boot time down to 24s from sudo reboot to Chromium ready, 22s from power on to Chromium ready and 12s from kernel init to Chromium ready. This means half of my boot time is spent in the boot loader/prekernel.

So, in seeking the best boot times I'm trying to trim the entire boot process as much as possible. With your image helping quite a bit (simply due to it already being minimal and not having to remove a ton of stuff) I think if I can trim the kernel a bit more, remove any possible boot loader delays (u-boot added 2s by default until it was configured).

Plymouth may not even be useful with such low boot times but a blank screen isn't great UX; would need Plymouth starting super early, I don't mind even stalling for 2-3 sec to show the screen but only if I can lower the pre-kernel/bootloader time as this just shows a blank screen - which makes me wonder more about the boot process here as if compiling in a boot screen to a boot loader is possible, that might be a good option, just like on a standard system you might see GRUB show a graphic until Plymouth takes over.

The first 3 lines or so of kernel text also spill onto the console even with trying to set the console to tty2 in the kernel cmdline. This will be built into a product and I want it to boot cleanly into the app without showing any kernel text or anything. Ideally, ON->BOOT SCREEN->APP, just like an Android tablet or something.

Perhaps providing build instructions for the image would help a lot of people with further customization. Personally I haven't rolled my own distro since like 2008 and a lot has changed since then. I haven't even needed to manually compile a kernel in probably just as long, which, while making me rusty on the deeper side, bodes well for Linux in general. :)

Thanks tons!

forbiddenera
Posts: 8
Joined: Wed Feb 17, 2021 2:16 am

Re: New Ubuntu Mate arm64 RaspberryPi 4 image (minimal and server images also available)

Sun May 09, 2021 11:46 pm

Hi,

Just bumping this hoping the OP will see my last post.

I'd be even willing to donate some $ to the OP for their time creating this image and answering my post for us all to have some more info and updating Chromium on their package host.

Ideally, some build instructions or insight on building it would be great so that people can replicate what you've done here..while rolling a Linux image shouldn't be too difficult and I'm sure there's lots of info out there about it, there's significantly less available doing so with a Pi/ARM-based system. Others might wish to customize some things without having to dig into all this too, so I'm sure it would be muchly appreciated.

Thanks!

forbiddenera
Posts: 8
Joined: Wed Feb 17, 2021 2:16 am

Re: New Ubuntu Mate arm64 RaspberryPi 4 image (minimal and server images also available)

Mon May 10, 2021 5:50 am

Did you simply use https://github.com/pyavitz/rpi-img-builder or ..?

Only issue I have left is trying to get a boot screen...having a blank screen for 15-20 sec after power on isn't great...

Can't seem to get plymouth to run, I think ubuntu usually runs it in an initfs early, but there's none here.. I suppose it could be started by systemd maybe but I haven't figured that out.. also I read:
PI 4B and the vc-fkms-v3d
This combination has an issue that can not be overcome. The driver needs to reset the framebuffer as it does this the contents are erased there is currently no way to stop this other than disabling the driver. The workaround is to create a service that will reload the image to the display after this reset has happened. This has the effect of having the image on screen for a moment then the screen goes black and the image comes back.
from viewtopic.php?f=66&t=276545

So, if we're using vc-fkms-v3d then plymouth/any other boot screen thing would have to exec after the firmware load I suppose..?

What's the reason for using this? I didn't see it on Canonical's release or rpi's default os?

Return to “Ubuntu”