From 4c8b4cf54fea8d3a67152b1292bec4b15ce5feec Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 1 Sep 2019 17:57:50 +0200 Subject: [PATCH 1/2] thinkpad: emulate wheel for a trackpoint by default Most trackpoint users I know use the middle-button to have some scrolling functionality. So I think that for ThinkPads at least we should have this enabled by default if the trackpoint shall be used. --- lenovo/thinkpad/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lenovo/thinkpad/default.nix b/lenovo/thinkpad/default.nix index ff22639..99d4937 100644 --- a/lenovo/thinkpad/default.nix +++ b/lenovo/thinkpad/default.nix @@ -1,9 +1,10 @@ -{ lib, pkgs, ... }: +{ config, lib, pkgs, ... }: { imports = [ ../../common/pc/laptop ]; hardware.trackpoint.enable = lib.mkDefault true; + hardware.trackpoint.emulateWheel = lib.mkDefault config.hardware.trackpoint.enable; # Fingerprint reader: login and unlock with fingerprint (if you add one with `fprintd-enroll`) # services.fprintd.enable = true; From abca8d018021bb03faf3507fb99e855801dffba0 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 1 Sep 2019 17:58:15 +0200 Subject: [PATCH 2/2] thinkpad/x1/6th-gen: fix trackpoint name Newer ThinkPads have a new name for the Trackpoint - "TPPS/2 Elan TrackPoint". Having the "[...] IBM Trackpoint" as default caused some weird side-effects on my machine (e.g. stopped the trackpoint working after a suspend) with the wrong name. Although this is mentioned in the option's description[1], I think that this should be declared explicitly here. As soon, as we supported newer models as well[2], we should probably move this into its own common profile. [1] https://nixos.org/nixos/options.html#hardware.trackpoint.device [2] https://certification.ubuntu.com/catalog/component/input/5313/input%3ATPPS/2ElanTrackPoint/ --- lenovo/thinkpad/x1/6th-gen/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index 295c8b0..e8c6f0e 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -12,4 +12,8 @@ ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/cpu-throttling-bug.nix ]; + + # New ThinkPads have a different TrackPoint manufacturer/name. + # See also https://certification.ubuntu.com/catalog/component/input/5313/input%3ATPPS/2ElanTrackPoint/ + hardware.trackpoint.device = "TPPS/2 Elan TrackPoint"; }