Common tweaks and fixes - BrickTM-mainline/pipa GitHub Wiki

Common tweaks and fixes

This page contains Xiaomi Pad 6-specific fixes and tweaks.

⚠️ AT FIRST CHECK IF YOUR KERNEL NAME MATCHES MODULES DIRECTORY

Check your name kernel using uname -r and check if corresponding modules directory with the same name as kernel exist in /lib/modules. If not, you forgot to install modules. In the future this will be automated.

People often had problem on our Telegram groups because of that mismatch, they forgot to install modules and flashed another boot image.

First boot

resize2fs /dev/disk/by-label/arch_rootfs
pacman-key --init
pacman-key --populate archlinuxarm

Bluetooth

Bluetooth exist but doesn't work

This is usually caused by Bluetooth interface having no assigned MAC address.

Fixes:

btmgmt --index 0 public-addr <your desired mac address>.

For example: /etc/systemd/system/bt-mac.service

[Unit]
Description=Bluetooth MAC fix
After=bluetooth.service
Requires=bluetooth.service

[Service]
Type=oneshot
ExecStart=/bin/sh -c "/usr/bin/echo "yes" | /usr/bin/btmgmt --index 0 public-addr <your desired mac address>"
RemainAfterExit=yes
TimeoutStartSec=10

[Install]
WantedBy=multi-user.target

Wi-Fi

Different MAC address every boot

ip link set dev wlp1s0 down
ip link set dev wlp1s0 address <your desired mac address>
ip link set dev wlp1s0 up

For service example, see Bluetooth mac address service

Screen

Screen is turned off after boot

Set kernel option: novatek panel nt36532 as module. Currently, when set as built-in, it have problems with wakeup.

Screen doesn't wake up after sleep

DPMS on

Example (SwayWM): /etc/systemd/system/sway-wakeup.service

[Unit]
Description=Restart Sway on wakeup
After=suspend.target

[Service]
User=<your user name>
Environment="DISPLAY=:0"
Environment="XDG_RUNTIME_DIR=/run/user/1000"
ExecStart=/bin/sh -c "SWAYSOCK=$(ls /run/user/1000/sway-ipc.*.sock) swaymsg output DSI-1 dpms on && sleep 1 && SWAYSOCK=$(ls /run/user/1000/sway-ipc.*.sock) swaymsg output DSI-1 dpms on "
Type=oneshot

[Install]
WantedBy=suspend.target

GPU drivers

Install mesa vulkan-freedreno

Audio

Speakers doesn't work

alsaucm cset "name='TERT_TDM_RX_0 Audio Mixer MultiMedia1' 1"

Microphone doesn't work

Not written yet

Camera