yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi Pad 5] maverick_jia:
“No soundcards found.” -------This print comes before the kernel module is loaded, so it doesn't matter.

snd_soc_sm8150------This module is what we need and you have loaded it successfully

maverick@mipad5:~$ lsmod | grep snd
snd_q6dsp_common 49152 4 q6asm,q6afe_dai,q6afe_clocks,q6adm
snd_soc_sm8150 16384 0
snd_soc_qcom_common 16384 1 snd_soc_sm8150
snd_soc_cs35l41_i2c 16384 4
snd_soc_cs35l41 49152 1 snd_soc_cs35l41_i2c
snd_soc_cs35l41_lib 28672 2 snd_soc_cs35l41_i2c,snd_soc_cs35l41
snd_soc_wm_adsp 36864 1 snd_soc_cs35l41
cs_dsp 45056 1 snd_soc_wm_adsp

You are missing the ‘snd_q6dsp_common’ module and all its dependent modules

After all modules loaded, you can type "ls /dev/snd" to check if there is a sound card device

maverick@mipad5:~$ ls /dev/snd
by-path controlC0 pcmC0D0c pcmC0D0p seq timer
[Xiaomi Mi Pad 5] maverick_jia:
​

@TheMagicMojoMan said all of it. In my experience, the main reason for the blank screen is that GPU drivers require a lot of modules, and sometimes they don't load properly. You can try the device description file 'sm8150-xiaomi-nabu-maverick-minimal.dts' on my github. It doesn't require any modules. I've tried using it to load busybox so I can skip the GPU for debugging.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
After loading all these modules lsmod | grep snd still only shows seq timer.

Even worse, after restart:

maverick@mipad5:~$ lsmod | grep snd
maverick@mipad5:~$
[Xiaomi Mi Pad 5] TheMagicMojoMan:
@maverick_jia Could you please post the output of tree /lib/firmware?

I just want to be sure that I did not miss anything related to firmware (although I did not find any errors in the output of dmesg).

Thanks!
[Xiaomi Mi Pad 5] TheMagicMojoMan:
I did the same ;)

... and therefore still have 29 directories and 555 files. (n)
[Xiaomi Mi Pad 5] TheMagicMojoMan:
I went a different route and started from scratch with Ubuntu 22.04 (following your tutorial on how to make a Ubuntu file system image) where I added ubuntu-desktop to the package list and also copied firmware and modules to the rootfs folder (which is missing in your tutorial).

I now have a working desktop image with touch screen support and sound. However, I am currently failing to get network running because qrtr-ns.service, rmtfs.service, pd-mapper.service and tqftpserv.service are missing.

What do I have to install to get these services? (I saw that qrtr-tools are in the repository for 23.04 but not 22.04)
[Xiaomi Mi Pad 5] maverick_jia:
I followed this guide:

Qualcomm Snapdragon 835 (MSM8998) - postmarketOS Wiki

wiki.postmarketos.org
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Thanks again - that solved my problems!
[Xiaomi Mi Pad 5] TheMagicMojoMan:
I have now added a full desktop image of Ubuntu 22.04 with working touch screen and sound to https://mega.nz/folder/CVMGEAiB#7oazR3wpkKdAH2eZChtRTg

