Framework NixOS (Linux) users self-help

This is a perfect place to ask and folks here should be able to help. :slight_smile:

Got mine up!

Didnā€™t change any configuration yet - itā€™s still based on the 11th gen nixos-hardware flake. Also didnā€™t use usb boot for that matter since Iā€™m using my previous hard drive.

Thatā€™s weird. If I have some time soon, Iā€™ll see if I can build the ISO and boot from it from my machine now that mine is up and running with the 7640U. At least you can run Fedora!

1 Like

Iā€™ll give that a shot! Glad somebody has it working!

Thank you! Iā€™ll respond here as well if I get it up and running.

Ooh can you confirm that your BIOS is 3.02, @kjhoerr ?

Confirmed! JFP30.03.02 reported in BIOS

There does seem to be some kind of hiccup, when first booting the scaling is off and it only logs in as an X session, but logging out and logging back in fixes it. Iā€™m assuming thatā€™s connected to the amdgpu shenanigans

Weird. Yeah I tried popping the SSD out and installing NixOS to it using another machine and booted it up just fine on that machine, but it fails to boot on the Framework.

@lytedev, just to cover all the bases: did you disable secure boot in the BIOS?

(I saw the same screen come up over and over again while I was trying to boot different installers. That is, until I disabled secure boot.)

1 Like

That sounds precisely like the kind of entirely silly thing I would forget to do. Iā€™ll try it later tonight and report back!

Out of curiosity or ignorance, though, why would a Fedora ISO boot just fine?

The Fedora loader/efi thing (super technical term) is most probably signed by a trusted party or Fedoraā€™s keys are pre-loaded in the bios.

I had the same issue you did (took an updated NixOS install from another computer and dropped it into the Framework and had the same message). You can manually register the efiā€™s from the NixOS boot/efi partition into your Frameworkā€™s secure boot database or just disable secure boot.

Disabling Secure Boot solved it for me. Everything is booting and working as I hoped and dreamed.

My ego is very tiny and I feel very stupid, but Iā€™m elated to play with my new laptop in full now!

Thank you all!

Edit: A more clear error message on the BIOS side might go a long way to reduce incoming support requests like my dumb self! :wink:

3 Likes

To note for anyone running AMD, the nixos-hardware default module ā€˜frameworkā€™ sets nvme.noacpi=1 kernel param which is affecting standby. Thereā€™s some useful configuration in that module aside from that, so if you want to keep the module import you can force override the kernel param list with something like:

boot.kernelParams = lib.mkOverride 999 (builtins.filter (p: p != "nvme.noacpi=1") config.boot.kernelParams);

Thereā€™s also the common AMD cpu and gpu modules which are useful for import.

AFAIU itā€™s not a generic module, itā€™s a misnamed config specifically for the 11th Gen Intel version, retained under that name for backwards compatibility reasons. It also (via the generic ā€œlaptopā€ config) enables TLP, which Framework explicitly recommends against on the AMD version, so, I dunno.

Yeah, I just had it enabled since I migrated from the 11th gen. Just wanted to put it out there in case other people run into the same thing.

The framework folder definitely needs some restructuring, but obviously making necessary changes makes it backwards incompatible, which I guess is up to the maintainers. It will definitely need to change with the impending FW16 release.

I made PR #765 for nixos-hardware to add a 7040 config for now so other people can target it.

2 Likes

I didnā€™t bother with any harware specific configs on my 7040. Running the unstable channel and used the latest kernel with

 boot.kernelPackages = pkgs.linuxPackages_latest;

As far as I can tell, everything is working fine with KDE (with 3.03 BIOS everything is working great!). Up to 8 hours with light web browsing and screen at 25% brightness.

Edit: added ā€œUp toā€ on the battery life as YMMV

Same - things have moved fast this week for sure. I hit a couple bumps but am happy on 3.03 beta, updated fingerprint firmware, and kernel 6.5.9 on Nix unstable.

In case it helps others, hereā€™s some random bits from my config.

Firmware updates

services.fwupd.enable = true;

# this might be unnecessary, but I was having trouble with fwupdmgr hanging šŸ¤·
# services.fwupd.daemonSettings.DisabledPlugins = [ "synaptics_mst" ];

# 3.03 is still in beta
services.fwupd.extraRemotes = [ "lvfs-testing" ];

Kernel

# 6.1 also worked fine
boot.kernelPackages = pkgs.linuxPackages_latest;

boot.kernelParams = [
  # reported to help with flashing display issues
  # "amdgpu.sg_display=0"

  # this is supposed to improve power-saving
  # but seems to cause a freeze on wake for me
  # "nvme.noacpi=1"
  
  # https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html#active-mode
  # note: if you're using 6.1, use "passive"
  "amd_pstate=active"
];

# https://git.exozy.me/a/zenpower3
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];

Power-saving
This isnā€™t really Framework-specific, and Iā€™d interested to hear othersā€™ configs, but this is a reasonable starting point IMO. See also the amd_pstate kernel param :arrow_double_up:

# https://github.com/AdnanHodzic/auto-cpufreq
services.auto-cpufreq.enable = true;
# auto-tune on start
powerManagement.powertop.enable = true;

Misc Hardware

# fingerprint reader
services.fprintd.enable = true;

# from nixos-hardware/common/pc/ssd
services.fstrim.enable = true;

# OpenCL / Vulkan
hardware.opengl.extraPackages = [ pkgs.rocm-opencl-icd pkgs.amdvlk ];
3 Likes

18 posts were merged into an existing topic: Framework NixOS (Linux) users self-help (Firmware/Patch discussion)

Hey guys :wave:
Followed some of the suggestions! Thanks for that!

Relatively newish to Linux so I canā€™t really make out dmesg gibberish yet. I have an issue where the Framework 13 7840U wonā€™t resume from sleep correctly. I get thrown into GNOME with my display flashing white depending on how much action is on the screen. When I log out and in again, everything works.
Anyone got any ideas or maybe even the same problem?

Can provide more info if this is novel behaviour. Cheers guys

EDIT: Was able to fix this by using the correct drivers from GitHub - NixOS/nixos-hardware: A collection of NixOS modules covering hardware quirks.

Follow-Up question though: Iā€™m getting a white screen as soon as I open gnome-video or smplayer in fullscreen by double-clicking on the video. Did anyone have the same problem?

EDIT: Also got that fixed by using the LTS kernel version:

āÆ uname -srm
Linux 6.1.42 x86_64

Got the white screen failure on fullscreen with a kernel 6.4.x

2 Likes

My PR for nixos-hardware to add a config for the FW13 7040 AMD was merged, so the framework-13-7040-amd profile can be used as a target now.

I submitted another PR (#776) to rearrange the folder structure for better consistency and shared configuration. It adds a framework-11th-gen-intel profile as well to replace the framework base profile that was used for the 11th gen.

9 Likes

Iā€™m new to NixOS-- is it possible to experiment with the FW13 7040 AMD config in a VM? Or does it not work because the virutalized hardware is not the same as the host hardware?

The root question is how can I experiment with this config without fully committing to running NixOS directly on hardware? Ideally Iā€™d like to play with a config in the VM environment, and be able to just use that same config on the FW13 7040 AMD hardware.