Hi everyone! Feel free to read my daily driver https://github.com/quinn-dougherty/configuration.nix/tree/main/framework
Ping me if you need any help it seems like I might have experience.
Hi everyone! Feel free to read my daily driver https://github.com/quinn-dougherty/configuration.nix/tree/main/framework
Ping me if you need any help it seems like I might have experience.
A few of the most complete nix documentation I rely on:
I donāt know if this is correct place but since this looks like an open discussion of nix over framework laptop, Iām asking for inputs on a new RFC I recently made:
Any public opinion matters!
Thank you
I could probably use some help if anyone is willing. I installed NixOS on my 13" and didnāt even think to check the forums here. But I basically have the single config file. Havenāt delved into flakes yet. Was thinking that may just complicate things more before I got a grasp of how everything works.
But Iāve been having a bunch of issues.
The system wont auto-boot. It shows the generations but doesnāt select one automatically even though those settings werenāt modified in configuration.nix.
I cannot get my egpu working with my 3090 no matter what I try. System always gets all jerky and low frame rates even when setting it up as prime. And offload doesnāt work.
I am thinking about doing a new install to see if that fixes any issues. Which is what made me come and and search to see if anyone else has been using NixOS.
So if anyone has some time I could probably use some help doing it a better way this time around.
Fingerprint wonāt work in NixOS even with hardware config file in NixOS-hardware
Someone please make a script for NixOS that clears the fingerprints I beg lol
Below are the additional lines I set this morning into /etc/nixos/configuration.nix
(and rebooted) when I was at 95% battery. After logging back in, loading up all my usual apps in gnome40, I shut the lid and when opening again 7+ hours later was at 88%. This is a huge improvement for me as before Iād have found it at 20% if lucky.
# Ensures lid-close leads to a sleep I actually expect, that doesn't drain my battery.
# "S3" here refers to Suspend-to-Ram of Intel's si0x documentation:
# https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top/reference/energy-analysis-metrics-reference/s0ix-states.html
# Lines below taken from https://github.com/NixOS/nixos-hardware/blob/488931efb69a50307fa0d71e23e78c8706909416/dell/xps/13-9370/default.nix
#
# Force S3 sleep mode. See README.wiki for details.
boot.kernelParams = [ "mem_sleep_default=deep" ];
Hope this helps someone else!
Nice tip!
Thank you!
do you happen to use systemds hybrid-sleep
feature? I keep seeing the large energy consumption during hybrid-sleep even with your fix (running nixos 23.05).
I do use hybrid-sleep my because framework keeps consuming that much power during sleep and hybrid-sleep ensures my RAM content isnt lost when the battery is drained.
This would be helpful for other NixOS users, rolling this into the existing thread to maintain visibility for those who may not know about this thread.
Do you have a command I could run in order to determine what my mode is? Happy to run it and get back to you.
tl;dr anyone who comes across this big, unified nixos+framework thread that Mattās kindly maintaining is a prime candidate to at least read the configs nixos-hardware/framework at master Ā· NixOS/nixos-hardware Ā· GitHub (and consider using them per the README, if not also contributing).
I donāt have edit access to that^ post anymore, so Iām starting a new PSA for nixos users: donāt use^ this tip. Or rather, you probably donāt want that tip, and instead use the more robust route maintained by other folks for you: the nixos-hardware
project ā¦ by doing this:
i7-1165G7
)i7-1165G7
shows ā13 (11th Gen Intel Core)ālookup your framework generation in the table here GitHub - NixOS/nixos-hardware: A collection of NixOS modules covering hardware quirks. (stable link) (ctrl+f for framework
)
follow GitHub - NixOS/nixos-hardware: A collection of NixOS modules covering hardware quirks. (stable link) which Iāll summarize here for convenience:
nixos-hardware
nixos āchannelā by running:sudo nix-channel --add \
https://github.com/NixOS/nixos-hardware/archive/master.tar.gz \
nixos-hardware
sudo nix-channel --update
copy the string on the right side (for me it was <nixos-hardware/framework>
; for you it might be <nixos-hardware/framework/13th-gen-intel>
); letās call it $YOUR_FRAMEWORK_STRING
pull up your configuration.nix
and add string from step 3:
configuration.nix
that looks like:imports = [
./hardware-configuration.nix
];
$YOUR_FRAMEWORK_STRING
in that listimports = [
$YOUR_FRAMEWORK_STRING # for me this line is: <nixos-hardware/framework>
./hardware-configuration.nix
];
see if this is workingā¦
mem_leep_default=deep
)sudo nixos-rebuild switch --upgrade
I think itās self-explanatory why a collective of configurations is better than hand-maintaining duplicate versions on your own (and likely not as complete). If you want to see what your generationās nixos-hardware configuration is in this repo, click into your subfolder here: nixos-hardware/framework at master Ā· NixOS/nixos-hardware Ā· GitHub (stable link)
If youāre curious why the 11th gen does not have mem_sleep_default=deep
line any longer, see this PR: framework laptop 11th gen: Improve sleep power efficiency by obj-obj Ā· Pull Request #717 Ā· NixOS/nixos-hardware Ā· GitHub.
(I really wanted to make this a separate post for higher visibility, but as itās been merged into this thread, Iāll leave it be)
Yes the original tip works, but I just didnāt look closely at the larger repo when I copied that xps13 config (until now). If youāre reading this and youāre a nixos expert, please comment with more guidance (and/or confirmation even). I certainly didnāt figure this out via any official nixos docs/wiki (wouldāve been nice), so I feel like I should document how I stumbled upon thisā¦
mem_sleep_default=deep
post and looked at the original github link in my inline-comment, to jog my memoryā¦
mem_sleep_default=deep
was already set by said configs 9 months before I postednixos-hardware
repoās instructions (summary above)fprintd
default already set (stable link), I tested fingerprint unlock (after running fprintd-enroll
), and confirmed gdm3 and sudo
both behave as expected. This hadnāt actually worked for me for a long time.Edit: lol nixos-hardware called out in the third post on this uber thread Well, I guess Matt merging everyone in here will decrease likelihood folks like me will miss it (Iām clearly not the only one, since folks appreciated my one-off tweak). Edit2: typo in bulletsā nestings
Yeah I was pondering the same the other day, given the various success and failure stories with different Linux distros around here.
Maybe a small script that checks the relevant settings from /sys
to report what has been configured correctly or not.
EDIT
While I generally agree a central collection being helpful, itās also highly specific to NixOS at a current point in time, because modules like nixos-hardware
are merged with the ābuiltinā modules that a NixOS release ships with. And due to how merging works the magic happens because of the sum of all the modules.
A form of magic where the outcomes is really hard to translate into the non-NixOS world.
I guess this is kinda a rant-like argument for my idea above - the checkscript.
Dang, thanks for all the digging @jon. I was already using nixos-hardware
but didnāt realize PR #717 was created.
Hey friends ---- a situation emerged approaching the 2-year mark of daily driving my batch 5 with my power button.
I donāt know if itās battery or button press, but basically it has no way of turning on without being plugged in. Also, it will interpret the moment of plugging in as āpower onā, so the button is effectively doing nothing.
I can unplug it after boot sequence starts and things are basically fine. (battery life is of course not super great, but I havenāt invested a lot of time into optimizing my OS for that).
Anyone have ideas or advice?
Is there some reason you suspect this behaviour is related to NixOS?
Always test against a live USB of Fedora or Ubuntu LTS. If the power behavior is not present there, itās your config. If it is present in the live environments, then Iād open a ticket and link to your thread here pointing out clearly you did indeed, test the Live USB approach to triage.
Hey, all! Let me know if a separate thread would be preferable and Iāll post elsewhere.
Iām trying to install NixOS on my Framework 13 with a Ryzen 7640U mainboard, but cannot get the ISO to boot from my USB drive. Fedora Workstation 39 Beta booted just fine from the same flash drive and I dd
ād the ISO to the flash drive the same way:
dd if=$ISO of=/dev/sda status=progress bs=1M
Iām guessing the issue has something to do with the way the ISO boots. NixOS, to my knowledge, boots in a different way than other distros, but I have another system that can boot off this drive, so I would consider this a bug in the BIOS. Correct me if Iām wrong!
The BIOS of the 7640U mainboard as of today is on 3.02, which I understand has issues with certain Linux kernels, but I tried building my own NixOS ISO using Linux 6.5.7 (the Fedora install currently on it is 6.5.6) and that didnāt seem to resolve the issue in any way. The USB drive still does not boot on the Framework but does boot on my current laptop, a Lenovo T480.
For anybody interested, the flake for this is here (you can build it with
nix build git+ssh://gitea@git.lyte.dev/lytedev/foxtrot-nix#nixosConfigurations.live.config.system.build.isoImage
) and its worth noting that I stripped all the NixOS kernel patches since they were incompatible with 6.5.7.
Iām guessing my next step is to go ahead and try GitHub - nix-community/nixos-anywhere: install nixos everywhere via ssh [maintainer=@numtide] to convert the Fedora installation into a NixOS one?
Either way, Iād love to know that my shiny, powerful new laptop will boot my bootable media, even if it is kind of wacky. Ultimately, Iām very much wanting to run NixOS on this thing since I run it everywhere else. I know itās not officially supported, but I also know that there are other people out there that will want this like me and Iām willing to put in effort on my end to make it happen, but I suspect weāre stuck waiting on the 3.03 BIOS upgrade to hopefully fix this bug (even though the official reason for the BIOS upgrade seems mostly related to amdgpu graphics driver issues). That thread is here for posterity: Laptop 13 AMD Ryzen 7040 BIOS 3.03 and driver Release