After unpacking and installing the rootfs.img and respective boot loader to your tablet (see post #1 for links to tutorials) you can login with the following credentials

Username: user , Password: ubu147147

Beware:

TURN DOWN THE VOLUME!!!

Otherwise it might blow your ears or speakers!

After login: Open a terminal and change your password by typing passwd. Next increase system size to the whole partition by typing sudo resize2fs /dev/sdaxx where xx should be number of the partition you installed the rootfs.img to.
[Xiaomi Mi Pad 5] maverick_jia:
Congrats! I hope we can continue working on this together. We can make a list of the existing problems and clean them together. It's going to be a lot of fun!
[Xiaomi Mi Pad 5] TheMagicMojoMan:
That sounds great! But I fear that I don't have enough technical expertise to be of much help. Without your guidance I would have been completely lost. I have already learned a little bit about the Linux kernel and the Linux system and am learning a little more every day. I can also fix easy stuff in source code with the help of Stackoverflow. Unfortunately, I know very little about Android.

However, I still can try to assist you as much as possible. I can do easy stuff like building and uploading images or writing tutorials or having a look into stuff that you assign me to possibly find errors.

Anyway, I am very glad that you are trying to make this tablet run as good as possible and I am highly motivated to help. And I hope that @D6072 might be possible to join us soon. The more people that use Linux on this tablet the better!
[Xiaomi Mi Pad 5] D6072:
Yes, I think I will join you since this tablet is powerful to do anything! But I can't do much jobs like contribute the codes.😞 However, I can test new function in mainline kernel!😊
[Xiaomi Mi Pad 5] TheMagicMojoMan:
@maverick_jia @D6072 Good news!

I have just upgraded the Ubuntu 22.04 version with working sound to Ubuntu 23.04 (upgrade has to be 'Force Quit' when update shows 'Searching for obsolete software' for a while) and not only the sound is still working but the problem of ultra loud sounds is gone! You can turn the volume up to full level now without destroying your speakers.

However, audio and video playback is still jerky and there are distortions in the sound at all levels which seem to have a regular pattern. Maybe every 400 ms the sound is distorted for about the same period of time and then there is a short period of time where sound seems not being distorted. It seems to me that the audio pipeline is running out of data again and again.

I will prepare an image of 23.04 and upload it later so you can have a listen for yourself.

BTW, I am not sure if this already worked in 22.04 but volume rockers and the power button are functional.
[Xiaomi Mi Pad 5] maverick_jia:
I feel that you're not who you say you are. I just give you a guide, and you can get it out very soon, you are good! You may lack a little experience, but that's okay. I just joined this forum, English is not good, a lot of things do not know. We all start with what we can do.

I'll keep working on the audio kernel driver, and I'm not sure I'll get anywhere.
[Xiaomi Mi Pad 5] maverick_jia:
I tested on the other way yesterday.

I tried to load the DSP firmware of cs35l41, which contains the algorithms for speaker protection and hibernations. The volume is lowered, but it's still distorted.

Maybe this distortion isn't caused by cs35l41? I don't know.

here is the cs35l41 route map.

add DSP by followed commands:

load DSP firmware

amixer sset "BR DSP1 Preload",0 on
amixer sset "BL DSP1 Preload",0 on
amixer sset "TR DSP1 Preload",0 on
amixer sset "TL DSP1 Preload",0 on

link DSP

amixer sset "TR PCM Source",0 DSP
amixer sset "TL PCM Source",0 DSP
amixer sset "BR PCM Source",0 DSP
amixer sset "BL PCM Source",0 DSP

connect QUAT_TDM_RX_0 to MultiMedia1, alsamixer is no needed

amixer sset "QUAT_TDM_RX_0 Audio Mixer MultiMedia1" on

Do you have any more information on this chip?
[Xiaomi Mi Pad 5] D6072:
Not sure if this is usable, but I found this on the Cirrus Logic website. In fact, this tablet uses Cirrus's sound chip.

However, the datasheet needs to send a request to get it.

CS35L41 | Cirrus Logic
[Xiaomi Mi Pad 5] D6072:
I also found the chip's status in Linux kernel:

[SRU] [PULL] [linux-firmware] [Jammy] Add cs35l41 firmware loading support

[v6,07/10] hda: cs35l41: Add support for CS35L41 in HDA systems - Patchwork

linux/sound/soc/codecs/cs35l41.h at master · torvalds/linux

Linux kernel source tree. Contribute to torvalds/linux development by creating an account on GitHub.

github.com

cs35l41.c - sound/soc/codecs/cs35l41.c - Linux source code (v6.10) - Bootlin

Elixir Cross Referencer - Explore source code in your browser - Particularly useful for the Linux kernel and other low-level projects in C/C++ (bootloaders, C libraries...)

elixir.bootlin.com

Hope it is useful for our Ubuntu OS development.
[Xiaomi Mi Pad 5] ClearStaff:
I was able to build "OEM" version of Ubuntu 23.10 from ubuntu-base, at first boot it shows account wizard, so its better than having premade account in the image, i also created systemd oneshot service that resizes filesystem at first boot and ten disables itself. I'll try to fix some rough edges and i'll upload image.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Wow - that is perfect!

Does sound work using your image? I have just upgraded from 23.04 to 23.10 and sound works but is still choppy. Using a clean build from ubuntu-base 23.10 is definitely a lot better than going the upgrade route.

I am very much looking forward testing your image :)
[Xiaomi Mi Pad 5] TheMagicMojoMan:
I have just upgraded from 23.04 to 23.10 and sound works but is still choppy. I was not able to load DSP firmware>

