From 6177753830d378fd1b8e353384f30bc6835b6f09 Mon Sep 17 00:00:00 2001 From: bashfulrobot Date: Sun, 3 Mar 2024 11:33:22 -0800 Subject: [PATCH 1/4] docs: Add README file for Dell XPS 15 9530 - Add new file `dell/xps/15-9530/README.wiki` - Specify tested hardware - Add notes section - Add NVIDIA Offload section [dell/xps/15-9530/README.wiki] - Add a new file `dell/xps/15-9530/README.wiki` - Specify the tested hardware: CPU, RAM, HDD, Screen, Graphics, Input - Add a section for notes - Add a section for NVIDIA Offload --- dell/xps/15-9530/README.wiki | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dell/xps/15-9530/README.wiki diff --git a/dell/xps/15-9530/README.wiki b/dell/xps/15-9530/README.wiki new file mode 100644 index 000000000..ffb58e25c --- /dev/null +++ b/dell/xps/15-9530/README.wiki @@ -0,0 +1,20 @@ += Dell XPS 15 9530 = + +== Tested Hardware == + +* CPU: 13th Gen Intel(R) Core(TM) i9-13900H +* RAM: 32 GB +* HDD: 1 TiB SSD (NVME) +* Screen: 15" 4k (3456 x 2160) +* Graphics: NVIDIA GeForce RTX 4070 Laptop GPU, with Intel Graphics too. +* Input: Touchscreen and trackpad. + +== Notes == + +== NVIDIA Offload == + +In order to run a program on the NVIDIA gpu, you can use the `nvidia-offload` function, for example: +``` +nvidia-offload `nix-shell -p glxinfo --run 'glxgears'` +``` +This is a short bash script that sets the proper environment variables and calls your command. From c9121cc00a2a7b45af287a16a2324f57ff6a9149 Mon Sep 17 00:00:00 2001 From: bashfulrobot Date: Mon, 4 Mar 2024 11:56:24 -0800 Subject: [PATCH 2/4] feat: Add documentation for Goodix fingerprint reader and Touchpad preference in Gnome Settings [dell/xps/15-9530/README.wiki] - Added documentation for Goodix fingerprint reader - Noted that the fingerprint reader has only been tested on Gnome - Mentioned that a reboot is required for fingerprint options to appear in Gnome Settings - Registered fingerprints in the Users module in Gnome Settings - Set the password as the login method to unlock the keyring - Enabled the preference to disable the Touchpad while typing - Recommended disabling the Touchpad during typing showing an example using Home-Manager and `dconf` --- dell/xps/15-9530/README.wiki | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dell/xps/15-9530/README.wiki b/dell/xps/15-9530/README.wiki index ffb58e25c..4fe44e3da 100644 --- a/dell/xps/15-9530/README.wiki +++ b/dell/xps/15-9530/README.wiki @@ -8,6 +8,7 @@ * Screen: 15" 4k (3456 x 2160) * Graphics: NVIDIA GeForce RTX 4070 Laptop GPU, with Intel Graphics too. * Input: Touchscreen and trackpad. +* Fingerprint Reader: Goodix == Notes == @@ -18,3 +19,23 @@ In order to run a program on the NVIDIA gpu, you can use the `nvidia-offload` fu nvidia-offload `nix-shell -p glxinfo --run 'glxgears'` ``` This is a short bash script that sets the proper environment variables and calls your command. + +== Fingerprint Reader == + +I have added support for the fingerprint reader. It has however been tested on Gnome only. + +- After Installation, I had to reboot once before the fingerprint options would showin the Users module in Gnome Settings +- You will need to register your fingerprints in the Users module in Gnome Settings +- When logging in I suggest using your password otherwise the keyring is not unlocked at login. You can use the fingerprint reader at all other times. + +== Touchpad == + +This is a matter of preference, but I do recommend disabling the Touchpad while typing. I hit it with my palm all the time. + +Since I am using Gnome, I have done this through Home-Manager using `dconf`. + +``` +"org/gnome/desktop/peripherals/touchpad" = { + disable-while-typing = true; + }; +``` \ No newline at end of file From 1224d0fb8df8be70104403d6fc27c05208916997 Mon Sep 17 00:00:00 2001 From: bashfulrobot Date: Mon, 4 Mar 2024 14:15:05 -0800 Subject: [PATCH 3/4] feat: Enable fingerprint authentication for login screen - Added new `default.nix` file in `dell/xps/15-9530/fingerprint` directory - Enabled `services.fprintd` service in the configuration - Set up `tod` driver for fingerprint scanner - Allowed password authentication for initial password login - Configured fingerprint authentication for GDM login screen [dell/xps/15-9530/fingerprint/default.nix] - Add a new file `default.nix` in the `dell/xps/15-9530/fingerprint` directory - Enable the `services.fprintd` service in the configuration - Set up the `tod` driver for the fingerprint scanner - Configured fingerprint authentication for the initial password login - Configure fingerprint authentication for the GDM login screen --- dell/xps/15-9530/fingerprint/default.nix | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 dell/xps/15-9530/fingerprint/default.nix diff --git a/dell/xps/15-9530/fingerprint/default.nix b/dell/xps/15-9530/fingerprint/default.nix new file mode 100644 index 000000000..faf05938e --- /dev/null +++ b/dell/xps/15-9530/fingerprint/default.nix @@ -0,0 +1,40 @@ +{ pkgs, lib, config, ... }: { + + environment.systemPackages = [ + + ]; + + services.fprintd = { + enable = true; + tod = { + enable = true; + driver = pkgs.libfprint-2-tod1-goodix; + }; + + }; + + # Used to allow a password login on first login as an alternative to just a fingerprint + security.pam.services.login.fprintAuth = false; + # similarly to how other distributions handle the fingerprinting login + security.pam.services.gdm-fingerprint = + lib.mkIf (config.services.fprintd.enable) { + text = '' + auth required pam_shells.so + auth requisite pam_nologin.so + auth requisite pam_faillock.so preauth + auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so + auth optional pam_permit.so + auth required pam_env.so + auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so + auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so + + account include login + + password required pam_deny.so + + session include login + session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start + ''; + }; + +} From 357be71db958e8d5335284c4cdf7684458090a64 Mon Sep 17 00:00:00 2001 From: bashfulrobot Date: Mon, 4 Mar 2024 14:16:13 -0800 Subject: [PATCH 4/4] feat: Add support for Dell XPS 15-9530 with NVIDIA graphics - Added `default.nix` file for Dell XPS 15-9530 configuration - Imported necessary files for CPU, laptop, SSD, and fingerprint - Enabled thermald service - Configured iwlwifi module with power saving option - Removed commented out code for `disable_11ax` option - Added `default.nix` file for NVIDIA configuration in Dell XPS 15-9530 - Imported `default.nix` file from parent directory and NVIDIA prime configuration file - Configured `hardware.nvidia.prime` with Bus IDs of Intel and NVIDIA GPUs [dell/xps/15-9530/default.nix] - Add a new file `dell/xps/15-9530/default.nix` - Import the following files: `../../../common/cpu/intel`, `../../../common/pc/laptop`, `../../../common/pc/laptop/ssd`, and `./fingerprint` - Enable thermald service - Add configuration for iwlwifi module with `options iwlwifi power_save=1` - Remove commented out code for `disable_11ax` option [dell/xps/15-9530/nvidia/default.nix] - Added a new file `default.nix` in the directory `dell/xps/15-9530/nvidia/` - The file `default.nix` includes two imports: `../default.nix` and `../../../../common/gpu/nvidia/prime.nix` - Added a configuration for `hardware.nvidia.prime` which includes the Bus IDs of the Intel and NVIDIA GPUs. --- dell/xps/15-9530/default.nix | 30 +++++++++++++++++++++++++++++ dell/xps/15-9530/nvidia/default.nix | 15 +++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 dell/xps/15-9530/default.nix create mode 100644 dell/xps/15-9530/nvidia/default.nix diff --git a/dell/xps/15-9530/default.nix b/dell/xps/15-9530/default.nix new file mode 100644 index 000000000..48dc3bdf0 --- /dev/null +++ b/dell/xps/15-9530/default.nix @@ -0,0 +1,30 @@ +{ lib, ... }: +{ + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ./fingerprint + ]; + + # This will save you money and possibly your life! + services.thermald.enable = lib.mkDefault true; + + # 9530 wifi is: + # > lspci | grep i Network + # - 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01) + # > sudo lspci -vv -s 00:14.3 + # 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01) + # Subsystem: Intel Corporation Wi-Fi 6E AX211 160MHz + # + # WiFi speed is slow and crashes by default (https://bugzilla.kernel.org/show_bug.cgi?id=213381) + # disable_11ax - required until ax driver support is fixed + # power_save - works well on this card + # boot.extraModprobeConfig = '' + # options iwlwifi power_save=1 disable_11ax=1 + # ''; + + boot.extraModprobeConfig = '' + options iwlwifi power_save=1 + ''; +} diff --git a/dell/xps/15-9530/nvidia/default.nix b/dell/xps/15-9530/nvidia/default.nix new file mode 100644 index 000000000..257462a45 --- /dev/null +++ b/dell/xps/15-9530/nvidia/default.nix @@ -0,0 +1,15 @@ +{ lib, ... }: +{ + imports = [ + ../default.nix + ../../../../common/gpu/nvidia/prime.nix + ]; + + hardware.nvidia.prime = { + # Bus ID of the Intel GPU. + intelBusId = lib.mkDefault "PCI:0:2:0"; + + # Bus ID of the NVIDIA GPU. + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + }; +}