Screen resolution

Edit /etc/phosh/phoc.ini (or create it by copying /usr/share/phosh/phoc.ini) and change scaling factor to the desired value (lower value means higher resolution). The default value is 2.0, some users prefer a more dense layout (e.g. 1.8)

Restart Phosh or reboot.

Automatic app scaling

As of version 0.4.0, phoc is now able to automatically scale down windows which are too large to fit the screen. This should be enabled on a per-app basis using the following command:

scale-to-fit <APP-ID> on

The APP-ID depends on how the app itself declares it, here is a small list:

App name ID
Calendar gnome-calendar
Cawbird cawbird
Empathy empathy
Firefox firefox-esr
Geary geary
Maps org.gnome.Maps
Mumble net.sourceforge.mumble.mumble
Nautilus org.gnome.nautilus
Totem totem
Sudoku gnome-sudoku

Note: scale-to-fit wasn't in the initial 0.4.0 package, you might need to upgrade once more to have it installed.

Note: To find out the APP-ID, you can launch your app with WAYLAND_DEBUG=client and check for a line similar to xdg_toplevel@37.set_app_id(“gedit”)

PinePhone as Modem

Sharing 4G with Hotspot

Run and create new hotspot connections with SSID `Pinephone` and Password `HotspotPassword`:

sudo nmcli device wifi hotspot ifname wlan0 con-name Hotspot ssid Pinephone  password HotspotPassword

Stop the hotspot from NetworkManager. To restart your hotspot you can use the 3 dots menu “Connect to hidden network”

Sharing internet from your PC via USB

Set up ip-forwarding on your PC and configure your USB ethernet device's IP:

echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
sudo iptables -A POSTROUTING -t nat  -s 10.0.0.0/24 -j MASQUERADE
sudo iptables -P FORWARD ACCEPT
sudo ip addr add dev $USB_INTERFACE 10.0.0.1/24

where you should replace $USB_INTERFACE by the name of your interface (e.g enp7s0u1c2 or usb0)

You need to install pinephone-devtools on your phone and set the correct DNS server in /etc/resolv.conf:

sudo apt install pinephone-devtools
cat << EOF | sudo tee /etc/resolv.conf
search $LOCAL_DOMAIN
nameserver $LOCAL_DNS_IP
EOF

where you should replace $LOCAL_DOMAIN by your local domain (e.g local) and $LOCAL_DNS_IP by a valid DNS server (e.g 192.168.1.1 or 9.9.9.9)

Note: If you only just installed pinephone-devtools you might need to restart the PinePhone once.

Changing Password

Default user is mobian and has the default password of 1234. The root account has the default password root. Unfortunately, by default you have to set a non-numeric password (which you should not do as the lockscreen only works with digits). If you change your password as root (as described below) you can set it to any password however. The corresponding issue has information on how to change your configuration to allow any password if you are technically inclined.

To change the user-account password you should therefore use the command:

sudo passwd mobian

and remember that you can only input numbers when authenticating. So, the mobian user should have a password consisting only of numbers.

You should also change the root password:

sudo passwd root

or lock it, to prevent abuse (you can still access root via sudo commands):

sudo passwd -l root

Making screenshot

If you want to make screenshots you can use the package grim:

sudo apt install grim

If you want to make a screenshot just call (can be done from SSH)

grim my_screenshot.png

grim does not support delaying taking a screenshot.

In case you want to take a screenshot of something other than your terminal - I don't know who would want to do such a thing ;-) - you can run

sleep 10; grim my_screenshot.png

to delay the taking of the screenshot by 10 seconds.

An even fancier way to take a screenshot using a simple graphical dialog (and initiating it by invoking an “app”) has been described here and works flawlessly on Mobian once the required dependencies have been installed.

Using SSH with a key instead of password

When you have SSH enabled on your phone, it is a good idea to use key-based authentication instead of password-based authentication. This is especially true in the case of numerical passwords only!

If you don't have already have a private/public key pair, you want to first generate one.

ssh-keygen -t ed25519