user@mipad5:~$ amixer sset "BR DSP1 Preload",0 on
amixer sset "BL DSP1 Preload",0 on
amixer sset "TR DSP1 Preload",0 on
amixer sset "TL DSP1 Preload",0 on
amixer: Unable to find simple control 'BR DSP1 Preload',0
amixer: Unable to find simple control 'BL DSP1 Preload',0
amixer: Unable to find simple control 'TR DSP1 Preload',0
amixer: Unable to find simple control 'TL DSP1 Preload',0
user@mipad5:~$ amixer scontrols
Simple mixer control 'Master',0
Simple mixer control 'Capture',0
[Xiaomi Mi Pad 5] ClearStaff:
Sound works, choppy audio should be fixable, i found a fix that i applied on my Arch Linux image (also very WIP) and now i need to try it on ubuntu.

For audio you need to create realtime group, add udev rule that sets GROUP=realtime for audio kernel devices, create rules that sets some sched variables for only realtime group, and then add user to realtime group (on ubuntu image i can make that configurable , so OEM post-install creates user with this group).

Basically what this fix does? It forces user to use realtime group to access audio device so pipewire launcher on user session basically uses realtime group, and the realtime group has different scheduling settings than rest of the system so it has higher priority to access cpu resources and memory.

I still need to fix VA-API not working on 23.10 (so no hardware video decoding for now), and i need to figure out if i want to add snapd, or just ignore snap altogether and predefine mozilla:ppa for firefox.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
@maverick_jia @D6072 @ClearStaff

I think I have just fixed the sound problems :)

I recognized that @maverick_jia had a folder xiaomi/nabu in /lib/firmware/qcom/sm8150 with a file adsp.mbn in it that I was missing some days before (before sound was working for me).

Making the folder and copying this file to it resulted in sound working on my image.

But there were more adsp firmware files in my /lib/firmware folder that do not show up in @maverick_jia 's tree of /lib/firmware.

I copied these as well to /lib/firmware/qcom/sm8150//xiaomi/nabu/ and now sound is not distorted anymore. Yippie!

user@mipad5:~$ sudo tree /lib/firmware/qcom/sm8150/xiaomi/
/lib/firmware/qcom/sm8150/xiaomi/
└── nabu
├── adsp.b00
├── adsp.b01
├── adsp.b02
├── adsp.b03
├── adsp.b04
├── adsp.b05
├── adsp.b06
├── adsp.b07
├── adsp.b08
├── adsp.b09
├── adsp.b10
├── adsp.b11
├── adsp.b12
├── adsp.b13
├── adsp.mbn
├── adsp.mdt
├── adspr.jsn
└── adspua.jsn

2 directories, 18 files

I will upload my full firmware folder to mega.nz next (we can clean up doubles later).
[Xiaomi Mi Pad 5] ClearStaff:
Oh yea i havent looked at device tree on Ubuntu with your Kernel, seems like arch Linux problem with audio was unrelated to this one
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Video playback on Youtube and Firefox 119.0.1 (snap version) is nonetheless butter smooth after audio fix. For testing I have just watched a video and these are the stats for nerds after 2:22 min:

Viewport Frames 1280x720*2.00 / 26 dropped of 4277

Current / Optimal Res 1920x1080@30 / 1920x1080@30

Codecs avc1.640028 (137) / opus (251)

No statistics here. I know that I would have to watch many more videos with different codecs. But it is a nice experience anyway.
[Xiaomi Mi Pad 5] ClearStaff:
Hmm.. i have not tried snap version, only the one from Mozilla PPA.
[Xiaomi Mi Pad 5] D6072:
That's nice! I will test them by the end of this week.👀
[Xiaomi Mi Pad 5] D6072:
Thanks, but how to use the firmware? Does sound fixed in your new 23.04 image?🤔
[Xiaomi Mi Pad 5] ClearStaff:
I'll try my shot at creating .deb package with firmware, i know how to create arch Linux packages so i think i'll be able to quickly get to speed with Debian packages. This way we will be able to just instalki it using dpkg on aby Debian/Ubuntu based distro.
[Xiaomi Mi Pad 5] timmy1980:
The progress here is amazing, thank you for putting your time into this. I have gone back through previous posts and I believe the state of battery and charging is that charging works, but is slow... is that correct? Apologies if I have missed something and this has already been answered.
[Xiaomi Mi Pad 5] maverick_jia:
thank you very much. I saw it, too. Only two pages:). from TheMagicMojoMan's work, the problem isn't the chip, it's the sm8150's DSP.
[Xiaomi Mi Pad 5] maverick_jia:
yes , charging works, but slow. because there is no ln8000(fast charge chip) driver yet.
[Xiaomi Mi Pad 5] timmy1980:
Thank you for confirming this, slow charging is better than no charging
[Xiaomi Mi Pad 5] maverick_jia:
I‘m sorry i miss something:

