yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi Pad 5] dskw:
Interesting..

I have seen similar results to your ~1k glmark points in 6.1.10, also slighly going down on consecutive runs.

Although I was unable to test with plasma.

glmark2-wayland threw me an error about incompatible mesa libraries between its binary and the environment.

Might be due to me having activate the updates sources and getting some changes in.

The important comparison for me was connecting to a FoundryVTT instance to compare map render performance and it did not really offer any higher speed regardless of the desktop environment.

I still have not tried to install windows 11 to compare the performance with that, but I always assumed it would be lower compared to a arm64 based linux.

I do wonder though if a different screen frequency would also affect my render performance in foundry.. need to find out how to change it to try out.
[Xiaomi Mi Pad 5] dskw:
There are also some minor annoyances in performance that I don't quite understand:

@TheMagicMojoMan how is the gnome terminal behaving if you open it full screen and have a bit of history to scroll through?

It becomes usuable for me once maximized.

Any idea what could be tweaked to improve performance?

I'm also considering other DEs but so far only Gnome and KDE gave reasonable performance.

Haven't looked into Xfce and wayland support, if that is an option.

EDIT:

I've tried out cinnamon, enlightment and weston with wayland, so far no big performance gain for my use case.

Xfce wayland support is still in development.
[Xiaomi Mi Pad 5] ClearStaff:
Cinnamon wayland support is pre-alpha and very experimental, MATE with wayfire works really fast but its unusable without keyboard / mouse.

@Mateus Lima133113 for now it boots with a boot.img on separate boot slot, i've pretty much finished UEFI booting support, now i just need to update packages and images.
[Xiaomi Mi Pad 5] MateusL13:
That's so great!! I would love to test it 😁
[Xiaomi Mi Pad 5] MateusL13:
I just installed it, it's soooooo cool to see Ubuntu running on my pad 5 🤩🤩🤩

Your latest 0.91 it's great, the OEM mode it's really cool, will guys support 24.04 in the future? Also, is there any 22.04 OEM mode roots.img for it?
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Welcome to the 'Linux on Nabu' family and thank you so much for your nice feedback! We are glad that you are here and became a user, tester and maybe even developer who supports our efforts.

We will definitely support 24.04 when it becomes mature enough to be usable.

Not sure about OEM mode in 22.04. We are currently working on fixing remaining problems with kernel 6.7 and @ClearStaff has something big in the making which needs to be finished.
[Xiaomi Mi Pad 5] bigfoothart:
Would be great to have also zram in kernel if it's possible
[Xiaomi Mi Pad 5] MateusL13:
That's so great to hear, I can't wait to see what's coming!!!

I would love to help, but unfortunately I'm not a developer, just a very happy 'Linux on nabu' user, and I'm really impressed with how good is Ubuntu on nabu 🤩

Also, is there any linux on nabu telegram group with the developers?
[Xiaomi Mi Pad 5] TheMagicMojoMan:
I have just uploaded new bootloaders and linux-xiaomi-nabu.deb with zram module.

Please download the files, extract boot loaders and then install the following:

$ cd Downloads
$ sudo dpkg -i linux-xiaomi-nabu.deb
$ sudo apt install zram-config

If Android is installed in slot a then:

$ cd bootloader
$ sudo dd if=boot_Ubuntu.img of=/dev/sde37

Otherwise if Android is installed in slot b then:

$ cd bootloader
$ sudo dd if=boot_Ubuntu.img of=/dev/sde14

After reboot:

$ swapon --show
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 2.7G 0B 5
[Xiaomi Mi Pad 5] D6072:
Hello guys, I am going to create a website on Gitbook to share our Mi Pad 5 linux project. Would you guys allow me to do this?

I'll write those things:

Distributions that supported this tablet and hardware support status.

The kernel source link and the image download link.

Installation guide and other software configuration guides.