You should probably secure your key with a password. Now copy your public key to the device

ssh-copy-id mobian@mobian

Now you can log in via SSH. Search for PasswordAuthentication in /etc/ssh/sshd_config and change it to PasswordAuthentication no. Finally restart the sshd:

sudo systemctl restart sshd

Extra note:

If you have secured your SSH key with a password and don't want to bother retyping the password for every time you reconnect with SSH, you can run:

eval $(ssh-agent)
ssh-add

Now you should not be prompted to enter your password (as long as you are running ssh from the same environment/terminal).

Setting up GPS (GNSS)

Satellite based positioning is now set up out of the box. The modem hardware switch needs to be turned on for the Pinephone in order for GPS reception to work. Satellite positioning is only available to web apps through GNOME Web browser.

ModemManager handles the location in mobian, not gpsd. See the relevant arch documentation to get an idea of terminal commands to be used (your modem number could be “0” or any higher number, it is not necessarily stable, find out with mmcli –list-modems ). Location querying is being handled by the GNOME's “geoclue” library. Usually, you will not have to install the gpsd daemon on mobian.

See Location for an in-depth look at how location is determined in Mobian.

Enable dark theme

  1. Open a terminal
  2. Enter the following command: gsettings set org.gnome.desktop.interface gtk-theme “Adwaita-dark”

Enable Wireguard

WireGuard is mainlined in Linux kernel 5.6 and higher, and included in the Pine kernel.

  1. Open a terminal
  2. Enter the following command: apt install –no-install-recommends wireguard-tools
  3. You can now use the wg-quick command to manage WireGuard tunnels.

Updating the bootloader

Due to the way u-boot is packaged in Debian, it isn't automatically updated as a bootloader update is a sensitive operation, and mostly device-dependent.

When the package is upgraded, you need to execute the following command to install the new version to the boot sector:

sudo u-boot-install-pinephone

Import contacts from VCF file

Syncevolution has been removed from upstream Debian, in the meantime it is straightforward to import contacts from a VCF file via Evolution tooling. First install evolution:

sudo apt install evolution

Before you import the file you will need to set scale-to-fit for Evolution on, otherwise the import dialog page is unusable.

scale-to-fit Evolution on

After this I opened the .vcf file via the Files app, it auto-launched the import dialoug. After importing I removed the Evolution app, this step is optional:

sudo apt remove evolution

sudo apt autoremove

Run local scripts on startup

If you plan to run some tweaks and scripts on startup which used to be run in /etc/rc.local before the systemd times, here is a howto to re-enable that:

- create /etc/rc.local with the following content:

#!/bin/sh -e
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.

# By default this script does nothing. 
exit 0

- chmod +x /etc/rc.local (mark the file as executable)

- systemctl enable rc-local (enable the already predefined rc-local system)

- and test with service rc-local start and systemctl status rc-local

CalDAV and CardDAV

Though there is no native way to sync CalDAV and CardDAV, you can add CalDAV and CardDAV though evolution (evolution in this manner acts as a front end to add the entries into evolution-data-server, and the other programs read from that),

sudo apt install evolution

Before you import the file you will need to set scale-to-fit for Evolution on, otherwise the import dialog page is unusable.

scale-to-fit Evolution on

I found the easiest way to configure it was to configure all of my CardDAV and CalDAV on a desktop version of evolution, backing it up, putting it on the PinePhone, and importing the configuration. After that, you just have to enter in the passwords.

NOTE: Gnome To-Do (the “To-Do” app on Mobian) does not work with CalDAV, so it will not recognize any CalDAV to-do lists. < It does if you use Gnome Online Accounts with Nextcloud, for example.

USB-C chargers / smart chargers not charging phone

This appears to be related to the kernel module for a chip in several USB-C-to-HDMI adapters. It can be fixed by blacklisting the module.

To fix it, create or edit the file /etc/modprobe.d/blacklist.conf and add the following line:

blacklist anx7688

Reboot, and smart chargers should now charge correctly.

Emoji support and alternate language scripts

