User:Alexey Vazhnov/PinePhone notes

Hardware
My version: 3 GB RAM, 32 GB eMMC + dock, Mobian edition — hardware revision is probably https://wiki.pine64.org/wiki/PinePhone_v1.2b

USB OTG works (tested with SparkFun GPS-RTK-SMA ZED-F9P).

eMMC state:
 * 1) mmc extcsd read /dev/mmcblk2 | { head -n3; grep -i life; }

=
================================ Extended CSD rev 1.8 (MMC 5.1)

=
================================ eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x01 eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x01

lscpu: Architecture:                   aarch64 CPU op-mode(s):                 32-bit, 64-bit Byte Order:                     Little Endian CPU(s):                         4 On-line CPU(s) list:            0-3 Thread(s) per core:             1 Core(s) per socket:             4 Socket(s):                      1 Vendor ID:                      ARM Model:                          4 Model name:                     Cortex-A53 Stepping:                       r0p4 CPU max MHz:                    1152,0000 CPU min MHz:                    480,0000 BogoMIPS:                       48.00 Vulnerability Itlb multihit:    Not affected Vulnerability L1tf:             Not affected Vulnerability Mds:              Not affected Vulnerability Meltdown:         Not affected Vulnerability Spec store bypass: Not affected Vulnerability Spectre v1:       Mitigation; __user pointer sanitization Vulnerability Spectre v2:       Not affected Vulnerability Srbds:            Not affected Vulnerability Tsx async abort:  Not affected Flags:                          fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid

PMIC AXP803
See also: AXP803/PMIC control Linux.

Common for Mobian and postmarketOS (but postmarketOS has no modules, they are probably compiled into the kernel).

$ lsmod| grep axp axp20x_adc            20480  0 axp20x_pek            16384  0 axp20x_battery        16384  0 axp20x_usb_power      16384  0 industrialio          86016  10 stk3310,axp20x_battery,industrialio_triggered_buffer,st_sensors,inv_mpu6050,kfifo_buf,st_magn_i2c,st_magn,axp20x_usb_power,axp20x_adc $ ls -lAF /sys/class/power_supply/axp20x-battery/ total 0 -r--r--r-- 1 root root 4096 May 15 21:47 capacity -rw-r--r-- 1 root root 4096 May 16 01:12 constant_charge_current -rw-r--r-- 1 root root 4096 May 16 01:12 constant_charge_current_max -r--r--r-- 1 root root 4096 May 15 21:47 current_now lrwxrwxrwx 1 root root   0 May 16 01:12 device -&gt; ../../../axp20x-battery-power-supply/ -r--r--r-- 1 root root 4096 May 16 01:12 health drwxr-xr-x 3 root root   0 May 15 21:47 hwmon4/ -r--r--r-- 1 root root 4096 May 16 01:12 online drwxr-xr-x 2 root root   0 May 16 01:11 power/ -r--r--r-- 1 root root 4096 May 15 21:47 present -r--r--r-- 1 root root 4096 May 15 21:47 status lrwxrwxrwx 1 root root   0 May 15 21:47 subsystem -&gt; ../../../../../../../../class/power_supply/ -r--r--r-- 1 root root 4096 May 15 21:47 type -rw-r--r-- 1 root root 4096 May 15 21:47 uevent -rw-r--r-- 1 root root 4096 May 15 21:47 voltage_max_design -rw-r--r-- 1 root root 4096 May 16 01:12 voltage_min_design -r--r--r-- 1 root root 4096 May 15 21:47 voltage_now drwxr-xr-x 2 root root   0 May 15 21:47 wakeup10/ $ cat /sys/class/power_supply/axp20x-battery/status Discharging $ cat /sys/class/power_supply/axp20x-battery/type Battery $ cat /sys/class/power_supply/axp20x-battery/voltage_max_design 4200000 $ cat /sys/class/power_supply/axp20x-battery/voltage_min_design 2900000 $ cat /sys/class/power_supply/axp20x-battery/voltage_now 4161000 $ cat /sys/class/power_supply/axp20x-battery/current_now 117000 $ cat /sys/class/power_supply/axp20x-battery/capacity 98

Mobian
Debian 11 Bullseye + Wayland + Phosh (Gnome).

= ~500 MB, ext4. = f2fs, auto-resize on first boot.

After installation, it took about 3.5 GB space in /. ~480 MB RAM used after boot.

Using swap on zram by default: $ sudo swapon --summary Filename				Type		Size	Used	Priority /dev/zram0                            	partition	1500816	0	100 $ free -m total       used        free      shared  buff/cache   available Mem:           2931         659        1621          57         649        2070 Swap:          1465           0        1465

Repositories: deb http://deb.debian.org/debian bullseye main deb http://repo.mobian-project.org/ bullseye main non-free

Linux kernel: Linux mobian 5.10-sunxi64 #2 SMP PREEMPT Tue Jan 12 09:55:56 UTC 2021 aarch64 GNU/Linux

Default : root=UUID=fd176ea7-64ed-4a9b-adc8-f7f890d5e253 console=ttyS0,115200 consoleblank=0 loglevel=7 rw splash plymouth.ignore-serial-consoles vt.global_cursor_default=0

Is using Phosh: $ ps -eF|grep -i phosh mobian      498       1  0 126594 123580 1 15:35 tty7     00:02:12 /usr/bin/phoc -C /usr/share/phosh/phoc.ini -E bash -lc 'gnome-session --builtin --disable-acceleration-check --session=phosh' mobian      658     498  0   516   496   1 15:35 tty7     00:00:00 /bin/sh -c bash -lc 'gnome-session --builtin --disable-acceleration-check --session=phosh' mobian      659     658  0 110857 15576  2 15:35 tty7     00:00:01 /usr/libexec/gnome-session-binary --systemd --builtin --disable-acceleration-check --session=phosh mobian      705     659  0 220653 114348 1 15:35 tty7     00:01:12 /usr/libexec/phosh

Mobian Phosh additional software
See also: User:Knuxfanwin8/Phosh Apps.

Applications I tried with Mobian Phosh:

Mobian Phosh pros and cons
Advantages/pros:


 * Hardware works fine: Wi-Fi, loud speaker, charger, …;
 * Redshift works;
 * Smooth interface in Firefox ESR,, additional settings are in package  , source https://gitlab.com/postmarketOS/mobile-config-firefox;
 * It is possibly to switch off/reboot system from menu;

Disadvantages/drawbacks/cons:


 * Camera clicks 4 times after OS boot up, when login page appears;
 * Only one system button, no "back" button;
 * No button to close applications;
 * Scaling is only 100% and 200%;
 * Virtual keyboard squeekboard is not comfortable;
 * Application Settings can forget about screen size and show only part of self;
 * Automatic brightness works too fast;
 * Automatic rotation works instantly without a delay — bad when sensor is between of two states + noise, need at least some Schmitt trigger;
 * No automatic night mode;
 * Alarm in gnome-clocks didn't give me a notification at morning (workaround: Wake Mobile, );
 * Long start of applications from SD card;
 * Spend full battery for only one day;

postmarketOS
Alpine + Phosh / Plasma Mobile / Sxmo (and also Plasma Desktop, Gnome 3, Kodi, XFCE4, … ?).

Logs: By default postmarketOS uses the busybox logging daemon for the syslog and it's configured to log to memory only. The  command is used to read the in-memory log.

BusyBox as default shell.

After install: sudo apk add -i zsh vim chsh -s /bin/zsh sudo rc-update add sshd default sudo apk add -i avahi sudo rc-update add avahi-daemon default

Default : http://mirror.postmarketos.org/postmarketos/v21.03 http://dl-2.alpinelinux.org/alpine/v3.13/main http://dl-2.alpinelinux.org/alpine/v3.13/community

Plasma mobile
See also: Plasma Mobile.

,,   (customizations).

= ~250 MB, ext2. = ~2.1 GB, ext4, auto-resize on first boot. not in tmpfs!

No swap by default.

Linux kernel: Linux pine64-pinephone 5.11.0 #1-postmarketos-allwinner SMP Sat Mar 27 14:48:00 UTC 2021 aarch64 Linux



I installed VVAVE as audio player. But: VVAVE makes use of multiple web APIs of music knowledge to collect data.

Plasma mobile pros and cons
Advantages/pros:


 * Automatic night mode works;
 * Default virtual keyboard is more comfortable than in Phosh;
 * Interface logic is similar to Android and even better;
 * Automatic rotation has small delay, which is good, but anyway too fast;

Disadvantages/drawbacks/cons:  Graphical interface as a whole works not as smooth as Phosh in Mobian; No automatic connection to Wi-Fi after restart; Lost Wi-Fi card after night; Alarm in Clock 0.3.0 didn't give me a notification at morning; Disabling the alarm requires entering PIN; No possibility to switch off/reboot system from menu, the only way is to hold the power button for about three seconds Unexpected reboots (crashes?) of graphical interface; $ grep 'KCrash: Application Name' ~/.cache/tinydm.log KCrash: Application Name = klauncher path = /usr/lib/libexec/kf5 pid = 3090 KCrash: Application Name = polkit-kde-authentication-agent-1 path = /usr/lib/libexec pid = 3178 KCrash: Application Name = kded5 path = /usr/bin pid = 3118 KCrash: Application Name = DiscoverNotifier path = /usr/lib/libexec pid = 3184 KCrash: Application Name = org_kde_powerdevil path = /usr/lib/libexec pid = 3171 KCrash: Application Name = plasmashell path = /usr/bin pid = 3176 

Sxmo
"Simple X Mobile, is a collection of simple and suckless X programs and scripts."

"The core of the Sxmo UI is based on the dwm window manager, the dmenu menu system, the lisgd gesture daemon and the svkbd keyboard." +  (wallpaper),   (desktop clock),   (audio/vibration feedback on keypress).

Must read: https://git.sr.ht/~mil/sxmo-docs/tree/master/USERGUIDE.md — you have to learn all the gestures to use it.

= ~250 MB, ext2. = ext4, auto-resize on first boot.

After installation, it took about 1 GB space in. ~120 MB RAM used after boot.

No swap by default.

Linux kernel: Linux pine64-pinephone 5.11.0 #1-postmarketos-allwinner SMP Sat Mar 27 14:48:00 UTC 2021 aarch64 GNU/Linux



Important settings are in.

A lot of useful scripts are in.

Apps menu list don't need to restart after package installation.

Sxmo additional software
Applications I tried with Sxmo:

Sxmo pros and cons
Advantages/pros:


 * Low resources usage for own needs (~1 GB flash space and ~120 MB RAM);
 * Wi-Fi works before login/unlock!
 * It is possibly to switch off/reboot system from menu;

Disadvantages/drawbacks/cons:


 * USB mouse not works by default,

License
It is allowed to share content of this page under CC-BY international 4.0 or newer (in addition to CC-BY-SA 4.0, which is a little more strict, which is used for whole this wiki).