# NixOS on the Framework Laptop 16

**URL:** <https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743>\
**Category:** Linux\
**Tags:** nixos\
**Created:** [March 9, 2024, 11:11pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743 "2024-03-09T23:11:05Z")\
**Posts on this page:** 20\
**Page:** 8

<div class="post-metadata">

**Author:** ![pdp](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pdp](https://community.frame.work/u/pdp)\
**Post date:** [May 30, 2024, 5:10pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/142 "2024-05-30T17:10:46Z")

</div>

The simplest way to check it is to call `powerprofilesctl`, which will show the available profiles and the current one:

```auto
❯ powerprofilesctl
  performance:
    CpuDriver:	amd_pstate
    PlatformDriver:	platform_profile
    Degraded: no

  balanced:
    CpuDriver:	amd_pstate
    PlatformDriver:	platform_profile

* power-saver:
    CpuDriver:	amd_pstate
    PlatformDriver:	platform_profile

```

---

<div class="post-metadata">

**Author:** ![damccull](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/damccull/32/22602_2.png) [@damccull](https://community.frame.work/u/damccull)\
**Post date:** [May 30, 2024, 5:51pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/143 "2024-05-30T17:51:58Z")

</div>

Oh, nice. thanks. I found the Nix/NixOS channel but I didn’t realize there is a whole space. I’ll check it out.

---

<div class="post-metadata">

**Author:** ![Jacob\_Osborne](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@Jacob\_Osborne](https://community.frame.work/u/Jacob_Osborne)\
**Post date:** [June 2, 2024, 3:31pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/144 "2024-06-02T15:31:25Z")

</div>

Is anyone else experiencing issues with their laptop not turning off? Systemd shutdown finishes execution and then I am greeted by a perpetual black screen. I have to hold down the power button to turn it off this happens on unstable and 24-05.

---

<div class="post-metadata">

**Author:** ![MithicSpirit](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@MithicSpirit](https://community.frame.work/u/MithicSpirit)\
**Post date:** [June 2, 2024, 5:57pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/145 "2024-06-02T17:57:07Z")

</div>

I also have this issue. I tried updating the firmware with fwupd, but that didn’t fix it. It occurs on both my NixOS install and on the NixOS live ISO (I’ve only tried the minimal installer), but not on the live ISO for any other Linux distro I’ve tried.

---

<div class="post-metadata">

**Author:** ![shaffle](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@shaffle](https://community.frame.work/u/shaffle)\
**Post date:** [June 2, 2024, 11:17pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/146 "2024-06-02T23:17:45Z")

</div>

What kernel are you on? A lot of people in the Discord have been having power issues with shutdown that were resolved by updating the kernel to the latest 6.9 release.

For some reason, the default kernel included with NixOS is fairly old.

---

<div class="post-metadata">

**Author:** ![MithicSpirit](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@MithicSpirit](https://community.frame.work/u/MithicSpirit)\
**Post date:** [June 2, 2024, 11:55pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/147 "2024-06-02T23:55:16Z")

</div>

I’m on the default 6.6.32 for the new 25.04 release. Will try upgrading to a 6.9.x release.

---

<div class="post-metadata">

**Author:** ![MithicSpirit](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@MithicSpirit](https://community.frame.work/u/MithicSpirit)\
**Post date:** [June 3, 2024, 1:12am UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/148 "2024-06-03T01:12:33Z")

</div>

Update: switched to `boot.kernelPackages = pkgs.linuxPackages_latest;` and now shutting down works properly. Thanks, @shaffle, for the tip!

---

<div class="post-metadata">

**Author:** ![damccull](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/damccull/32/22602_2.png) [@damccull](https://community.frame.work/u/damccull)\
**Post date:** [June 5, 2024, 7:34am UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/150 "2024-06-05T07:34:57Z")

</div>

Is it possible, and how would I, disable the fingerprint reader in favor of password IF the screen is closed AND I’m on A/C power or, more specifically, plugged into a dock?

And while we’re at it, how might I convince my laptop to use iGPU instead dGPU when not in a game?

---

<div class="post-metadata">

**Author:** ![Clement\_Poiret](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/clement_poiret/32/22929_2.png) [@Clement\_Poiret](https://community.frame.work/u/Clement_Poiret)\
**Post date:** [June 5, 2024, 2:33pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/152 "2024-06-05T14:33:01Z")

</div>

Just received my FW16 and installed NixOS on it!  
My config is based on FrostPhoenix one’s. I tweaked it to fit my needs and to make the `laptop` profile suited for our own 😃

dotfiles: [GitHub - clementpoiret/nixos-config: ❄️ NixOs / Hyprland rice with Home-Manager ❄️](https://github.com/clementpoiret/nixos-config)

 ![image](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/1/a/1a73cc93700ea9dbdd608116b93bc2d1b56f647b.png)

---

<div class="post-metadata">

**Author:** ![Redrield](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@Redrield](https://community.frame.work/u/Redrield)\
**Post date:** [June 6, 2024, 10:29pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/153 "2024-06-06T22:29:58Z")

</div>

I don’t know if this is the best way to do it, but I wrote an acpid script to take care of it

```nix
{ ... }:
{
  services.acpid = {
    enable = true;
    handlers.lidClosed = {
      event = "button/lid \\w+ close";
      action = ''
        cat /sys/class/backlight/amdgpu_bl1/device/enabled
        if grep -Fxq disabled /sys/class/backlight/amdgpu_bl1/device/enabled
        then
          echo "Lid closed. Disabling fprintd."
          systemctl stop fprintd
          ln -s /dev/null /run/systemd/transient/fprintd.service
          systemctl daemon-reload
        fi
      '';
    };
    handlers.lidOpen = {
      event = "button/lid \\w+ open";
      action = ''
        if ! $(systemctl is-active --quiet fprintd); then
          echo "Lid open. Enabling fprintd."
          rm -f /run/systemd/transient/fprintd.service
          systemctl daemon-reload
          systemctl start fprintd
        fi
      '';
    };
  };
}

```

This script is tailored to how I have my laptop set up to dock at work, I disable the builtin monitor, which means that reading from `/sys/class/backlight/amdgpu\_blX/device/enabled will report as “disabled” when I’m docked. Based on that I use /run/transient to mask fprintd and reload systemd. The opposite handler is a more permissive inverse, unmasking fprintd if it’s been masked out every time I open the lid

---

<div class="post-metadata">

**Author:** ![StarrWulfe](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/starrwulfe/32/17863_2.png) [@StarrWulfe](https://community.frame.work/u/StarrWulfe)\
**Post date:** [June 7, 2024, 5:01am UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/154 "2024-06-07T05:01:56Z")

</div>

think I’m gonna snatch these and rebuild my system – have another go at trying Nix again.  
But how’s battery life? surely there’s gotta be a way to get it to 10w or less

---

<div class="post-metadata">

**Author:** ![Clement\_Poiret](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/clement_poiret/32/22929_2.png) [@Clement\_Poiret](https://community.frame.work/u/Clement_Poiret)\
**Post date:** [June 7, 2024, 7:01am UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/155 "2024-06-07T07:01:42Z")

</div>

Actually the battery life with the dGPU module is okay but bot incredible. I believe I need to tweak things to optimize for battery consumption, such as running Hyprland on the iGPU rather than dGPU. I did not spent time optimizing that as I needed to be be ready for work first.

If you have tips going further than simply power-profiles-daemon, I’d be happy to try 😃

---

<div class="post-metadata">

**Author:** ![pdp](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@pdp](https://community.frame.work/u/pdp)\
**Post date:** [June 7, 2024, 7:15am UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/156 "2024-06-07T07:15:53Z")

</div>

Depending on your kernel version, it maybe worth checking if VRR (Variable Refresh Rate) is working or not.  
If it’s not, forcing the refresh rate to 60Hz can give you some extra battery life.

---

<div class="post-metadata">

**Author:** ![Clement\_Poiret](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/clement_poiret/32/22929_2.png) [@Clement\_Poiret](https://community.frame.work/u/Clement_Poiret)\
**Post date:** [June 7, 2024, 7:56am UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/157 "2024-06-07T07:56:12Z")

</div>

Ohh thanks for the tip, I’ll check that! I’m on the latest Zen Kernel.

Also just tried the following to use the iGPU first:

```nix
  home.file = lib.mkIf (host == "laptop") {
    # iGPU
    ".config/hypr/card" = {
      source = config.lib.file.mkOutOfStoreSymlink "/dev/dri/by-path/pci-0000:c5:00.0-card";
    };

    # dGPU
    ".config/hypr/fallbackCard" = {
      source = config.lib.file.mkOutOfStoreSymlink "/dev/dri/by-path/pci-0000:03:00.0-card";
    };
  };

  home.sessionVariables = lib.mkIf (host == "laptop") {
    WLR_DRM_DEVICES = "$HOME/.config/hypr/card:$HOME/.config/hypr/fallbackCard";
  };

```

Not sure how to really test if it works as expected.

---

<div class="post-metadata">

**Author:** ![Clement\_Poiret](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/clement_poiret/32/22929_2.png) [@Clement\_Poiret](https://community.frame.work/u/Clement_Poiret)\
**Post date:** [June 7, 2024, 7:58am UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/158 "2024-06-07T07:58:45Z")

</div>

Otherwise, quick question: do you guys managed to setup hidpi for qutebrowser? I tried to set qt auto scale factor on, and set `qt.highdpi = true;` for qutebrowser, but the graphics are still ugly on it…

---

<div class="post-metadata">

**Author:** ![TheStachelfisch](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/thestachelfisch/32/19198_2.png) [@TheStachelfisch](https://community.frame.work/u/TheStachelfisch)\
**Post date:** [June 7, 2024, 1:28pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/159 "2024-06-07T13:28:46Z")

</div>

> [@Clement\_Poiret](#):
>
> Also just tried the following to use the iGPU first:

By default, Hyprland should always favor the iGPU for rendering Hyprland itself.  
This is also mentioned in [Multi-GPU – Hyprland Wiki](https://wiki.hyprland.org/Configuring/Multi-GPU/#telling-hyprland-which-gpu-to-use)

> If you wish to use the integrated GPU to run Hyprland, no further action is required. wlroots will set `WLR_DRM_DEVICES` to the integrated GPU by default.

---

<div class="post-metadata">

**Author:** ![Clement\_Poiret](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/clement_poiret/32/22929_2.png) [@Clement\_Poiret](https://community.frame.work/u/Clement_Poiret)\
**Post date:** [June 7, 2024, 4:03pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/160 "2024-06-07T16:03:22Z")

</div>

While most processes are effectively handled by the iGPU, I still have processes handled by the dGPU which makes me wonder if the dGPU can really go into sleep:

 ![image](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/b/f/bfd5d2567fd9c08114d64afe8b843d505c5f5f75.png)

I also have Hyprland-wrapp and Xwayland processes on the iGPU.

---

<div class="post-metadata">

**Author:** ![StarrWulfe](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/starrwulfe/32/17863_2.png) [@StarrWulfe](https://community.frame.work/u/StarrWulfe)\
**Post date:** [June 7, 2024, 4:28pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/161 "2024-06-07T16:28:23Z")

</div>

I think I need to try that zen kernel and other optimizations firstly so I can get it to a place where I’m not setting my thighs on fire just by having it on first. LOL

This beast is beautiful, I just want her to sip battery until I need to compile, render or frag, that’s all

---

<div class="post-metadata">

**Author:** ![sumiflow](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sumiflow](https://community.frame.work/u/sumiflow)\
**Post date:** [June 9, 2024, 9:46pm UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/162 "2024-06-09T21:46:02Z")

</div>

Have others been successful getting the touchpad to disable while typing?  
Perhaps I’m doing something wrong and I’ve tried a few different things, but without any luck so far. I do have nixos-hardware imported as well and everything else is working well. I’m using Gnome still on X11 since I remember Wayland having a couple issues for me but maybe should I try it again. Thanks!

Edit: Nevermind I got it working with the below and then a re-login.

```auto
    environment.etc = {
      "libinput/local-overrides.quirks".text = ''
        [Keyboard]
        MatchUdevType=keyboard
        MatchName=Framework Laptop 16 Keyboard Module - ANSI Keyboard
        AttrKeyboardIntegration=internal
      '';
    };

```

---

<div class="post-metadata">

**Author:** ![damccull](https://sea1.discourse-cdn.com/flex001/user_avatar/community.frame.work/damccull/32/22602_2.png) [@damccull](https://community.frame.work/u/damccull)\
**Post date:** [June 10, 2024, 10:45am UTC](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743/163 "2024-06-10T10:45:03Z")

</div>

What does gnome prefer? I’m worried my dGPU is running it but I don’t even know how to check.

[Previous page](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743.md?page=7)

[Next page](https://community.frame.work/t/nixos-on-the-framework-laptop-16/46743.md?page=9)
