Wi-Fi instability on the Pinephone

Wi-Fi on the Pinephone can be unstable when you have a Wi-Fi repeater or 2 access points serving the same SSID. Symptoms can include repeated prompting for the SSID password when signal strength is still good. Wi-Fi can be lost after some time and it won't be able to be re-established. For now, the only solution seems to use only a single Wi-Fi access point for each SSID.

On poor Wi-Fi signal strength, you may check if the regulatory domain is set correctly with the following command :

sudo iw reg get

If the command results to 00, the domain is not set. You may set the correct domain by entering :

sudo iw reg set alpha2

where you must replace “alpha2” for the ISO/IEC 3166 alpha2 country code found here: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2. However, the change will not persist after a reboot.

Random crashes

If you have random crashes/freezes this might be related to your RAM. Please look at this pine64 forum thread.

If using a slower DRAM frequency solves your problem, please leave a vote in the thread.

Installing the Mobian repository apt key

If you experience error when trying to update/upgrade/dist-upgrade with apt and get a message that key is not available or not recognized, the Mobian apt key is probably not installed or not up-to-date. Mobian repository key is available at https://repo.mobian-project.org/mobian.gpg.key . This key is used to sign the packages available in the Mobian repository and is required to be installed in apt sources keyring of your phone.

In order to install the repo key, you can enter the following command :

wget -qO - https://repo.mobian-project.org/mobian.gpg.key | sudo apt-key add -

You can check that key is properly installed :

apt-key list

You should then get a result with following record (as well as ones from Debian keyring)

/etc/apt/trusted.gpg
pub rsa4096 20-06-16 ...
D569 936C ...
uid [...] Mobian Project <admin@mobian-project.org>

Year 2115 Problem

Sometimes, inexplicably (for now), the system clock will shift to the year 2115, often also to the month of August. Fiddling with the data and time settings sometimes don't work. A quick workaround is to bring up “King's Cross” or some terminal program and run “sudo hwclock -s” This will force the system clock to the hardware real time clock (RTC), but that will only work if the RTC has the correct time.

Initial investigation suggests that there's something that goes wrong with the automatic time synchronization. Recommendation is to turn it off in Settings→Date & Time→Automatic Date & Time and Automatic Time Zone and manually set the date and time to see if this helps to resolve the problem. A reboot might also be required to get back into a good state.

One hypothesis is that the timesyncd, which is used in stock Debian can have problems when there are unreliable network connections since it is meant mostly for servers. It turns out that Ubuntu Touch uses ntpd instead. Chrony appears to be a very good solution and installs easily into Debian with “apt install chrony.” Time will tell if this fixes the problem.

As of 2020-07-08 chrony is used in mobian, which should prevent the problem to occur.

Taps not registering on the lock screen (Double-Tap Problem)

If you go to the lock screen and the taps don't seem to be registering. Subsequent taps show previous taps in other locations. The problem appears to be that end of tap event is not being seen by the windowing system. Tapping twice in the same location each time can sometimes get you enough control to reboot the device.

Debugging this problem might be achieved by installing “evtest” and posting the output from “evtest /dev/input/event3” when tapping so that the nature of the events can be captured and analyzed to figure out the failure.

New features not working

Some of the new features require a 5.7 kernel. This is is automatically installed when upgrading your system, but there are situations where the old (5.6) kernel will still be used instead of the newer one (you can check the running version by executing uname -r).

In case that happens, running the following command will make the 5.7 kernel the default one:

sudo dpkg-reconfigure linux-image-5.7-pinephone

Fractal keeps asking for login credentials

Fractal (the Matrix client) uses the Gnome keyring to store and retrieve your Matrix credentials. The storing part works, but currently there is an issue retrieving them. A workaround is to either restart the keyring, or open another app that uses it beforehand. For instance, you can open Geary before opening Fractal and things will work.

If you're not that security conscious, you can also set an empty password on the key ing. It will automatically unlock on login.

GNSS(GPS) and cell signal problems

In PinePhone, if you are unable to get GPS fix or have problems in connecting to your mobile provider, you may check if the connections of the RF cable are loose. The RF cable is a cable, which connects the mainboard with the smaller board. It becomes accessible after removing the back cover and the middle part, which is fastened with screws.

The antennas, including the wifi antenna, may also be not working, if the middle part is not fastened correctly and there is a gap between the middle part and the front part. On GNSS/GPS see also Location. Note that the modem and consequently also the GPS cannot be enabled without a SIM card.

General troubleshooting

If the phone doesn't start completely, and you boot from sdcard, you can try to fix things from a shell on a computer, using chroot:

install qemu-user-static if it is not there yet

apt-get install qemu-user-static

mount the sdcard

