Add GPD Pocket 3 module to nixos-hardware
This commit is contained in:
parent
1a0ccdbf45
commit
de2ea2beee
43
gpd/pocket-3/default.nix
Normal file
43
gpd/pocket-3/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let inherit (lib) mkDefault;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../common/pc/laptop
|
||||||
|
../../common/pc/laptop/ssd
|
||||||
|
];
|
||||||
|
|
||||||
|
# Necessary kernel modules
|
||||||
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "thunderbolt" ];
|
||||||
|
|
||||||
|
# GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU
|
||||||
|
boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays
|
||||||
|
services.xserver.videoDrivers = [ "intel" ];
|
||||||
|
hardware.opengl.extraPackages = with pkgs; [ intel-media-driver vaapiIntel ];
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
# S3 suspend is broken as of Sept. 2022 (screen does not come back properly), use S2
|
||||||
|
"mem_sleep_default=s2idle"
|
||||||
|
|
||||||
|
# The GPD Pocket3 uses a tablet OLED display, that is mounted rotated 90° counter-clockwise
|
||||||
|
"fbcon=rotate:1" "video=DSI-1:panel_orientation=right_side_up"
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig = {
|
||||||
|
subpixel.rgba = "vbgr"; # Pixel order for rotated screen
|
||||||
|
|
||||||
|
# The OLED display has √(1920² + 1200²) px / 8in ≃ 283 dpi
|
||||||
|
# Per the documentation, antialiasing, hinting, etc. have no visible effect at such high pixel densities anyhow.
|
||||||
|
hinting.enable = mkDefault false;
|
||||||
|
antialias = false; #TODO(nicoo): Fix nixpkgs' HiDPI module
|
||||||
|
};
|
||||||
|
|
||||||
|
# More HiDPI settings
|
||||||
|
hardware.video.hidpi.enable = true;
|
||||||
|
services.xserver.dpi = 280;
|
||||||
|
|
||||||
|
# Necessary for audio support on the 1195G7 model
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options snd-intel-dspcfg dsp_driver=1
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue