PinePhone: Difference between revisions

imported>Tom
m Remove mention of merged PR
Klinger (talk | contribs)
mNo edit summary
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[https://en.wikipedia.org/wiki/PinePhone PinePhone] is supported by [https://mobile.nixos.org/ Mobile NixOS]: https://mobile.nixos.org/devices/pine64-pinephone.html
[https://en.wikipedia.org/wiki/PinePhone PinePhone] is supported by [https://mobile.nixos.org/ Mobile NixOS]: https://mobile.nixos.org/devices/pine64-pinephone.html


This guide is discusses how to use [https://puri.sm/posts/phosh-overview/ Phosh], the GNOME-derived UI used by Librem and Mobian.
This guide is discusses how to use [https://phosh.mobi/ Phosh], the GNOME-derived UI used by Librem and Mobian.


== Requirements ==
== Requirements ==
Line 9: Line 9:
* [https://github.com/NixOS/mobile-nixos/issues/342 boot.growPartition has no effect]
* [https://github.com/NixOS/mobile-nixos/issues/342 boot.growPartition has no effect]
* [https://github.com/NixOS/mobile-nixos/issues/373 how to cross-compile]
* [https://github.com/NixOS/mobile-nixos/issues/373 how to cross-compile]
* [https://github.com/NixOS/nixpkgs/issues/131159 GTK application startup is slowed by lots of icon I/O]


== Status ==
== Status ==


=== Phosh ===
=== Phosh ===
https://github.com/NixOS/mobile-nixos/pull/352 is a PR to add a phosh-demo to mobile-nixos. The author of this wiki page uses this PR.
Working with:
 
<syntaxhighlight lang="nix">
xserver.desktopManager.phosh = {
  enable = true;
  user = "alice";
  group = "users";
  # for better compatibility with x11 applications
  phocConfig.xwayland = "immediate";
};
</syntaxhighlight>


=== Battery ===
=== Battery ===
Line 30: Line 39:
=== Calling ===
=== Calling ===


Working with the following (pr: https://github.com/NixOS/nixpkgs/pull/131695/ ):
Working with:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
environment.systemPackages = [ pkgs.calls ];
programs.calls.enable = true;
services.dbus.packages = [ pkgs.callaudiod ];
# 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"
];
</syntaxhighlight>
</syntaxhighlight>


Known issues:
Known issues:
* incoming calls don't trigger music to be paused. Likely need something like https://source.puri.sm/Librem5/librem5-base/-/merge_requests/170/diffs
* incoming calls don't trigger music to be paused. Likely need something like https://source.puri.sm/Librem5/librem5-base/-/merge_requests/170/diffs
* when the screen is locked, incoming calls can only be answered after unlocking.


=== SMS ===
=== SMS ===
Working with:
Working with:
* {{pull|122373|Chatty}}
* and the following:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
environment.systemPackages = [
environment.systemPackages = [ pkgs.chatty ];
  (pkgs.chatty.override {
    plugins = [
      pkgs.purple-mm-sms
    ];
  })
];
</syntaxhighlight>
</syntaxhighlight>


Line 63: Line 66:


* Front camera works out-of-the-box.
* Front camera works out-of-the-box.
* Back camera requires:
* Back camera works, but autofocus does not ( https://github.com/NixOS/mobile-nixos/issues/393 )
** https://github.com/NixOS/mobile-nixos/pull/392
** https://github.com/NixOS/mobile-nixos/issues/393 tracks autofocus support. The camera is usable without this.


=== Mobile internet ===
=== Mobile internet ===
Working (imperative), with:
Working via gnome-control-center ("Mobile Broadband" section), or:


{{Commands|$ nmcli c add type gsm ifname cdc-wdm0 con-name $PROVIDER apn $APN}}
{{Commands|$ nmcli c add type gsm ifname cdc-wdm0 con-name $PROVIDER apn $APN}}
Other distributions use [https://source.puri.sm/Librem5/gnome-control-center Librem's fork of gnome-control-center] which has a mobile internet panel. https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/583 tracks the upstreaming of this functionality.


=== GPS ===
=== GPS ===
Line 99: Line 98:


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


=== Bluetooth ===
=== Bluetooth ===
Needs https://github.com/NixOS/mobile-nixos/pull/396
Working with:
 
<syntaxhighlight lang="nix">
mobile.boot.stage-1.firmware = [
  config.mobile.device.firmware
];
</syntaxhighlight>
 
=== 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:
 
<syntaxhighlight lang="nix">
services.fwupd.enable = true;
</syntaxhighlight>


=== Alarm clocks ===
=== Alarm clocks ===
Line 111: Line 123:
== Recommended applications ==
== Recommended applications ==


See https://linmobapps.frama.io/ for a list of applications that behave well on small screens, including:
See https://linmobapps.frama.io/ for a list of applications that behave well on small screens, and in particular https://apps.gnome.org/.
 
* {{ic|pkgs.gnome.gnome-chess}}
* {{ic|pkgs.gnome.gnome-podcasts}}
* {{ic|pkgs.portfolio-filemanager}}
* {{ic|pkgs.numberstation}} - TOTP


== See also ==
== See also ==
Line 126: Line 133:
* [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone) PostmarketOS's Pinephone docs]
* [https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone) PostmarketOS's Pinephone docs]
* [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/main/device-pine64-pinephone PostmarketOS's Pinephone config]
* [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/main/device-pine64-pinephone PostmarketOS's Pinephone config]
[[Category: Hardware]]