mount /dev/mmcblk?p2 /mnt/ -o noatime
mount /dev/mmcblk?p1 /mnt/boot -o noatime

copy the qemu emulator inside the chroot

cp -u /usr/bin/qemu-aarch64-static /mnt/usr/bin

enter the chroot

chroot /mnt qemu-aarch64-static /bin/bash

now, mount some basic filesystems in the chroot

mount none -t devtmpfs /dev
mount none -t devpts /dev/pts
mount none -t proc /proc
mount none -t tmpfs /tmp

here try to fix things! perhaps start from the logs?

journalctl -r

when you are done, unmount the filesystems before exiting:

umount /dev/pts /dev /proc /tmp
exit

finally unmount the root fs

umount /mnt/boot /mnt

apt upgrade hangs

If your apt upgrade is hanging it could be an issue with time-sync. You can confirm this by listing the systemd jobs and checking for the time-sync.target and systemd-time-wait-sync.service:

root@mobian:/home/mobian# systemctl list-jobs
JOB UNIT                           TYPE  STATE  
65  timers.target                  start waiting
70  apt-daily-upgrade.timer        start waiting
68  apt-daily.timer                start waiting
72  e2scrub_all.timer              start waiting
67  man-db.timer                   start waiting
69  fwupd-refresh.timer            start waiting
71  fstrim.timer                   start waiting
25  time-sync.target               start waiting
24  systemd-time-wait-sync.service start running

If you see this, check to see that your time is synchronized with `timedatectl status`. If so, restarting the sync service should allow the upgrade to continue:

systemctl restart systemd-time-wait-sync

Comment by spaetz: This could be an instance of this debian bug. It suggests that 'systemd-time-wait-sync' should not be running at all when “chrony” is used for time synchronization (which it is on mobian). So people experiencing this hang could try to systemctl disable systemd-time-wait-sync and see if this fixes things.

Unable to create GL Context

Sometimes, certain applications can take advantage of the OpenGL ES 2.0 present with the “Lima” driver for the Mali GPU on the pinephone, but their supported version of OpenGL (not ES) is not possible with the driver. In these cases, GTK (ie. GDK) will fail and not attempt to use the OpenGL ES often with the message “[u]nable to create GL Context.”

GDK can be forced to use the OpenGL ES API using the

GDK_GL=gles

environment variable before launching the program. Sometimes this works and the application runs normally.

Cellular connection stops working if enabled/disabled in settings

The Settings GUI seems to have issues with modem configuration on some carriers (Cricket, Fido, possibly others). Reconfiguring the modem using mmcli and nmcli can restore connectivity. If you experience no cellular connectivity after re-enabling the modem with the settings slider, you can remove the existing connections and re-add them from the command line. You will need the apn settings for your carrier.

Both nmcli and mmcli are used to control aspects of cellular connections. It is worth exploring their options, but a short summary follows.

nmcli c lists all network connections the device has. Green lines are working connections, yellow are connecting or waiting, and red are disconnected. In my case, the gsm connection remained yellow when I was having connection issues.

mmcli -m 0 displays information on the capabilities of modem 0. Note that the number 0 tends to change each time the modem is woken up from sleep mode. If you are unsure what number is currently being used, the command mmcli -L will list any modems found, with the number showing up at the end of /org/freedesktop/ModemManager1/Modem/. Replace the zero with the appropriate number any time a command starts with mmcli -m 0.

To fix the connectivity issue, first remove the existing connections. List the network connections with nmcli c, noting the names of any connections for device cdc-wdm0 (number may vary). Remove any such connections with sudo nmcli c del NAME, replacing NAME with the name of the connection. Similarly, use mmcli -m 0 to display the modem information, and look near the end for an entry for Bearer, such as

  Bearer   |               dbus path: /org/freedesktop/ModemManager1/Bearer/0

Remove the bearer with sudo mmcli -m 0 --delete-bearer=/org/freedesktop/ModemManager1/Bearer/0, using the path from the previous command.

Now create the new connection using your carrier's settings:

  sudo mmcli -m 0 --create-bearer='apn=APN.NAME,user=USERNAME,password=PASSWORD,allowed-auth=chap,allow-roaming=no'

In my case (on Cricket) I did not need a username or password, and used sudo mmcli -m 0 --create-bearer='apn=ndo,allowed-auth=chap,allow-roaming=no'. Also create the connection in Network Manager:

  sudo nmcli c add type gsm ifname cdc-wdm0 con-name OPERATOR-NAME apn APN.NAME user USERNAME password PASSWORD

(In my case, sudo nmcli c add type gsm ifname cdc-wdm0 con-name cricket apn ndo)

If your connection is still not working, you may need to enable it, which can be done by selecting it with sudo nmtui.