Feel free to visit this site to edit it if we have any updates and you guys allowed: https://app.gitbook.com/invite/FqoAK5wps4RL0mJz4lFv/GZIGlnZ4G3nTZtesTbvU
[Xiaomi Mi Pad 5] dskw:
I'm in favor of organizing the available information and efforts, but I have no experience using gitbook. Can anyone visiting edit the content? Or is there some sort of admin vs visitor page?

We could simply use what the windows group has done:

Set up a github page and use markdown for documents describing the process.

A project or organization could then also host source code projects for scripts or custom kernel configurations.
[Xiaomi Mi Pad 5] maverick_jia:
Hi, all.

I've pushed drivers about fast charging. I didn't test it fully, but I couldn't wait to push it.

This driver took me a lot of time, and I wanted to give up once because the Xiaomi charging adaptor is encrypted.

The fast charge function is worked so far, but it still needs to be improved.

Only supports the matching 33W charging adaptor.

The power can reach up to 28W, about 9.2V/3.1A.

You'd better have a small device that measures charging voltage and current, or wait for me to test it more.
[Xiaomi Mi Pad 5] D6072:
I've already set permissions to "editor", so you can edit the page at anytime. Once it's ready, I'll publish it on web.

Important note: Only edit on the "Linux for Mi Pad 5" page, don't touch any other pages. There are my own works, please.

UPDATE: It's ready. Link is

It's Linux, On Mi Pad 5. | Linux for Mi Pad 5

The fastest mainline tablet all the time.

the-gnu-genshin-project.gitbook.io
[Xiaomi Mi Pad 5] maverick_jia:
a simple guide to boot ubuntu use uefi​

I knew it was done, I just do it again by myself and write it down.

build uefi image​

I use renegada-project to build a uefi boot image.

git clone --recursive git@github.com:edk2-porting/edk2-msm.git
cd edk2-msm

replace the dtb file "sm8150-xiaomi-nabu.dtb" in "edk2-msm/Platform/Xiaomi/sm8150/FdtBlob/nabu/" with the kernel dtb file "sm8150-xiaomi-nabu.dtb" which you used in arm ubuntu.

rename to "sm8150-xiaomi-nabu.dtb"

build image:

./build.sh --clean
./build.sh -d nabu

now I got the "boot-nabu.img" in the edk2-msm directory.

Assign an ESP partition​

enter twrp mode, in an adb shell:

sh-5.0# parted /dev/block/sda
rm 32
mkpart esp fat32 50.0GB 51GB
mkfs.fat -F32 -s1 /dev/block/sda32
set 32 esp on
mkpart ubuntu 51GB 100GB

do sgdisk --resize-table 64 /dev/block/sda if you need to extend the number of partitions from 32 to 64

mount esp partition on ubuntu​

get the hard disk uuid:

sudo blkid /dev/sda32
[sudo] password for maverick:
/dev/sda32: UUID="6E63-6E6D" BLOCK_SIZE="4096" TYPE="vfat" PARTLABEL="esp" PARTUUID="f7279afd-7711-4d94-98b3-a47010ace7b6"
maverick@mipad5:~$ sudo blkid /dev/sda33
/dev/sda33: UUID="5fc26a7f-6583-4643-bbf4-668052b5bca4" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="ubuntu" PARTUUID="f5701264-5c8a-4ed0-8eef-fe828a1ee1b0"

modify /etc/fstab, use the uuids above

maverick@mipad5:~$ cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
UUID=5fc26a7f-6583-4643-bbf4-668052b5bca4 / ext4 errors=remount-ro 0 1
UUID=6E63-6E6D /boot/efi vfat umask=0077 0

after reboot, you can use the "mount" command to check whether the esp partition is mounted.

install grub on ubuntu​

install grub tools:

sudo apt-get install grub2-common grub-efi
sudo grub-install --target=arm64-efi --boot-directory=/boot

copy kernel images to /boot

sudo cp config-6.1.10-nabu System.map-6.1.10-nabu vmlinuz-6.1.10-nabu /boot

generate initrd.img

