PinePhone

From NixOS Wiki
Revision as of 19:40, 24 April 2024 by Klinger (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

PinePhone is supported by Mobile NixOS: https://mobile.nixos.org/devices/pine64-pinephone.html

This guide is discusses how to use Phosh, the GNOME-derived UI used by Librem and Mobian.

Requirements

This document assumes you have set up NixOS on your PinePhone, as described in https://mobile.nixos.org/getting-started.html

Beware known issues:

Status

Phosh

Working with:

xserver.desktopManager.phosh = {
  enable = true;
  user = "alice";
  group = "users";
  # for better compatibility with x11 applications
  phocConfig.xwayland = "immediate";
};

Battery

Wake-on-modem works. Wake-on-WiFi is not supported. Something like https://gist.github.com/Peetz0r/bf8fd93a60962b4afcf2daeb4305da40 is needed.

Browsing

Sound

Working. Settings -> Sound ->Output -> Configuration -> HiFi

Calling

Working with:

programs.calls.enable = true;
# Optional but recommended. https://github.com/NixOS/nixpkgs/pull/162894
systemd.services.ModemManager.serviceConfig.ExecStart = [
  "" # clear ExecStart from upstream unit file.
  "${pkgs.modemmanager}/sbin/ModemManager --test-quick-suspend-resume"
];

Known issues:

SMS

Working with:

environment.systemPackages = [ pkgs.chatty ];

MMS

Unsupported. See https://source.puri.sm/Librem5/chatty/-/issues/30

Camera

pkgs.megapixels is the only known application to work with Pinephone. Does not always start correctly, retrying might help.

Mobile internet

Working via gnome-control-center ("Mobile Broadband" section), or:

$ nmcli c add type gsm ifname cdc-wdm0 con-name $PROVIDER apn $APN

GPS

Working with GNOME applications with:

services.geoclue2.enable = true;
users.users.geoclue.extraGroups = [ "networkmanager" ];

Sensors

The acceleration, compass, and ambient light sensors provide working auto-rotation, compass, and auto-brightness, when you:

hardware.sensor.iio.enable = true;
hardware.firmware = [ config.mobile.device.firmware ];

Disk encryption

The boot process supports opening LUKS volumes. Creating an image to use LUKS is unsupported, but possible. The idea is to write an encrypted LUKS volume to the root partition, as described in https://github.com/NixOS/mobile-nixos/tree/master/examples/testing/qemu-cryptsetup.

Hardware acceleration for video

See https://github.com/NixOS/mobile-nixos/issues/398.

Torch

Working, per https://github.com/NixOS/mobile-nixos/issues/379

Bluetooth

Working with:

mobile.boot.stage-1.firmware = [
  config.mobile.device.firmware
];

Modem firmware

Per https://wiki.pine64.org/wiki/PineModems#Upgrade/switch_firmware_via_fwupd , fwupd can be used to flash the FOSS Modem firmware. To enable fwupd:

services.fwupd.enable = true;

Alarm clocks

Not working:

Recommended applications

See https://linmobapps.frama.io/ for a list of applications that behave well on small screens, and in particular https://apps.gnome.org/.

See also