1. speed up I2C7

&i2c7 {
status = "okay";
clock-frequency = <1000000>;

cs35l41_br: cs35l41@40 {
compatible = "cirrus,cs35l41";
reg = <0x40>;
interrupt-parent = <&tlmm>;
interrupts = <81 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>;
#sound-dai-cells = <1>;
sound-name-prefix = "BR";
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <3>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
};

2.copy firmwares:

maverick@mipad5:~$ ls /lib/firmware/cirrus/
cs35l41-dsp1-spk-cali.wmfw cs35l41-dsp1-spk-prot.wmfw

3. run following commands

load DSP firmware

amixer sset "BR DSP1 Preload",0 on
amixer sset "BL DSP1 Preload",0 on
amixer sset "TR DSP1 Preload",0 on
amixer sset "TL DSP1 Preload",0 on

link DSP

amixer sset "TR PCM Source",0 DSP
amixer sset "TL PCM Source",0 DSP
amixer sset "BR PCM Source",0 DSP
amixer sset "BL PCM Source",0 DSP

connect QUAT_TDM_RX_0 to MultiMedia1, alsamixer is no needed

amixer sset "QUAT_TDM_RX_0 Audio Mixer MultiMedia1" on

It may not work, but write it down anyway.
[Xiaomi Mi Pad 5] maverick_jia:
It didn't work for me.:( I copied those files, but the problem remains.

Am I doing anything less?
[Xiaomi Mi Pad 5] maverick_jia:
I did this work(clean up) yesterday. And found it was not easy. but this is what we should do next. And than, we can release a new version with significant improvements.:)

Let me start with what I know:

crbtfw32.tlv

crnv32.bin

should be in dir 'qca', BT use those.​

novatek_nt36523_fw.bin

should be in dir 'novatek', nt36523 touch screen use it.​

cs35l41-dsp1-spk-cali.wmfw

cs35l41-dsp1-spk-prot.wmfw

if needed?? should be in dir 'cirrus', audio use those.​

board-2.bin

firmware-5.bin

used for WLAN. should be in dir 'ath10k/WCN3990/hw1.0'​

wlanmdsp.mbn

used for WLAN.Make sure your OEM wlanmdsp.mbn is in the same directory with modem.mdt (or modem.mbn)!​

a630*

a640*

used for GPU, shuold be in dir 'qcom'​

Files that can be deleted, Not used(I tested):

cpe*

Still don't know what it's for.​

slpi*

The following deployment is currently working, adsp, cdsmp, modem are not determined, I need your help to fix audio first!

