From 9c2d730fecfe28298f2201f13ce952475a75ff98 Mon Sep 17 00:00:00 2001 From: pol-epsevg Date: Sat, 18 Apr 2026 17:31:16 +0200 Subject: [PATCH 1/2] Update NixOS accelerometer info Also includes a way to disable the touchscreen. Many Framework Laptop 12 owners have previously complained about the quality of the palm rejection. I was having trouble with palm rejection while drawing, so I figured out how to disable the touchscreen entirely while keeping stylus functionality. --- framework12/nixOS.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/framework12/nixOS.md b/framework12/nixOS.md index 85f8dce..610cf3f 100644 --- a/framework12/nixOS.md +++ b/framework12/nixOS.md @@ -17,7 +17,7 @@ sure it's loaded first by loading it from the initrd. You can either use the nixos-hardware configuration mentioned above, or configure it manually: -``` +```nix boot.initrd.kernelModules = [ "pinctrl_tigerlake" ]; ``` @@ -26,13 +26,18 @@ boot.initrd.kernelModules = [ "pinctrl_tigerlake" ]; iio-sensor-proxy reads the accelerometer data from the kernel and passes it to the desktop environment via dbus. Version 3.7 has a bug, making it incompatible with Framework 12. -NixOS 25.05 and NixOS 25.11 (unstable) are patched: +NixOS channels 25.05 and newer are patched: - https://github.com/NixOS/nixpkgs/pull/427476 - https://github.com/NixOS/nixpkgs/pull/427853 +To enable the accelerometer: + +```nix +hardware.sensor.iio.enable = true; +``` -If you haven't got the patched version yet, you can apply the following workaround: +If you're using an outdated NixOS version, you can apply the following workaround: ```nix nixpkgs.overlays = [ @@ -45,3 +50,16 @@ nixpkgs.overlays = [ }) ]; ``` + +## Disabling the touchscreen + +It is possible to entirely disable the touchscreen while maintaining stylus functionality. +This can be done with an udev rule: + +```nix +services.libinput.enable = true; # If not already present + +services.udev.extraRules = '' + ACTION=="add|change", ENV{ID_INPUT_TOUCHSCREEN}=="1", ENV{LIBINPUT_IGNORE_DEVICE}="1" +''; +``` From d1f762e9ba1fc3ad664c0929d49eb6ba503666da Mon Sep 17 00:00:00 2001 From: pol-epsevg <55996847+pol-epsevg@users.noreply.github.com> Date: Mon, 20 Apr 2026 23:59:39 +0200 Subject: [PATCH 2/2] Add auto-rotate work-around --- framework12/nixOS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework12/nixOS.md b/framework12/nixOS.md index 610cf3f..f2b817a 100644 --- a/framework12/nixOS.md +++ b/framework12/nixOS.md @@ -63,3 +63,5 @@ services.udev.extraRules = '' ACTION=="add|change", ENV{ID_INPUT_TOUCHSCREEN}=="1", ENV{LIBINPUT_IGNORE_DEVICE}="1" ''; ``` + +This breaks auto-rotate using iio. A work-around for Gnome is to use `gnomeExtensions.screen-rotate`