sudo apt install initramfs-tools
mkinitramfs -o /boot/initrd.img 6.1.10-nabu

generate grub configuration file

sudo grub-mkconfig -o /boot/grub/grub.cfg

reboot

Flash boot-nabu.img to boot_a or boot_b
[Xiaomi Mi Pad 5] MateusL13:
It works perfectly, now I have 5,7 + 2.7 GB of RAM 🤩

Just kidding, I know that zram is not exactly real ram 😅
[Xiaomi Mi Pad 5] MateusL13:
Seems sooo complicated, I'll stick with fastboot 😁

Also, is there any way to add a Ubuntu entry on the windows on nabu UEFI???
[Xiaomi Mi Pad 5] D6072:
How to find the kernel config files? from the source code?
[Xiaomi Mi Pad 5] maverick_jia:
do this command:

make ARCH=arm64 install INSTALL_PATH=<your dir>/boot
[Xiaomi Mi Pad 5] maverick_jia:
I think so, maybe add a windows entry on the grub.
[Xiaomi Mi Pad 5] dskw:
What is the difference to the fastboot setup with this efi one? Does it come with android dual boot support somehow without using adb to do the switch?

To be more precise: What is the difference compared to what ClearStuff is working on? You mention twrp. Does the device have to be rooted for this?
[Xiaomi Mi Pad 5] maverick_jia:
I think the main difference is I put the kernel image in to the file system, so that I can compile and debug the kernel source on the tablet without a host PC.

I don't think android is based ueif so It it still need fastboot to switch android and ubuntu.

I have not try ClearStuff's work, but I think it is almost the same. I don't think root the tablet to use twrp is needed, but need to unlock it.
[Xiaomi Mi Pad 5] D6072:
I have another question: Is it possible to use KVM under Ubuntu by recompiling the kernel?
[Xiaomi Mi Pad 5] maverick_jia:
I don't know how use KVM, but I checked the kernel configuration file and it is supported KVM by default.
[Xiaomi Mi Pad 5] Timoxa2007:
You can build flashable zip uefi image with ./build.sh -z -d nabu, which will patch your android boot image to add uefi support. There will be "Reboot to android" entry in uefi menu.
[Xiaomi Mi Pad 5] D6072:
I guess we still can't use Waydroid under Ubuntu at all! (Or we need another way to get this work)

With Binder enabled, I installed Waydroid. When I ran the “waydroid init ” command, nothing showed up. Even I already started container service. Trying to run it via GUI, it said "waiting for container service" and nothing else. I also tried to find more information from log, but it was empty.

How do you guys run Waydroid on Ubuntu?
[Xiaomi Mi Pad 5] dskw:
Someone managed to get it running though:

[ROM]Ubuntu on Xiaomi Pad 5 (nabu)

[UPDATE 1 Jan 2024] fast charge supported wakup and sleep works [UPDATE 22 Nov 2023] We finally updated this image！And this time not I but we. Yes, I have companies! Thank you to everyone who answers questions and even uploads images in this...

xdaforums.com
[Xiaomi Mi Pad 5] timmy1980:
Decided to take the plunge and remove Windows 11 and try Ubuntu on my Pad 5, and I love it! Thank you to all that have put hours and hours of work into making this possible. I tried a few times and got a black screen, although Ubuntu had booted as I could here the notification when removing the USB cable. Found a combination that worked in the end though.

Is there a specific version/kernel I need to be running for sleep and wake from sleep to work? I am using @TheMagicMojoMan system images.
[Xiaomi Mi Pad 5] maverick_jia:
This issue has been solved, but you should change the kernel image. I'll upload a new images for you test. The source code of the kernel is already submitted to GitHub, or you can compile it yourself and update the kernel to the existing Ubuntu system.
[Xiaomi Mi Pad 5] timmy1980:
That would be great if you could upload a kernel to test, not sure I have the knowledge to compile myself. I could learn though of course.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Have you tried the bootloader from the "zram update" folder? I think those are the most recent ones I have published and they should support sleep & wake.

