Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pine64-pinephone: Modem support improvements #231

merged 5 commits into from Oct 27, 2020


Copy link

@samueldr samueldr commented Oct 18, 2020

This PR makes the modem usable.

Update to megi's fork of mainline Linux

This is AFAICT the better option for hardware support. More details on their website.

This, in turn, gives us kernel 5.9

With this fork I was able to confirm LTE data working with Modem Manager, which already is present when Network Manager is. Though YMMV. Calls/SMS have not been tested yet considering I don't have a plan with those for the time being.

I guess SMS would work if you had software that handles them. Calls might work, but probably need some twiddling with ALSA and such to work. They'll be tested and fixed at a later time.

modem-control service

This systemd service can be used to query the state of the modem (might not be 100% reliable during its boot and poweroff stages), and to control it also. Note that the service status is bound to the modem device presence, which in turn means that powering it on/off manually from the sysfs node will not confuse the service state.

If you want to disable it by default on your system you can add the following to your configuration: = lib.mkForce [

Note that the modem is still turned off by default in U-Boot. This is probably not going to change. Sure, this makes the apparent boot-up of the phone part of the phone longer, but for the time being this is the way the modem is being configured by default on start. This gives better control for a user that wants their modem to be powered off by default.

When Mobile NixOS is much closer to being user-friendly we might revisit its default state during boot-up.

Modem firmware updater

Read the forum thread to know whether you want to update or not. The updater has been packaged, but not made user-friendly as currently it is... debatable... what should be happening here.

The commit introducing the change has more notes in its body detailing how to use the updater.

samueldr added 4 commits Oct 18, 2020
The kernel shouldn't be compressed for our current usage.

Otherwise we need to do more work with U-Boot.
The following from megi's have to be disabled (not set) or else the
console logo will not show up at boot (pre-init).

pine64-pinephone = {
qfirehose = final.callPackage ./qfirehose {};
Copy link
Member Author

@samueldr samueldr Oct 18, 2020

I'm not sure adding a new top-level attribute for each device is the best solution here. Should it be under mobile-nixos instead?

# =
dotDeviceName = "sys-devices-platform-soc-1c1b000.usb-usb3-3\\x2d1-3\\x2d1:1.4-net-wwan0.device";
Copy link
Member Author

@samueldr samueldr Oct 18, 2020

I'd like to have confirmation that this name is stable for the Pinephone 1.2 variants too.

Copy link
Member Author

@samueldr samueldr commented Oct 18, 2020

This does bring up a small complication for users starting from e.g. the generic examples/demo system. The modem service will not be present in that stage-2!

So they have to somehow first rebuild with the device configured. This is not something to worry about now, as this is not a regression. This is something that will have to be handled by whatever (human followed) process we create for installing Mobile NixOS.

This has not been made "fancier" for easier use yet. It is unknown how
useful updating the firmware is.


 $ NIXPKGS_ALLOW_UNFREE=1 nix-build --argstr device pine64-pinephone -A pkgs.pine64-pinephone.qfirehose
 $ sudo ./result/bin/QFirehose -l ./ -f ./newfw

But maybe read more about whether you want to update or not beforehand?
@samueldr samueldr force-pushed the feature/pinephone/modem branch from 8680341 to 0827701 Oct 18, 2020
@samueldr samueldr merged commit 6675a04 into NixOS:master Oct 27, 2020
3 checks passed
@samueldr samueldr deleted the feature/pinephone/modem branch Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant