update system

This commit is contained in:
2025-09-30 09:48:38 +02:00
parent 4a6c182385
commit c1145e6319
8 changed files with 196 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ in
enable = mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor";
hdr = mkOption {
type = types.bool;
default = true;
default = false;
description = "Enable HDR support for the Gigabyte FV43U monitor.";
};
};
@@ -64,9 +64,9 @@ in
scale = 1;
bitdepth = 10;
addreserved = "340,0,0,0";
cm = if cfg.hdr then "hdr" else "srgb";
cm = if cfg.hdr then "hdredid" else "srgb";
sdr_min_luminance = 0.25;
sdr_max_luminance = 400;
sdr_max_luminance = 250;
};
xwayland.force_zero_scaling = true;
misc.vrr = 2; # VA suffers from VRR flicker

View File

@@ -0,0 +1,92 @@
{
pkgs,
lib,
config,
username,
...
}:
with lib;
let
cfg = config.hardware.pimax;
in
{
options.hardware.pimax = {
enable = mkEnableOption "";
};
config = mkIf cfg.enable (
let
monado-pimax =
# https://gitlab.freedesktop.org/Coreforge/monado/-/commits/pimax?ref_type=heads
pkgs.monado.overrideAttrs {
pname = "monado-pimax";
patches = [ ];
src = pkgs.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "Coreforge";
repo = "monado";
rev = "f858ee5dd8ca7696bd9219e8278f2671df56fe6e";
hash = "sha256-Si56yvG+oSfyUaPAlF1FgB7WJo8td1xuVxYnkJvbu4o=";
};
};
monado-pimax-new =
# https://gitlab.freedesktop.org/Coreforge/monado/-/commits/pimax?ref_type=heads
pkgs.monado.overrideAttrs {
pname = "monado-pimax";
patches = [ ];
src = pkgs.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "Coreforge";
repo = "monado";
rev = "f712f680dd57753a31d2605ae1505b06f30d50eb";
hash = "sha256-ke7UXimIvPBDvBU7RV7Q8fAum5LYnHC64NLA7x3XftU=";
};
};
in
{
environment.systemPackages = with pkgs; [
opencomposite
];
home-manager.users."${username}".xdg.configFile = {
"openxr/1/active_runtime.json".source = "${monado-pimax}/share/openxr/1/openxr_monado.json";
"openvr/openvrpaths.vrpath".text = builtins.toJSON {
config = [ "~/.local/share/Steam/config" ];
external_drivers = null;
jsonid = "vrpathreg";
log = [ "~/.local/share/Steam/logs" ];
runtime = [ "${pkgs.opencomposite}/lib/opencomposite" ];
version = 1;
};
};
boot.kernelPatches = [
{
name = "pimax-quirks";
patch = ./pimax.patch;
}
{
name = "amdgpu-ignore-ctx-privileges";
patch = pkgs.fetchpatch {
name = "cap_sys_nice_begone.patch";
url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch";
hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo=";
};
}
];
services.monado = {
enable = true;
defaultRuntime = true;
highPriority = true;
package = monado-pimax;
};
systemd.user.services.monado.environment = {
STEAMVR_LH_ENABLE = "1";
XRT_COMPOSITOR_COMPUTE = "1";
};
}
);
}

View File

@@ -0,0 +1,31 @@
From 13da539f1115fe9803ea5570be0d9ec5310e404c Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <contact@scrumplex.net>
Date: Mon, 20 May 2024 18:28:39 +0200
Subject: [PATCH] drm/edid: add non-desktop quirk to Pimax VR headsets
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
---
drivers/gpu/drm/drm_edid.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 0f7c4c5b14b9..87ca0637732b 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -237,6 +237,13 @@ static const struct edid_quirk {
EDID_QUIRK('S', 'E', 'C', 0x144a, EDID_QUIRK_NON_DESKTOP),
EDID_QUIRK('A', 'U', 'S', 0xc102, EDID_QUIRK_NON_DESKTOP),
+ /* Pimax VR Headsets */
+ EDID_QUIRK('O', 'V', 'R', 0x0003, EDID_QUIRK_NON_DESKTOP),
+ EDID_QUIRK('S', 'V', 'R', 0x1019, EDID_QUIRK_NON_DESKTOP),
+ EDID_QUIRK('P', 'V', 'R', 0x1019, EDID_QUIRK_NON_DESKTOP),
+ EDID_QUIRK('P', 'V', 'R', 0x101a, EDID_QUIRK_NON_DESKTOP),
+ EDID_QUIRK('P', 'V', 'R', 0x101b, EDID_QUIRK_NON_DESKTOP),
+
/* Sony PlayStation VR Headset */
EDID_QUIRK('S', 'N', 'Y', 0x0704, EDID_QUIRK_NON_DESKTOP),
--
2.44.0