Mobian doesn't come with emoji support by default. It can be enabled by installling fonts-noto-color-emoji. Additional language scripts can be installed with fonts-noto-cjk, fonts-noto-cjk-extra, and fonts-noto-extra.

Mount SDcard as /home

If you want to install Mobian to the eMMC and use an sdcard as your /home partition, you will need to do the following:

First, to install Mobian to the eMMC, download the latest preinstalled Mobian image here to your Mobian sdcard either from the phone itself, or from a desktop and copy it to your /home/mobian directory on your sdcard (mount it on your desktop). Then, follow these instructions from your phone shell (if you copied the image from your desktop make sure you reinserted it into the phone and booted from it), making sure that the destination of the dd command is /dev/mmcblk2. Once it is complete, power down the phone, and either insert a different, fresh sdcard with an ext4 partition, or format the previous sdcard by mounting it on your desktop, creating a new MSDOS partition table (in gparted, parted, etc), and then running sudo dd if=/dev/zero of=/dev/YOURSDCARDDEVICE bs=512 seek=16 count=1 to overwrite the u-boot signature (otherwise the phone will try to boot from it still). Ensure that you do not run this command against the wrong device! Finally, create a new ext4 partition on the sdcard, and then eject it.

Now that you have Mobian installed on the eMMC and a fresh sdcard inserted, power on the phone and launch the terminal. First, mount the sdcard by running sudo mkdir /mnt/sdcard && sudo mount -t ext4 /dev/mmcblk0p1 /mnt/sdcard. Then, copy the current contents of /home to it with sudo cp -aR /home/* /mnt/sdcard/. Then, unmount it from the temporary mountpoint with sudo umount /mnt/sdcard, and mount it at /home with sudo mount -t ext4 /dev/mmcblk0p1 /home. Finally, we will need to acquire the UUID of the sdcard and add an entry to fstab. Run sudo blkid /dev/mmcblk0p1 to get the UUID, and then copy just the UUID (it will look like 1f255d6ae-1634-2aa4-172cfa15) and edit /etc/fstab with vim or nano (or whatever). Copy the first line, and paste it at the bottom of the file as a new third line. Then replace the UUID with what you copied from the output of blkid, and change the / to /home, and finally change the final 0 to a 2 (this will tell fsck to check it after the other entries). It should look like this: UUID=a2c1f977-0405-4ae1-8169-639b8ae53e3b /home ext4 defaults 0 2

At this point your sdcard will be persistently mounted to /home, and will have all the files that the initial /home had. Congratulations, you now have more than 16GiB available for your files!

Auto-connect bluetooth headset

You can setup pulseaudio to automatically connect to any new bluetooth headset. Simply add the following line to /etc/pulse/default.pa:

load-module module-switch-on-connect

Enable ZRAM

ZRAM support is built into the Mobian kernel, and creates a swap block that runs in realtime on physical RAM with compression. It makes swap almost as fast as physical memory, while also making it more efficient, so it is ideal for low-memory devices (it has been used for years in all Android and ChromeOS devices). Fedora is also most likely making it the default in release 33.

To enable it, install the package zram-tools (sudo apt install zram-tools). Then edit /etc/default/zramswap and uncomment the PERCENTAGE line, and change the value to any value between 0 and 200. According to The authors of zram-config (Link to Github), zram compression lays between 220-450%, meaning that up to 4.5 times the physical RAM may in some circumstances fit into a zram space. A value of 50 should be on the safe side, more adventorous users have successfully set it to 200.

As of writing this, there is a bug in Mobian, where only a single zram device (/dev/zram0) will be created, thus only a single core can be used for compression. zram-utils by default tries to use all cores, thus only 1/4 of your specified zram space will be available this way. As a workaround, set the CORES property in the config file to 1, until this is resolved. That way, only 1 core will be used and the entire zram will reside in /dev/zram0.

After doing the changes to the config-file you need to either reboot, or use sudo zramswap start for the changes to take effect. Check sudo swapon -s and free for the results.