Sorry, the organization of files is getting a little bit out of hand right now. Sooner or later I'm gonna switch to github and then it will be clear what the most recent files are.
[Xiaomi Mi Pad 5] dskw:
@TheMagicMojoMan @maverick_jia @ClearStaff

I can create a github organization tomorrow.

We could combine all related repositories this way. @maverick_jia could move or add his kernel source repo.

We could have one to host packages, maybe even a ppa.

And one for a guide how to install.

What do you think?
[Xiaomi Mi Pad 5] MateusL13:
Did you erased dtbo partition??

I'm using android, windows and ubuntu on my nabu, I just need to use fastboot to set between slot b for ubuntu, and slot a for windows and android :LOL:
[Xiaomi Mi Pad 5] TheMagicMojoMan:
While I like the general idea to have one single repository that collects everything related to Linux on Nabu there is the practical problem that different people have different needs and thoughts about how things should be done. That would result in having many discussions about what or what not e.g. to include into the kernel which takes time that we all don't have enough of.

Therefore, I rather prefer having my own repository where I publish the stuff the way I need it (e.g. my kernels always have USB audio enabled because I use my tablet as a guitar amp simulator; others don't need it and don't care about it).
[Xiaomi Mi Pad 5] maverick_jia:
That is true. On the other hand, I prefer to get stuck in some "low level" codes, and lack ideas about the user experience. Thanks to the @TheMagicMojoMan again, his images is much better than I did(y)
[Xiaomi Mi Pad 5] maverick_jia:
I uploaded three images for you test.

240211.7z

drive.google.com

6.1.10-nabu.tar.bz2 boot_sda33.img firmware.tar.bz2

you can extract 6.1.10-nabu.tar.bz2 and firmware.tar.bz2 to the appropriate location, and flash boot_sda33.img to the boot_a or boot_b if you use the sda33 to store you root filesystem.

Otherwise, you can use zImage file to make your own boot.img

zImage: https://drive.google.com/file/d/19kpk3E77t-TRariOpNqJd3C5bS1Tga9a/view?usp=sharing

mkbootimg --kernel zImage --cmdline "console=tty0 root=/dev/sdaxx rw rootwait" --base 0x00000000 --kernel_offset 0x00008000 --tags_offset 0x00000100 --pagesize 4096 --id -o boot.img

Note that this kernel include the fast charge, please make sure you use the 33W xiaomi charger or some old charges which don't support PPS.
[Xiaomi Mi Pad 5] dskw:
I see your point @TheMagicMojoMan and it would probably make some of the steps more difficult with pull requests and switching between repos.

My main concern is that work distrubutes over multiple accounts, spread in different private github repos tend to either get lost over time, or loose maintainance, since they are managed by single individuals.

Going by what @maverick_jia said it does not look like a bad idea to still use your kernal as a base, even with your additional configurations changes.

Personally I like the idea of adding a bit more support of external hardware, even if the kernel is less sleek this way.

For example I have a USB based HDMI Adapter lying around, one with its own mini GPU included that I'd like to get running with the tablet.

Different, personal, configuration needs could be handled two ways in my view:

You could fork from the "[in]official nabu linux kernel" your own repo and do the changes in there. If you like something, put it up as a PR to the groups repo.

Or you could simply keep a bunch of different make configs at hand in the repo, for different needs like your AMP.
[Xiaomi Mi Pad 5] dskw:
Guys, i've encountered something strange.

In my initial install I was following the guides and android was running off slot B, so Ubuntu landed on slot A.

Now I have recently installed the next MIUI 14 patch that android suggested.

Afterwards it looks like android is using slot A and when I use slot B it just ends up in an endless reboot loop.

now I'm not sure how that could happen.

Are the OEM updates not fixed to a specific slot? Do they alternate with each update?

Can I simply reflash the boot img to the now switched slot (slot B) for Ubuntu?

Is there a way to dump the current content of the flash targets? Like using DD with the orangefox image or some other way? I'd like to backup the slot A and B images before continuing
[Xiaomi Mi Pad 5] timmy1980:
Thank you for this, I will test as soon as possible.
[Xiaomi Mi Pad 5] ClearStaff:
I'm also good with idea of moving my one public and two private repositories into common group repo in github, strictly because i don't have device with me atm, cause im out of my primary country for a while, so at least more people will have access to it.
[Xiaomi Mi Pad 5] dskw:
Alright, I hope you all do not mind.

I went ahead and created a github organization:

inofficial linux on nabu

inofficial linux on nabu has 2 repositories available. Follow their code on GitHub.

github.com

So far it contains:

a repository for the kernel (clone of @maverick_jia 6.1.10 repo)

a repository for the firmware (clone of @map220v repo)

I've invited @map220v and @maverick_jia as members since I knew their github names.

Anyone else (@ClearStaff for example) let me know in here or via DM what your accounts are and I can add you too.

I have no idea if the installation instructions created by @D6072 can be moved in there as well as I have no experience with gitbook.

Something that I was not sure of is the kernel repo:

Right now it's a repo for 6.1.10, but we could have one general kernel repo and use branches for the different versions.

Finally, @TheMagicMojoMan, don't feel forced to participate if it takes up too much of your availability. You can fork a private repo from this one if the community moved on it and continue like you did until now.

Of course it would be nice to benefit from pull requests in case of new findings, but worse case someone else can integrate once you have something to share.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Thank you very much for these nice words.

And thank you even more for your ongoing efforts and great successes in making more stuff run. It's a great example of endurance and courage not to give up even when something like encryption is coming in the way.

Without you the whole project would have been dead after @serdeliuk lost his interest in Nabu and finally even quit XDA forum completely!!!
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Yes, that is the basic idea of A and B slots. If something goes wrong with the update you still have the old version on the other slot.
[Xiaomi Mi Pad 5] TheMagicMojoMan:
You can use TWRP to do backups. But I am a total noob regarding Android stuff. I think that @LesGaR knows everything about it and can help. Or have a look in the main "Xiaomi Pad 5" forum page about TWRP.
[Xiaomi Mi Pad 5] dskw:
Ahh alright. Well until now I did not root my device or mess with the OEM recovery. Not sure I want to install twrp. Thanks to your reply I know I can safely override the now switched slot with the boot loader and should be fine :D
[Xiaomi Mi Pad 5] TheMagicMojoMan:
So, did you save your Android bootloader, vbmeta and dtbo before?
[Xiaomi Mi Pad 5] MateusL13:
You don't need to install TWRP, just boot it temporarily using fastboot, do the backups and save it on something like a USB storage.
[Xiaomi Mi Pad 5] dskw:
And of course not... So what's the risk of not doing so? Unrecoverable bricking in some situations?

Oh I didn't realize twrp could be fastbooted as well, but makes sense now that you mention it
[Xiaomi Mi Pad 5] MateusL13:
I'm using the kernel from the zram update, does it support fast charge??

edit: yes, it does :D
[Xiaomi Mi Pad 5] dskw:
Nice! That worked very well, got a backup of everything just in case
[Xiaomi Mi Pad 5] maverick_jia:
You are so kind!! I did some work for my own interest indeed, but you keep this project active all the time. And I think you should the owner of this forum, I am just a man behind you.
[Xiaomi Mi Pad 5] dskw:
Just looked at your posts again and it is amazing!

Question from the noob that I am in terms of efi boot loading:

Does this only manage one of the two a/b slots, meaning it allows booting linux or windows from there?

Or does it allow to toggle between Android and other OS's without the use of a computer with adb/fastboot?
[Xiaomi Mi Pad 5] D6072:
Sorry for being late to join this post again because I visited relatives these days.

I know GitBook can be synced with any Git provider like GitHub, so I can easily convert my webpage into markdown documents. But I think it's better to have a separate webpages.

The invitation link is here(Sorry for you guys since you have to rejoin again): https://app.gitbook.com/invite/4Kd6hTzYvJgcxoMw5Ppw/HrgzQ7wLVOCHBuaK62Y3

Feel free to copy these documents for your repository usage :)
[Xiaomi Mi Pad 5] D6072:
UPDATE: You can edit my website at Github repository in anytime : https://github.com/Android-Piepaint/Linux-for-nabu-website
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Is this the first time ever Blender 4.x is running on Linux ARM64? :)

It was a tough fight compiling it from source code ... (and it is currently only the 'light' version which is missing a lot of stuff).→ full version now successfully compiled and running!
[Xiaomi Mi Pad 5] Solutionful:
Hello, thank you for the hard work with the OS

I just wanted to ask: is it possible to change the active slot (A/B) directly via Ubuntu? There's something like that for android called BootControl, and it would be really awesome if an equivalent for Ubuntu could be developed

And thank you again for the OS! I'm having lots of fun with my Ubuntu device
[Xiaomi Mi Pad 5] dskw:
So far I've used qbootctl:

Android AB Slots - postmarketOS Wiki

wiki.postmarketos.org

Works somewhat, but I'm not sure how safe it is. ClearStuff mentioned some people ran into issues with slot switching.
[Xiaomi Mi Pad 5] Solutionful:
Well, BootControl corrupted my boot-b which I had to reflash, and qbootctl corrupted my boot-a which I had to reflash

Guess I'm better off switching OSes manually with a PC 🥲
[Xiaomi Mi Pad 5] TheMagicMojoMan:
On Android I use an app called "Swich My Slot" which never let me down. qbootctl worked well with PostmarketOS, did not work with Ubuntu and might have been the reason for a complete scrambled system when I was using Manjaro Linux.
[Xiaomi Mi Pad 5] dskw:
Hm that is so strange. I wonder what the criteria is for a good or bad experience with qbootctl. Maybe it's related to the slot, or something else.

I haven't given it much testing since I had to reflash the ubuntu slot, but my initial install worked fine with ~10 switches.

Did you have to root your device for using Switch My Slot? (I guess yes)

The whole topic of slot switching is difficult for me to get a good overview. I found tools that were developed specifically for pixel devices, or samsung that allow multi boot. But I don't expect any of those to work with our setup here. They usually use multiple android builds as example.

There must be a way to get a multi boot option running for our tablets. If android is booted via UEFI, could it be possible to flash something like rEFInd to both slots and have it control which actual OS is being booted?
[Xiaomi Mi Pad 5] dskw:
Suspend under Ubuntu draining battery?

I'm running the 6.1.10 kernel from TheMagicMojoMan.

I've put the tablet into standby at 87% over night and this morning it had 64% remaining.

>20% charge loss is quite heavy for standby and I'm wondering if Linux is missing to turn off some device when going into suspend mode.

Anyone else checked how much battery is drained, or did someone try with a newer kernel?
[Xiaomi Mi Pad 5] TheMagicMojoMan:
Thanks for checking this out! It is something that definitely has to be worked on.

If I remember well currently only the display is turned off when going into sleep mode. This is due to having no real cpu power management.

Please consult @maverick_jia . He is the kernel magician. And @ClearStaff is extremely knowledgeable about many things, as well as @LesGaR who figured out a lot of stuff and was the first to work on sleep mode. I only do distro stuff.
[Xiaomi Mi Pad 5] Tryanks:
What an amazing project!

After a gap of a year, I have revived my interest in Linux on Nabu.

But when I picked up [PostmarketOS boot on Xiaomi Pad 5] from my dusty favorites, I got Not be Found :(

I can't describe how I feel when I see the Ubuntu icon light up on my device.

Out of personal interest, I'm trying to deploy box86/box64 for running steam.

I follow this guide: Linux-ARM-Gaming-Chroot.

I have made some progress. When I succeed, I'll take the time to write down the steps and put them here, or new poster, I don't know :)