maverick@mipad5:/lib/firmware$ tree .
.
|-- ath10k
| `-- WCN3990
| `-- hw1.0
| |-- board-2.bin
| `-- firmware-5.bin
|-- cirrus
| |-- cs35l41-dsp1-spk-cali.wmfw
| `-- cs35l41-dsp1-spk-prot.wmfw
|-- hp
|-- novatek
| `-- novatek_nt36523_fw.bin
|-- qca
| |-- crbtfw32.tlv
| `-- crnv32.bin
`-- qcom
|-- a630_sqe.fw
|-- a640_gmu.bin
|-- a640_zap.b00
|-- a640_zap.b01
|-- a640_zap.b02
|-- a640_zap.elf
|-- a640_zap.mdt
`-- sm8150
|-- cdsp.b00
|-- cdsp.b01
|-- cdsp.b02
|-- cdsp.b03
|-- cdsp.b04
|-- cdsp.b05
|-- cdsp.b06
|-- cdsp.b08
|-- cdsp.b10
|-- cdsp.mdt
|-- cdspr.jsn
|-- modem.b00
|-- modem.b01
|-- modem.b02
|-- modem.b03
|-- modem.b04
|-- modem.b05
|-- modem.b06
|-- modem.b07
|-- modem.b08
|-- modem.b09
|-- modem.b10
|-- modem.b11
|-- modem.b13
|-- modem.b14
|-- modem.b15
|-- modem.b17
|-- modem.b18
|-- modem.b19
|-- modem.b20
|-- modem.b21
|-- modem.b22
|-- modem.mdt
|-- modemr.jsn
|-- modemuw.jsn
|-- nabu
| |-- adsp.b00
| |-- adsp.b01
| |-- adsp.b02
| |-- adsp.b03
| |-- adsp.b04
| |-- adsp.b05
| |-- adsp.b06
| |-- adsp.b07
| |-- adsp.b08
| |-- adsp.b09
| |-- adsp.b10
| |-- adsp.b11
| |-- adsp.b12
| |-- adsp.b13
| |-- adsp.mdt
| |-- adspr.jsn
| |-- adspua.jsn
| |-- cdsp.b00
| |-- cdsp.b01
| |-- cdsp.b02
| |-- cdsp.b03
| |-- cdsp.b04
| |-- cdsp.b05
| |-- cdsp.b06
| |-- cdsp.b08
| |-- cdsp.b10
| |-- cdsp.mdt
| |-- cdspr.jsn
| |-- modem.b00
| |-- modem.b01
| |-- modem.b02
| |-- modem.b03
| |-- modem.b04
| |-- modem.b05
| |-- modem.b06
| |-- modem.b07
| |-- modem.b08
| |-- modem.b09
| |-- modem.b10
| |-- modem.b11
| |-- modem.b13
| |-- modem.b14
| |-- modem.b15
| |-- modem.b17
| |-- modem.b18
| |-- modem.b19
| |-- modem.b20
| |-- modem.b21
| |-- modem.b22
| |-- modem.mdt
| |-- modemr.jsn
| |-- modemuw.jsn
| `-- wlanmdsp.mbn
|-- wlanmdsp.mbn
`-- xiaomi
`-- nabu
|-- adsp.b00
|-- adsp.b01
|-- adsp.b02
|-- adsp.b03
|-- adsp.b04
|-- adsp.b05
|-- adsp.b06
|-- adsp.b07
|-- adsp.b08
|-- adsp.b09
|-- adsp.b10
|-- adsp.b11
|-- adsp.b12
|-- adsp.b13
|-- adsp.mbn
|-- adsp.mdt
|-- adspr.jsn
|-- adspua.jsn
|-- cdsp.mbn
`-- modem.mbn

12 directories, 123 files
[Xiaomi Mi Pad 5] D6072:
It's normal since there is no power management driver in mainline kernel.
[Xiaomi Mi Pad 5] ClearStaff:
@maverick_jia

If you can, next time you recompile kernel please do it with BINFMT_MISC set, this is the only real difference except some debug stuff and DT firmware paths between our kernel builds.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
I was thinking about the same and I am very grateful that you will try it.

We finally also have to think about an easy upgrade process of the kernel. Modules folder could be upgraded by a .deb package as well but what about bootloader?

This has to be written to the correct partition (/dev/sde14 for boot_a or /dev/sde37 for boot_b) and currently boot loader also tries to boot the system from /dev/sdaxx with xx=31,32,33 depending on how users have partitioned their harddrive. This procedure to boot the system is not easy to maintain.

Should we better switch to boot loader identifying the system image by UUId or name of the partition?

What do you think? @ClearStaff @maverick_jia
[Xiaomi Mi Pad 5] ClearStaff:
On Arch Linux i have a device support package, with kernel, modules + firmware, and a boot update script. In ramdisk i have init script that searches for a partition labeled "archnabu" and switches root to it (then systemd boots as usual). We can't supply root=/dev/block/by-label/ubuntu as a kernel parameter because by-label is propagaded by udev at boot, so it's not available from the start on kernel.

I think we have two ways of doing this.

Way 1 (i would like to call it halium way, as ubports do something similar) :

- create kernel package with post-install hook to update-initramfs, and create + write boot.img

- our initramfs must contain init script that searches for a rootfs (for example by label after udev does its thing), but i would have to learn first how to change default behaviour of update-initramfs (how to create hooks)

- init script then mounts rootfs into predefined directory and switches root to it

PROS: we do not need root= kernel parameter cause init will search for root, we have a way to update kernel + modules and possibly firmware with PPA repository

