Xiaomi Pad 6 (xiaomi-pipa)
|
Xiaomi Pad 6 running GNOME with a mainline kernel | |
| Manufacturer | Xiaomi |
|---|---|
| Name | Pad 6 |
| Codename | xiaomi-pipa |
| Released | 2023 |
| Type | tablet |
| Hardware | |
| Chipset | Qualcomm Snapdragon 870 (SM8250-AC) |
| CPU |
Octa-core (1x3.2 GHz Kryo 585 3x2.42 GHz Kryo 585 4x1.80 GHz Kryo 585) |
| GPU | Adreno 650 |
| Display | 1800 x 2880 (144Hz 11.0" IPS LCD) |
| Storage | 128/256 GB |
| Memory | 6/8 GB |
| Architecture | aarch64 |
| Software | |
Original software The software and version the device was shipped with. |
Android 13 |
Extended version The most recent supported version from the manufacturer. |
Android |
| FOSS bootloader | partial |
| postmarketOS | |
| Category | testing |
Mainline Instead of a Linux kernel fork, it is possible to run (Close to) Mainline. |
yes |
Unixbench score Unixbench Whetstone/Dhrystone score. See Unixbench. |
9461.5 |
| Device package |
|
| Kernel package |
|
| Firmware package |
|
Flashing Whether it is possible to flash the device with pmbootstrap flasher. |
Works
|
|---|---|
USB Networking After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system). |
Works
|
Internal storage eMMC, SD cards, UFS... |
Works
|
Battery Whether charging and battery level reporting work. |
Works
|
Screen Whether the display works; ideally with sleep mode and brightness control. |
Works
|
Touchscreen |
Works
|
Stylus |
Works
|
| Multimedia | |
3D Acceleration |
Works
|
Audio Audio playback, microphone, headset and buttons. |
Partial
|
Camera |
Partial
|
Camera Flash |
Works
|
| Connectivity | |
WiFi |
Works
|
Bluetooth |
Works
|
| Miscellaneous | |
FDE Full disk encryption and unlocking with unl0kr. |
Works
|
USB OTG USB On-The-Go or USB-C Role switching. |
Works
|
HDMI/DP Video and audio output with HDMI or DisplayPort. |
Works
|
| Sensors | |
Accelerometer Handles automatic screen rotation in many interfaces. |
Partial
|
Ambient Light Measures the light level; used for automatic screen dimming in many interfaces. |
Partial
|
Hall Effect Measures magnetic fields; usually used as a flip cover sensor |
Works
|
Primary Bootloader Whether it is possible to replace stock bootloader with U-Boot. |
Broken
|
|---|---|
Secondary Bootloader Whether it is possible to chainload U-Boot from stock bootloader. |
Works
|
Mainline Whether latest upstream versions of U-Boot are not broken and it is possible to use them. |
Works
|
Internal Storage Whether it is possible to boot from internal storage (e.g. eMMC or UFS). |
Works
|
USB Host Whether it is possible to boot from a USB storage or connect a keyboard. |
Broken
|
USB Peripheral Whether it is possible to use device as a peripheral in U-Boot, e.g. for fastboot mode. |
Broken
|
Display |
Works
|
Buttons Whether it is possible to navigate in boot menu or grub with volume and power buttons. |
Works
|
How to enter flash mode
- Fastboot: Power on the device by holding down and .
- Recovery: Power on the device by holding down and . (Only for Android, will not work after installing postmarketOS.)
Preparation
Unlock the bootloader
| If you are still on MIUI 14, don't update to HyperOS before unlocking, as it will make the process much harder. |
Boot a custom recovery once
You will have to boot a custom recovery once to identify your panel variant and create a backup of the current OS. Download the Orange Fox Recovery Project image for xiaomi-pipa and rename it to recovery.img. Reboot into fastboot mode and start the recovery:
$ fastboot boot recovery.img
Identify your panel variant
This device uses one of two display panels: CSOT or Tianma.
$ adb shell grep -o 'msm_drm[^ ]*' /proc/cmdline
The output will be one of the following. Remember your panel variant and select the correct option during pmbootstrap init.
CSOT
msm_drm.dsi_display0=qcom,mdss_dsi_m82_42_02_0b_dual_dphy_video:
Tianma
msm_drm.dsi_display0=qcom,mdss_dsi_m82_36_02_0a_dual_dphy_video:
Back up the existing OS
You may want to back up the existing operating system in case you decide to go back later.
$ adb pull /dev/block/by-name/super super.img
$ adb pull /dev/block/by-name/boot_a boot_a.img
$ adb pull /dev/block/by-name/boot_b boot_b.img
$ adb pull /dev/block/by-name/dtbo_a dtbo_a.img
$ adb pull /dev/block/by-name/dtbo_b dtbo_b.img
Erase the DTBO
Reboot into fastboot again and erase the device tree overlay (dtbo) partition of the current boot slot. If it is not erased, mainline Linux will not boot at all.
$ fastboot erase dtbo
Installation
U-Boot
U-Boot should be installed to the Android boot partition as a secondary bootloader, providing a clean environment for booting mainline Linux.
Tauchgang U-Boot provides community releases for Linux Mobile devices and development boards. Along with pre-built images, they also push to LVFS, which means you can easily update Tauchgang itself with fwupd.
- Visit https://gitlab.postmarketos.org/tauchgang/u-boot/-/artifacts.
- Find
build-xiaomi-pipa. - Check if the build is release. If the branch name doesn't start with
release/, click theNext >button below until you find one. - Download
artifacts.zipand unzip it. - Reboot the device into fastboot mode.
- Flash U-Boot to the boot partition:
$ fastboot flash boot u-boot-xiaomi-pipa.img
$ fastboot reboot
Your tablet will reboot and you will be greeted with an U-Boot screen.
postmarketOS
WARNING: Never use pmbootstrap flasher flash_kernel, even if pmbootstrap suggests you to do so. It will overwrite U-Boot and make the device unbootable. |
Pre-built images are not available at the moment. Follow the installation guide with pmbootstrap. Below are the examples for building your own image.
If you don't like having full-disk encryption, omit --fde.
$ pmbootstrap init
$ pmbootstrap install --fde
Reboot into fastboot mode and flash the rootfs:
$ pmbootstrap flasher flash_rootfs
Reboot into postmarketOS:
$ fastboot reboot
Current status of features
| If you would like to help upstream the patchset, please join #sm8250-mainline:matrix.org. Thanks! |
The upstream dts from torvalds/linux is very basic. Only core features like USB networking and UFS work. For this reason, we currently package a close-to-mainline kernel. It is built on the latest stable release from https://kernel.org, with out-of-tree patches. Ideally, all these patches should be sent upstream, so that any generic aarch64 distribution can boot.
Component status
This is the status of the git source tree. In most cases, you may need to build the kernel from source to get all features working as described below.
| Component | Model | Mainline (https://kernel.org) | Close-to-mainline ( |
|---|---|---|---|
| SoC | Qualcomm SM8250-AC Snapdragon 870 | Y | Y |
| Power button | pm8150 | Y | Y |
| Volume down | pm8150 | Y | Y |
| Volume up | GPIO6 | Y | Y |
| Display | Novatek NT36532 | Y | |
| Touchscreen | Novatek NT36532 | Y | |
| Backlight | Kinetic KTZ8866 | Y | Y |
| GPU | Adreno 650 | Y | Y |
| UFS Internal storage | UFS 3.1 (SKhynix) | Y | Y |
| Main camera | OmniVision OV13B10 (13MP) | Y | |
| Wide camera | Sony IMX563 (12MP) | ||
| Front camera | SK Hynix Hi-846 (8MP) | ||
| Camera flash | pm8150l_flash | Y | |
| Audio codec | Awinic AW88261 | Y | |
| Sound | qcom,sm8250-sndcard | Y | |
| Microphones | WCD9380 | Y | |
| WiFi | Qualcomm QCA6390 (WiFi-6 802.11ax) | Y | |
| Bluetooth | Qualcomm QCA6390 (BT 5.1) | Y | |
| Accelerometer, Ambient light sensor | Qualcomm Hexagon DSP | P | |
| Hall Effect Sensor | GPIO110 | Y | |
| Fuel gauge | pm8150b_fg | Y | |
| Charger | pm8150b_charger | Y | |
| Fast charger | bq2597x-standalone | Y | |
| USB OTG | pm8150b_typec | Y |
Partial features
Audio
Internal speakers use AW88261 amplifiers wired by Tertiary TDM. A hack is used to enable sound support on the left channel. If you play right channel only sounds (e.g. speaker testing videos, etc.), you won't hear anything.
Camera
The rear camera works, but its quality is poor.
Accelerometer, Ambient light
These sensors are connected via the Qualcomm Hexagon DSP. In older kernels, they usually work after boot but break later. As a workaround, you can restart the service:
$ sudo systemctl restart hexagonrpcd-sdsp
Troubleshooting
GTK apps flicker
This is not a device-specific issue, but rather a GTK bug. GTK4 apps show flickering on the screen with kernels newer than 6.19. Qt-based ones are unaffected. A temporary fix is to force the legacy renderer:
$ echo "GSK_RENDERER=gl" | sudo tee -a /etc/environment
HDMI/DP monitor not detected
Disconnect the monitor from the power supply before connecting the HDMI cable.
Settings opens slowly in Phosh
The Settings app in Phosh opens slowly because it attempts to access a modem via rmtfs.service. As a workaround, you can mask it:
$ sudo systemctl mask rmtfs
Unbrick after using qbootctl
Using qbootctl to switch the ABL boot slot from userspace can cause a brick, leaving the device stuck in an endless fastboot loop. Fortunately, it is possible to unbrick without using EDL by downloading the Xiaomi fastboot firmware archive (usually a .tgz file) and reflashing the GPT partition blobs inside images/:
$ fastboot flash partition:1 gpt_both1.bin
$ fastboot flash partition:2 gpt_both2.bin
$ fastboot flash partition:3 gpt_both3.bin
$ fastboot flash partition:4 gpt_both4.bin
$ fastboot flash partition:5 gpt_both5.bin
$ fastboot reboot
Photos
-
Unixbench result
Contributors
- Adomerle (Initial port, Mainlining)
- Bluebunny (Maintainer)
- Cvbnm90i (Mainlining)
- Damillora (Mainlining)
- Vipaol (Mainlining)
Users owning this device
- Adomerle (Notes: on Void Linux)
- Alexv (Notes: Dualboot pmos with a16)
- Bluebunny (Notes: Maintainer)
- Cvbnm90i (Notes: with keyboard and stylus)
- Damillora
- EvilSoCute (Notes: Arch Linux/RavenOS 2.)
- Ferenc-
- Librist (Notes: pmOS with GNOME)
- NixXiz (Notes: 8/256, CSOT panel, testing mainline)
- Rmux (Notes: Arch Linux/AxionAOSP)
- Titago (Notes: Black 8/256. Use Void Linux)
- Tulilirockz (Notes: CSOT Panel)
- UnDevDeCatOS (Notes: running pmOS fork with Xiaomi Smart Pen 2, notetaking for my studies)
- Vipaol (Notes: pmOS, csot panel)
See also
- pmaports!7887 Initial merge request