Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Initial support for GPD Pocket #48
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
andir
Jan 14, 2018
Member
Another GPD Pocket User
Have a look at https://github.com/andir/nixos-gpd-pocket those are my configuration files for the gpd pocket. I am currently running nixos unstable on it since there are a few parts that have been patched in newer alsa, kernel, … versions. It also comes with the (almost always) latest version of the Kernel of Hans de Goede (RedHat employee that works on the hardware support for this and many other devices).
Things that do work for me with those settings:
- booting it with a image created from the repo
- X Server rotation (gnome does it's own thing os that is still broken, Has has submitted patches to gnome and they are in gnome master, will be released with next stable release IIRC)
- WiFi works - I bundled that custom pci textfile that was required
- Suspend/Resume works
- Charging Support (via USB-C PD)
- Backlight controls are working
…
I did intend to provide those changes to this repo as soon as everything is mainline/upstream. Feel free to pull those changes into your PR :-)
|
Another GPD Pocket User Have a look at https://github.com/andir/nixos-gpd-pocket those are my configuration files for the gpd pocket. I am currently running nixos unstable on it since there are a few parts that have been patched in newer alsa, kernel, … versions. It also comes with the (almost always) latest version of the Kernel of Hans de Goede (RedHat employee that works on the hardware support for this and many other devices). Things that do work for me with those settings:
I did intend to provide those changes to this repo as soon as everything is mainline/upstream. Feel free to pull those changes into your PR :-) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
lbonn
Jan 14, 2018
Thanks, that looks indeed more polished, I'll look into it.
This setup is also intended to be used on the unstable channel, with a stock 4.14 kernel. As a result some of the support is still missing. On the plus side, this could already be mergeable and updated later (on 4.15's release?)
But I also realized that I forgot to include the brcmfmac4356 firmware anyway so my PR won't work as is.
Definitely opened it too fast...
lbonn
commented
Jan 14, 2018
|
Thanks, that looks indeed more polished, I'll look into it. This setup is also intended to be used on the unstable channel, with a stock 4.14 kernel. As a result some of the support is still missing. On the plus side, this could already be mergeable and updated later (on 4.15's release?) But I also realized that I forgot to include the brcmfmac4356 firmware anyway so my PR won't work as is. Definitely opened it too fast... |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
andir
Jan 14, 2018
Member
Yep, mailine support is what this repo should probably prefer.
Don't worry. That is why there is review :-) You can improve over time.
|
Yep, mailine support is what this repo should probably prefer. Don't worry. That is why there is review :-) You can improve over time. |
| + }; | ||
| + | ||
| + # wifi | ||
| + nixpkgs.config.allowUnfree = true; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
yegortimoshenko
Jan 14, 2018
Member
It should be up to the end user whether to allow unfree packages or not, even when crucial to hardware functionality.
Moreover, it would make sense to only enable the firmware if user explicitly allows unfree packages, so that people that don't install unfree packages can still use the profile, even if without functioning Wi-Fi:
nixpkgs.firmware = with pkgs; lib.optionals config.nixpkgs.config.allowUnfree [
brcmfmac4356-firmware
]
See:
nixos-hardware/apple/default.nix
Lines 8 to 9 in 88bd126
yegortimoshenko
Jan 14, 2018
•
Member
It should be up to the end user whether to allow unfree packages or not, even when crucial to hardware functionality.
Moreover, it would make sense to only enable the firmware if user explicitly allows unfree packages, so that people that don't install unfree packages can still use the profile, even if without functioning Wi-Fi:
nixpkgs.firmware = with pkgs; lib.optionals config.nixpkgs.config.allowUnfree [
brcmfmac4356-firmware
]
See:
nixos-hardware/apple/default.nix
Lines 8 to 9 in 88bd126
| + # wifi | ||
| + nixpkgs.config.allowUnfree = true; | ||
| + hardware.firmware = with pkgs; [ | ||
| + brcmfmac4356-firmware |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
yegortimoshenko
Jan 14, 2018
Member
This doesn't evaluate:
undefined variable brcmfmac4356-firmware at /home/travis/build/NixOS/nixos-hardware/gpd/gpd-pocket/default.nix:29:5
yegortimoshenko
Jan 14, 2018
Member
This doesn't evaluate:
undefined variable brcmfmac4356-firmware at /home/travis/build/NixOS/nixos-hardware/gpd/gpd-pocket/default.nix:29:5
| + | ||
| + # power management | ||
| + services.tlp = { | ||
| + enable = true; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
| + ''; | ||
| + xrandrHeads = [ { output= "DSI1"; monitorConfig = "Option \"Rotate\" \"right\""; } ]; | ||
| + libinput = { | ||
| + enable = true; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
yegortimoshenko
Jan 14, 2018
Member
This is already defined in PC profile:
nixos-hardware/common/pc/default.nix
Line 4 in 5a00ea4
yegortimoshenko
Jan 14, 2018
Member
This is already defined in PC profile:
nixos-hardware/common/pc/default.nix
Line 4 in 5a00ea4
yegortimoshenko
requested changes
Jan 14, 2018
Also, gpd/gpd-pocket should be moved to gpd/pocket, following the current naming convention.
| + }; | ||
| + | ||
| + environment.variables = { | ||
| + GDK_SCALE = "2"; # DPI |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
yegortimoshenko
Jan 14, 2018
Member
All non-mergable attributes should be set via lib.mkDefault so that they can be overrided in user profile:
GDK_SCALE = lib.mkDefault "2";
yegortimoshenko
Jan 14, 2018
Member
All non-mergable attributes should be set via lib.mkDefault so that they can be overrided in user profile:
GDK_SCALE = lib.mkDefault "2";
| + libinput = { | ||
| + enable = true; | ||
| + }; | ||
| + inputClassSections = ['' |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
| + Option "TearFree" "true" | ||
| + Option "DRI" "3" | ||
| + ''; | ||
| + xrandrHeads = [ { output= "DSI1"; monitorConfig = "Option \"Rotate\" \"right\""; } ]; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
yegortimoshenko
Jan 14, 2018
Member
Nitpick: "Option \"Rotate\" \"right\"" -> ''Option "Rotate" "right"''
Also, it would be easier to read with each attribute on a separate line.
yegortimoshenko
Jan 14, 2018
•
Member
Nitpick: "Option \"Rotate\" \"right\"" -> ''Option "Rotate" "right"''
Also, it would be easier to read with each attribute on a separate line.
| + services.xserver = { | ||
| + dpi = 168; | ||
| + deviceSection = '' | ||
| + Option "AccelMethod" "sna" |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
| + }; | ||
| + | ||
| + # TODO: fix media keys | ||
| + # sound.mediaKeys.enable = true; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
yegortimoshenko
Jan 14, 2018
Member
sound.mediaKeys.enable overlaps with some desktop managers (e.g. Xfce), which is why it is not set in this repo even if the device does have media keys.
yegortimoshenko
Jan 14, 2018
Member
sound.mediaKeys.enable overlaps with some desktop managers (e.g. Xfce), which is why it is not set in this repo even if the device does have media keys.
| + hardware.pulseaudio = { | ||
| + enable = true; | ||
| + extraConfig = '' | ||
| + set-card-profile alsa_card.platform-cht-bsw-rt5645 HiFi |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
andir
Jan 14, 2018
Member
There are some hacks required with current mainline kernels. This will change in the future (4.15+).
I am not sure if this is exactly the one since I've been running the 4.15-rc kernels on mine.
andir
Jan 14, 2018
Member
There are some hacks required with current mainline kernels. This will change in the future (4.15+).
I am not sure if this is exactly the one since I've been running the 4.15-rc kernels on mine.
| + set-sink-port alsa_output.platform-cht-bsw-rt5645.HiFi__hw_chtrt5645_0__sink [Out] Speaker | ||
| + ''; | ||
| + daemon.config = { | ||
| + realtime-scheduling = "no"; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
| + }; | ||
| + | ||
| + hardware.pulseaudio = { | ||
| + enable = true; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
yegortimoshenko
Jan 14, 2018
Member
So far there are no profiles that explicitly depend on PulseAudio: the idea is to not force PulseAudio (there are cases that warrant pure ALSA setup, or Jack). Extra configuration for PulseAudio (to make it work once it's enabled) is of course welcome.
yegortimoshenko
Jan 14, 2018
•
Member
So far there are no profiles that explicitly depend on PulseAudio: the idea is to not force PulseAudio (there are cases that warrant pure ALSA setup, or Jack). Extra configuration for PulseAudio (to make it work once it's enabled) is of course welcome.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
yegortimoshenko
Jan 14, 2018
Member
Also, would you license this work under CC0-1.0? License is not in the master branch yet, see #47.
|
Also, would you license this work under CC0-1.0? License is not in the master branch yet, see #47. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
lbonn
Jan 15, 2018
Licensing it under CC0-1.0 is fine by me, if @andir also agrees for the part I'd eventually take from their repo.
I tried to apply some of your changes and I'll do some test later to verify that nothing is extraneous.
About the wifi firmware, I suppose it's not really the place to put some blobs (see https://github.com/andir/nixos-gpd-pocket/tree/master/firmware). Would there be an alternate solution, for example leaving some instructions for the user to add and include from another channel?
lbonn
commented
Jan 15, 2018
|
Licensing it under CC0-1.0 is fine by me, if @andir also agrees for the part I'd eventually take from their repo. I tried to apply some of your changes and I'll do some test later to verify that nothing is extraneous. About the wifi firmware, I suppose it's not really the place to put some blobs (see https://github.com/andir/nixos-gpd-pocket/tree/master/firmware). Would there be an alternate solution, for example leaving some instructions for the user to add and include from another channel? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
andir
Jan 15, 2018
Member
For what it is worth you could pull that from my repo.... I also grant permission to re-use my configuration from THAT repo under CC0-1.0.
|
For what it is worth you could pull that from my repo.... I also grant permission to re-use my configuration from THAT repo under CC0-1.0. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
yegortimoshenko
Jan 16, 2018
Member
I think blob here will do, but it could be merged with Nixpkgs for a wider reach, perhaps later.
|
I think blob here will do, but it could be merged with Nixpkgs for a wider reach, perhaps later. |
This was referenced Feb 2, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment|
any news here? |
lbonn
commented
Mar 12, 2018
•
|
@Mic92 I'm a bit short on time these days unfortunately, if someone wants to make progress on that, be my guest |
|
@lbonn wrong username? ;) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
lbonn
commented
Mar 12, 2018
|
Oops, sorry |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
grahamc
Mar 12, 2018
Member
|
Please don't put blobs in this repo, though
…On Mar 12, 2018 6:53 AM, "lbonn" ***@***.***> wrote:
Oops, sorry
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAErrHCccuDrkyBffA2haerm1h3f0pOlks5tdlPGgaJpZM4Rdm96>
.
|
lbonn commentedJan 14, 2018
Here is a small number of settings for a reasonably functional system running on a GPD Pocket
Some parts might be out of scope for this repo (the environment variables at the end?). I'll let you be the judge of that: please tell me what I should remove.