CONS: we need to figure out how to modify initrd, how to get current boot slot on ubuntu and i would have to write init script from scratch

Way 2 (i would like to call it stupidly simple straightforward way)

- we dont care about initrd at all, but still maintain kernel + firmware packages

- kernel package has a post-install hook to create boot.img

- but instead of going the initrd way we make our post-install hook somewhat smarter

- we read current kernel parameters (along with root=) from /proc/cmdline and propagade it into new boot.img

PROS: simpler, no need to use update-initramfs at all, user can name ubuntu partition like he wants, if we have a power user and he changes some kernel parameters in boot.img for himself the changes will persist updates

CONS: we still need to get current slot on ubuntu, and post-install hook script is slightly more complex than in Way 1
[Xiaomi Mi Pad 5] TheMagicMojoMan:
@ClearStaff @maverick_jia

I think we should aim for a unified code base that is in line e.g. with how other systems organize their firmware paths.

Regarding kernel configuration I would kindly like to ask for the following:

CONFIG_LOCALVERSION="-nabu"
CONFIG_LOCALVERSION_AUTO=n

LOCALVERSION_AUTO=y caused a lot of trouble for me in the beginning because it always generates a new suffix for the kernel.

This resulted in black screen when I recompiled the kernel and made a new bootloader and flashed this to the tablet. I only learned later that this was due to mismatch of VERMAGIG of the old modules and that I would always have to copy the new /lib/modules/6.1.10-xxxxx folder to the system. I guess that might have been @D6072 's problem as well.

When we set kernel name to a fixed value we could easily compile a new kernel and just exchange the bootloader (as long as the version number of the kernel stays the same) or we could easily add a single module to the /lib/modules folder.

CONFIG_SCSI_UFS_BSG=y

This is needed for qbootctl to work which would allow us to switch slots so that we can get back to Android.

CONFIG_EXFAT_FS=y

Nowadays exfat is more widely used and should just work out of the box.

(Anecdote: I had to reformat my external HD to exfat because my fu***** iPad cannot read or write NTFS. On the other hand, if you attach an external HD that is formatted to exfat MacOS takes minutes to mount it because it always checks the HD first which cannot simply be turned off.)

CONFIG_SND_USB_AUDIO=y
CONFIG_USB_CONFIGFS_F_MIDI=y

There will be other musicians (like me) that will finally use the tablet for the purpose of making music and they simply expect audio and midi to work out of the box when they connect to their external hardware.
[Xiaomi Mi Pad 5] maverick_jia:
I'm not sure how it works. Does this require a UEFI support, such as successfully porting edk2?

If UEFI is available, the bootloader can use uboot or grub to load the kernel and file system.
[Xiaomi Mi Pad 5] ClearStaff:
I don't think we need to have resort to edk2 booting linux, but it could be nice for multiboot functionality. I can check later if we are able to boot linux using edk2.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
@ClearStaff @maverick_jia

I would prefer Way 2 because it seems to be simpler and a normal mortal like me could also be able to understand what is going on :)

(I don't know how to setup initrd or initramfs properly and I am happy that our current bootloader does not use any of the two).

It should also be possible to have multiple partitions of Ubuntu on our disks and have bootloaders that allow us to switch between them. In that sense booting /dev/sdxx is more flexible.

[For testing purposes I currently have three partitions with PMos and two flavors of Ubuntu on my disk and I switch by dd'ing the respective boot loader to boot_a.]

qbootctl -areturns the currently active slot.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Windows 11 for this tablet uses UEFI. We might use their bootloader?
[Xiaomi Mi Pad 5] D6072:
I have been tried booting linux via UEFI. You can load a boot image via simpleinit. But via grub, well... you can see text appears, but kernel will not boot at all.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
@maverick_jia Are you still on 22.04? I did not test with 22.04 and 23.04.

No, I upgraded to 23.10 first and only then found the fix.

But you can do the fix by yourself. The adsp.* are somewhere in /lib/firmware. I don't remember exactly where. Try in terminal

sudo find /lib/firmware/ -iname adsp.*

The output shows where the files are located. Then

sudo mv /path/to/files/adsp.* /lib/firmware/qcom/sm8150/xiaomi/nabu/

Reboot and hopefully it will work.

All of this will be fixed in the upcoming Ubuntu image of @ClearStaff .