I learned a lot about hardware and operating systems since I received my PinePhone. A lot of times it was during error investigation. With a small chance that this information might get picked up by another PinePhone enthusiast, I’ll post the error messages and my solutions here.
RTL firmware not found
Bluetooth firmware on my Arch Linux ARM was missing, it is a non-free firmware so it is not included by default.
Feb 23 19:21:58 alarm kernel: bluetooth hci0: Direct firmware load for rtl_bt/rtl8723cs_xx_fw.bin failed with error -2
Feb 23 19:21:58 alarm kernel: Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8723cs_xx_fw.bin not found
With this I just went over to my postmarketOS SD Card image and copied the corresponding files from /lib/firmware/rtl_bt/ over SSH
scp lib/firmware/rtl_bt/rtl8723cs_xx_fw.bin root@pinephone_ip_address:/lib/firmware/rtl_bt/
scp lib/firmware/rtl_bt/rtl8723cs_xx_config-pinebook.bin root@pinephone_ip_address:/lib/firmware/rtl_bt/rtl8723cs_xx_config-pinephone.bin # notice the rename
systemd-binfmt Failed
I was getting a lot of binfmt-related errors like the ones in bold below. And if there is one thing you don’t want to see it is a red FAILED log line during boot process.
[...]
Feb 23 19:36:10 alarm systemd[1]: Mounted Temporary Directory (/tmp).
Feb 23 19:36:10 alarm systemd[1]: Started Create list of static device nodes for the current kernel.
Feb 23 19:36:10 alarm systemd[1]: systemd-binfmt.service: Main process exited, code=exited, status=1/FAILURE
Feb 23 19:36:10 alarm systemd[1]: systemd-binfmt.service: Failed with result 'exit-code'.
Feb 23 19:36:10 alarm systemd[1]: Failed to start Set Up Additional Binary Formats.
Feb 23 19:36:10 alarm systemd[1]: Started Load Kernel Modules.
[...]
Feb 23 19:36:10 alarm systemd-binfmt[267]: Failed to add binary format: No such file or directory
[...]
Feb 23 19:36:13 alarm systemd[1]: Starting Load/Save RF Kill Switch Status…
Feb 23 19:36:13 alarm systemd-binfmt[385]: Failed to add binary format: No such file or directory
Feb 23 19:36:13 alarm systemd[1]: Condition check resulted in Create System Users being skipped.
Feb 23 19:36:13 alarm systemd[1]: systemd-binfmt.service: Main process exited, code=exited, status=1/FAILURE
Feb 23 19:36:13 alarm systemd[1]: systemd-binfmt.service: Failed with result 'exit-code'.
Feb 23 19:36:13 alarm systemd[1]: Failed to start Set Up Additional Binary Formats.
Feb 23 19:36:13 alarm systemd[1]: Started Load/Save RF Kill Switch Status.
[...]
So I went to investigate the service’s config files, seeing the “Failed to add binary format: No such file or directory” error. There are several directories that binfmt is looking for its config files. As it turns out all of them were empty apart from one. I found out that after installing mono it registered itself with binfmt. Not sure why, but I certainly don’t need it, so the solution is simple.
rm /usr/lib/binfmt.d/mono.conf
Done!
Broken Battery In ACPI
Multiple components make use of the ACPI and all of them report a dead battery. E.g. battery applet or laptop-mode service:
Feb 23 19:22:05 alarm laptop-mode[1653]: Failed to re-set power saving mode for wireless card
Feb 23 19:22:05 alarm laptop-mode[1700]: WARNING: Battery does not report a capacity. Minimum battery
Feb 23 19:22:05 alarm laptop-mode[1701]: charge checking does not work without a design capacity.
Feb 23 19:22:05 alarm laptop-mode[1702]: WARNING: Battery does not report a design capacity. Auto hibernation
Feb 23 19:22:05 alarm laptop-mode[1703]: does not work without a design capacity.
Feb 23 19:22:05 alarm laptop-mode[1704]: You seem to have a broken battery
Feb 23 19:22:05 alarm laptop-mode[1705]: Cannot determine design_capacity_warning
Feb 23 19:22:05 alarm laptop-mode[1706]: Disabling hibernation
Feb 23 19:22:05 alarm laptop-mode[1707]: Failed to determine battery charge. Battery charge units are not in
Feb 23 19:22:05 alarm laptop-mode[1708]: mWh, uWh, mAh or uAh.
Feb 23 19:22:05 alarm laptop-mode[1711]: enabled, active
This is not the case since the battery is actually fine, it just doesn’t work with ACPI:
# cat /sys/class/power_supply/axp20x-battery/uevent
POWER_SUPPLY_NAME=axp20x-battery
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_VOLTAGE_NOW=4112000
POWER_SUPPLY_CURRENT_NOW=429000
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT=1200000
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=1200000
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4200000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=2900000
POWER_SUPPLY_CAPACITY=95
Seems the kernel I’m using doesn’t have it enabled, as you can see here:
# ls -l /usr/lib/modules/$(uname -r)/kernel/drivers/acpi
ls: cannot access '/usr/lib/modules/5.6.0-rc1-00239-geb93b104bbccb/kernel/drivers/acpi': No such file or directory