fix: panel-cwu50 timing fix from Rex's kernel - native 720x1280 mode
Swap H/V display mode to native panel resolution (720x1280) instead of rotated (1280x720). The DRM/KMS pipeline handles rotation via connector orientation property. Setting wrong horizontal resolution caused DSI controller to send extra pixels per line, resulting in horizontal repetition. Add DCS-based panel detection in init_sequence2 as supplemental check. Based on ak-rex/ClockworkPi-linux rpi-6.12.y branch panel-cwu50.c. Replaces old 0008 patches (DSI_INIT0, BURST removal) that didn't fix the issue.
This commit is contained in:
186
flake.nix
186
flake.nix
@@ -12,18 +12,21 @@
|
||||
url = "git+https://git.lix.systems/lix-project/lix?ref=main";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixpkgs-uconsole.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
nixos-uconsole = {
|
||||
url = "github:nixos-uconsole/nixos-uconsole";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:nixos-uconsole/nixos-uconsole/v1.1.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs-uconsole";
|
||||
inputs.nixos-raspberrypi.follows = "nixos-raspberrypi";
|
||||
};
|
||||
nixos-raspberrypi = {
|
||||
url = "github:nvmd/nixos-raspberrypi/v1.20260517.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:gortium/nixos-raspberrypi/cm5-cross-v1";
|
||||
inputs.nixpkgs.follows = "nixpkgs-uconsole";
|
||||
};
|
||||
self.submodules = true;
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, agenix, lix, nixos-uconsole, nixos-raspberrypi, ... }@inputs:
|
||||
outputs = { self, nixpkgs, agenix, lix
|
||||
, nixpkgs-uconsole, nixos-uconsole, nixos-raspberrypi
|
||||
, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
keys = import ./lib/keys.nix;
|
||||
@@ -34,77 +37,120 @@
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/root/.age/bootstrap.key" ];
|
||||
};
|
||||
overlays = [ agenix.overlays.default (import ./overlays/reticulum.nix) ];
|
||||
overlays = [ agenix.overlays.default ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
config.allowUnfree = true;
|
||||
config.permittedInsecurePackages = [
|
||||
"openclaw-2026.3.12"
|
||||
];
|
||||
config.permittedInsecurePackages = [ "openclaw-2026.3.12" ];
|
||||
};
|
||||
|
||||
devShell = import ./shells/nix_dev.nix {
|
||||
inherit pkgs system agenix;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
lazyworkhorse = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit system self keys paths inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.rocmSupport = true;
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"openclaw-2026.3.12"
|
||||
];
|
||||
nix.package = lix.packages.${system}.default;
|
||||
}
|
||||
agenix.nixosModules.default
|
||||
./hosts/lazyworkhorse/configuration.nix
|
||||
./hosts/lazyworkhorse/hardware-configuration.nix
|
||||
./modules/nixos/filesystem/hoardingcow-mount.nix
|
||||
./modules/nixos/services/docker_manager.nix
|
||||
./modules/nixos/services/open_code_server.nix
|
||||
./modules/nixos/services/ollama_init_custom_models.nix
|
||||
./modules/nixos/services/openclaw_node.nix
|
||||
./modules/nixos/security/ai-worker-restricted.nix
|
||||
./users/gortium.nix
|
||||
./users/ai-worker.nix
|
||||
];
|
||||
};
|
||||
|
||||
cyt-pi = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit self keys paths inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
nix.package = lix.packages."aarch64-linux".default;
|
||||
}
|
||||
./hosts/cyt-pi/configuration.nix
|
||||
./hosts/cyt-pi/hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
uConsole = nixos-raspberrypi.lib.nixosSystem {
|
||||
specialArgs = { inherit self keys paths inputs nixos-raspberrypi; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
nix.package = lix.packages."aarch64-linux".default;
|
||||
}
|
||||
nixos-raspberrypi.nixosModules.raspberry-pi-5.base
|
||||
nixos-uconsole.nixosModules.uconsole-cm5
|
||||
./hosts/uConsole/configuration.nix
|
||||
./hosts/uConsole/hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
lazyworkhorse = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit system self keys paths inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.rocmSupport = true;
|
||||
nixpkgs.config.permittedInsecurePackages = [ "openclaw-2026.3.12" ];
|
||||
nix.package = lix.packages.${system}.default;
|
||||
}
|
||||
agenix.nixosModules.default
|
||||
./hosts/lazyworkhorse/configuration.nix
|
||||
./hosts/lazyworkhorse/hardware-configuration.nix
|
||||
./modules/nixos/filesystem/hoardingcow-mount.nix
|
||||
./modules/nixos/services/docker_manager.nix
|
||||
./modules/nixos/services/open_code_server.nix
|
||||
./modules/nixos/services/ollama_init_custom_models.nix
|
||||
./modules/nixos/services/openclaw_node.nix
|
||||
./modules/nixos/security/ai-worker-restricted.nix
|
||||
./users/gortium.nix
|
||||
./users/ai-worker.nix
|
||||
];
|
||||
};
|
||||
|
||||
cyt-pi = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit self keys paths inputs; };
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
nix.package = lix.packages."aarch64-linux".default;
|
||||
}
|
||||
./hosts/cyt-pi/configuration.nix
|
||||
./hosts/cyt-pi/hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
uconsole-cm5 = nixpkgs-uconsole.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = {
|
||||
inherit self keys paths inputs;
|
||||
nixos-raspberrypi = nixos-raspberrypi;
|
||||
isCM4 = false;
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.buildPlatform = "x86_64-linux";
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
boot.loader.raspberry-pi.bootloader = "kernel";
|
||||
}
|
||||
nixos-raspberrypi.nixosModules.nixpkgs-rpi
|
||||
# Fix display timings from Rex's kernel: native 720x1280 instead of
|
||||
# rotated 1280x720, plus DCS-based panel detection.
|
||||
({ lib, ... }: {
|
||||
boot.kernelPatches = [{
|
||||
name = "panel-cwu50-rex-timing-fix";
|
||||
patch = ./patches/0008-panel-cwu50-rex-timing-fix.patch;
|
||||
}];
|
||||
})
|
||||
nixos-raspberrypi.nixosModules.raspberry-pi-5.base
|
||||
nixos-raspberrypi.lib.inject-overlays
|
||||
nixos-raspberrypi.lib.inject-overlays-global
|
||||
nixos-uconsole.nixosModules.uconsole-cm5
|
||||
({ config, lib, pkgs, inputs, ... }: let
|
||||
lix-cross = import inputs.nixpkgs-uconsole {
|
||||
localSystem = { system = "x86_64-linux"; };
|
||||
crossSystem = { system = "aarch64-linux"; };
|
||||
overlays = [ inputs.lix.overlays.default ];
|
||||
};
|
||||
in { nix.package = lix-cross.lix; })
|
||||
agenix.nixosModules.default
|
||||
./hosts/uconsole-cm5/configuration.nix
|
||||
./hosts/uconsole-cm5/hardware-configuration.nix
|
||||
];
|
||||
};
|
||||
devShells.${system}.default = devShell;
|
||||
};
|
||||
|
||||
devShells.${system}.default = devShell;
|
||||
|
||||
packages.${system} = {
|
||||
uconsole-cm5-image = (nixos-raspberrypi.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = {
|
||||
inherit self keys inputs;
|
||||
nixos-raspberrypi = nixos-raspberrypi;
|
||||
isCM4 = false;
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.buildPlatform = system;
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
}
|
||||
nixos-raspberrypi.nixosModules.nixpkgs-rpi
|
||||
nixos-raspberrypi.nixosModules.raspberry-pi-5.base
|
||||
nixos-raspberrypi.lib.inject-overlays-global
|
||||
nixos-raspberrypi.nixosModules.sd-image
|
||||
nixos-uconsole.nixosModules.uconsole-cm5
|
||||
agenix.nixosModules.default
|
||||
./hosts/uconsole-cm5/configuration.nix
|
||||
];
|
||||
}).config.system.build.sdImage;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user