Giter Club home page Giter Club logo

nixos-hardware's Introduction

NixOS profiles to optimize settings for different hardware.

Setup

Using channels

Add and update nixos-hardware channel:

$ sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
$ sudo nix-channel --update

Then import an appropriate profile path from the table below. For example, to enable ThinkPad X220 profile, your imports in /etc/nixos/configuration.nix should look like:

imports = [
  <nixos-hardware/lenovo/thinkpad/x220>
  ./hardware-configuration.nix
];

New updates to the expressions here will be fetched when you update the channel.

Using nix flakes support

There is also experimental flake support. In your /etc/nixos/flake.nix add the following:

{
  description = "NixOS configuration with flakes";
  inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master";

  outputs = { self, nixpkgs, nixos-hardware }: {
    # replace <your-hostname> with your actual hostname
    nixosConfigurations.<your-hostname> = nixpkgs.lib.nixosSystem {
      # ...
      modules = [
        # ...
        # add your model from this list: https://github.com/NixOS/nixos-hardware/blob/master/flake.nix
        nixos-hardware.nixosModules.dell-xps-13-9380
      ];
    };
  };
}

Using fetchGit

You can fetch the git repository directly:

imports = [
  "${builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; }}/lenovo/thinkpad/x220"
];

Unlike the channel, this will update the git repository on a rebuild. However, you can easily pin to a particular revision if you desire more stability.

How to contribute a new device profile

See CONTRIBUTING.md.

Get in touch

For questions and discussions, come join us in the nixos-anywhere matrix room.

List of Profiles

See code for all available configurations.

Model Path
Acer Aspire 4810T <nixos-hardware/acer/aspire/4810t>
Airis N990 <nixos-hardware/airis/n990>
Apple MacBook Air 3,X <nixos-hardware/apple/macbook-air/3>
Apple MacBook Air 4,X <nixos-hardware/apple/macbook-air/4>
Apple MacBook Air 6,X <nixos-hardware/apple/macbook-air/6>
Apple MacBook Pro 10,1 <nixos-hardware/apple/macbook-pro/10-1>
Apple MacBook Pro 11,5 <nixos-hardware/apple/macbook-pro/11-5>
Apple MacBook Pro 12,1 <nixos-hardware/apple/macbook-pro/12-1>
Apple MacBook Pro 14,1 <nixos-hardware/apple/macbook-pro/14-1>
Apple MacMini (2010, Intel, Nvidia) <nixos-hardware/apple/macmini/4>
Apple Macs with a T2 Chip <nixos-hardware/apple/t2>
Asus Pro WS X570-ACE <nixos-hardware/asus/pro-ws-x570-ace>
Asus ROG Ally RC71L (2023) <nixos-hardware/asus/ally/rc71l>
Asus ROG Strix G513IM <nixos-hardware/asus/rog-strix/g513im>
Asus ROG Strix G733QS <nixos-hardware/asus/rog-strix/g733qs>
Asus ROG Zephyrus G14 GA401 <nixos-hardware/asus/zephyrus/ga401>
Asus ROG Zephyrus G14 GA402 <nixos-hardware/asus/zephyrus/ga402>
Asus ROG Zephyrus G14 GA402X* (2023) <nixos-hardware/asus/zephyrus/ga402x/amdgpu>
Asus ROG Zephyrus G14 GA402X* (2023) <nixos-hardware/asus/zephyrus/ga402x/nvidia>
Asus ROG Zephyrus G15 GA502 <nixos-hardware/asus/zephyrus/ga502>
Asus ROG Zephyrus G15 GA503 <nixos-hardware/asus/zephyrus/ga503>
Asus ROG Zephyrus M16 GU603H <nixos-hardware/asus/zephyrus/gu603h>
Asus TUF FX504GD <nixos-hardware/asus/fx504gd>
Asus TUF FX506HM <nixos-hardware/asus/fx506hm>
Asus TUF FA507RM <nixos-hardware/asus/fa507rm>
Asus TUF FA507NV <nixos-hardware/asus/fa507nv>
Asus Zenbook Flip S13 UX371 <nixos-hardware/asus/zenbook/ux371>
BeagleBoard PocketBeagle <nixos-hardware/beagleboard/pocketbeagle>
Chuwi MiniBook X <nixos-hardware/chuwi/minibook-x>
Deciso DEC series <nixos-hardware/deciso/dec>
Dell G3 3779 <nixos-hardware/dell/g3/3779>
Dell Inspiron 14 5420 <nixos-hardawre/dell/inspiron/14-5420>
Dell Inspiron 5509 <nixos-hardware/dell/inspiron/5509>
Dell Inspiron 5515 <nixos-hardware/dell/inspiron/5515>
Dell Inspiron 7405 <nixos-hardware/dell/inspiron/7405>
Dell Latitude 3340 <nixos-hardware/dell/latitude/3340>
Dell Latitude 3480 <nixos-hardware/dell/latitude/3480>
Dell Latitude 5520 <nixos-hardware/dell/latitude/5520>
Dell Latitude 7280 <nixos-hardware/dell/latitude/7280>
Dell Latitude 7390 <nixos-hardware/dell/latitude/7390>
Dell Latitude 7430 <nixos-hardware/dell/latitude/7430>
Dell Latitude 7490 <nixos-hardware/dell/latitude/7490>
Dell Latitude 9430 <nixos-hardware/dell/latitude/9430>
Dell Optiplex 3050 <nixos-hardware/dell/optiplex/3050>
Dell Poweredge R7515 <nixos-hardware/dell/poweredge/r7515>
Dell Precision 3541 <nixos-hardware/dell/precision/3541>
Dell Precision 5530 <nixos-hardware/dell/precision/5530>
Dell Precision 7520 <nixos-hardware/dell/precision/7520>
Dell XPS 13 7390 <nixos-hardware/dell/xps/13-7390>
Dell XPS 13 9300 <nixos-hardware/dell/xps/13-9300>
Dell XPS 13 9310 <nixos-hardware/dell/xps/13-9310>
Dell XPS 13 9333 <nixos-hardware/dell/xps/13-9333>
Dell XPS 13 9343 <nixos-hardware/dell/xps/13-9343>
Dell XPS 13 9350 <nixos-hardware/dell/xps/13-9350>
Dell XPS 13 9360 <nixos-hardware/dell/xps/13-9360>
Dell XPS 13 9370 <nixos-hardware/dell/xps/13-9370>
Dell XPS 13 9380 <nixos-hardware/dell/xps/13-9380>
Dell XPS 15 7590, nvidia <nixos-hardware/dell/xps/15-7590/nvidia>
Dell XPS 15 7590 <nixos-hardware/dell/xps/15-7590>
Dell XPS 15 9500, nvidia <nixos-hardware/dell/xps/15-9500/nvidia>
Dell XPS 15 9500 <nixos-hardware/dell/xps/15-9500>
Dell XPS 15 9510, nvidia <nixos-hardware/dell/xps/15-9510/nvidia>
Dell XPS 15 9510 <nixos-hardware/dell/xps/15-9510>
Dell XPS 15 9520, nvidia <nixos-hardware/dell/xps/15-9520/nvidia>
Dell XPS 15 9520 <nixos-hardware/dell/xps/15-9520>
Dell XPS 15 9550, nvidia <nixos-hardware/dell/xps/15-9550/nvidia>
Dell XPS 15 9550 <nixos-hardware/dell/xps/15-9550>
Dell XPS 15 9560, intel only <nixos-hardware/dell/xps/15-9560/intel>
Dell XPS 15 9560, nvidia only <nixos-hardware/dell/xps/15-9560/nvidia>
Dell XPS 15 9560 <nixos-hardware/dell/xps/15-9560>
Dell XPS 15 9570, intel only <nixos-hardware/dell/xps/15-9570/intel>
Dell XPS 15 9570, nvidia <nixos-hardware/dell/xps/15-9570/nvidia>
Dell XPS 15 9570 <nixos-hardware/dell/xps/15-9570>
Dell XPS 17 9700, intel <nixos-hardware/dell/xps/17-9700/intel
Dell XPS 17 9700, nvidia <nixos-hardware/dell/xps/17-9700/nvidia>
Dell XPS 17 9710, intel only <nixos-hardware/dell/xps/17-9710/intel>
Dell XPS E7240 <nixos-hardware/dell/e7240>
Framework 11th Gen Intel Core <nixos-hardware/framework/13-inch/11th-gen-intel>
Framework 12th Gen Intel Core <nixos-hardware/framework/13-inch/12th-gen-intel>
Framework 13th Gen Intel Core <nixos-hardware/framework/13-inch/13th-gen-intel>
Framework 13 AMD Ryzen 7040 Series <nixos-hardware/framework/13-inch/7040-amd>
Framework 16 AMD Ryzen 7040 Series <nixos-hardware/framework/16-inch/7040-amd>
FriendlyARM NanoPC-T4 <nixos-hardware/friendlyarm/nanopc-t4>
FriendlyARM NanoPi R5s <nixos-hardware/friendlyarm/nanopi-r5s>
Focus M2 Gen 1 <nixos-hardware/focus/m2/gen1>
Gigabyte B550 <nixos-hardware/gigabyte/b550>
GPD MicroPC <nixos-hardware/gpd/micropc>
GPD P2 Max <nixos-hardware/gpd/p2-max>
GPD Pocket 3 <nixos-hardware/gpd/pocket-3>
GPD WIN 2 <nixos-hardware/gpd/win-2>
GPD WIN Max 2 2023 <nixos-hardware/gpd/win-max-2/2023>
Google Pixelbook <nixos-hardware/google/pixelbook>
HP Elitebook 2560p <nixos-hardware/hp/elitebook/2560p>
HP Elitebook 830g6 <nixos-hardware/hp/elitebook/830/g6>
HP Elitebook 845g7 <nixos-hardware/hp/elitebook/845/g7>
HP Elitebook 845g8 <nixos-hardware/hp/elitebook/845/g8>
HP Elitebook 845g9 <nixos-hardware/hp/elitebook/845/g9>
HP Notebook 14-df0023 <nixos-hardware/hp/notebook/14-df0023>
Huawei Matebook X Pro (2020) <nixos-hardware/huawei/machc-wa>
i.MX8QuadMax Multisensory Enablement Kit <nixos-hardware/nxp/imx8qm-mek>
Intel NUC 8i7BEH <nixos-hardware/intel/nuc/8i7beh>
Lenovo IdeaPad 3 15alc6 <nixos-hardware/lenovo/ideapad/15alc6>
Lenovo IdeaPad Gaming 3 15arh05 <nixos-hardware/lenovo/ideapad/15arh05>
Lenovo IdeaPad 5 Pro 16ach6 <nixos-hardware/lenovo/ideapad/16ach6>
Lenovo IdeaPad Z510 <nixos-hardware/lenovo/ideapad/z510>
Lenovo IdeaPad Slim 5 <nixos-hardware/lenovo/ideapad/slim-5>
Lenovo IdeaPad S145 15api <nixos-hardware/lenovo/ideapad/s145-15api>
Lenovo Legion 5 15ach6h <nixos-hardware/lenovo/legion/15ach6h>
Lenovo Legion 5 15arh05h <nixos-hardware/lenovo/legion/15arh05h>
Lenovo Legion 7 Slim 15ach6 <nixos-hardware/lenovo/legion/15ach6>
Lenovo Legion 5 Pro 16ach6h <nixos-hardware/lenovo/legion/16ach6h>
Lenovo Legion 5 Pro 16ach6h (Hybrid) <nixos-hardware/lenovo/legion/16ach6h/hybrid>
Lenovo Legion 5 Pro 16ach6h (Nvidia) <nixos-hardware/lenovo/legion/16ach6h/nvidia>
Lenovo Legion 7 16achg6 (Hybrid) <nixos-hardware/lenovo/legion/16achg6/hybrid>
Lenovo Legion 7 16achg6 (Nvidia) <nixos-hardware/lenovo/legion/16achg6/nvidia>
Lenovo Legion 7i Pro 16irx8h (Intel) <nixos-hardware/lenovo/legion/16irx8h>
Lenovo Legion Slim 7 Gen 7 (AMD) <nixos-hardware/lenovo/legion/16arha7>
Lenovo Legion T5 AMR5 <nixos-hardware/lenovo/legion/t526amr5>
Lenovo Legion Y530 15ICH <nixos-hardware/lenovo/legion/15ich>
Lenovo ThinkPad A475 <nixos-hardware/lenovo/thinkpad/a475>
Lenovo ThinkPad E14 (AMD) <nixos-hardware/lenovo/thinkpad/e14/amd>
Lenovo ThinkPad E14 (Intel) <nixos-hardware/lenovo/thinkpad/e14/intel>
Lenovo ThinkPad E470 <nixos-hardware/lenovo/thinkpad/e470>
Lenovo ThinkPad E495 <nixos-hardware/lenovo/thinkpad/e495>
Lenovo ThinkPad L13 Yoga <nixos-hardware/lenovo/thinkpad/l13/yoga>
Lenovo ThinkPad L13 <nixos-hardware/lenovo/thinkpad/l13>
Lenovo ThinkPad L14 (AMD) <nixos-hardware/lenovo/thinkpad/l14/amd>
Lenovo ThinkPad L14 (Intel) <nixos-hardware/lenovo/thinkpad/l14/intel>
Lenovo ThinkPad L480 <nixos-hardware/lenovo/thinkpad/l480>
Lenovo ThinkPad P1 Gen 3 <nixos-hardware/lenovo/thinkpad/p1/3th-gen>
Lenovo ThinkPad P14s AMD Gen 1 <nixos-hardware/lenovo/thinkpad/p14s/amd/gen1>
Lenovo ThinkPad P14s AMD Gen 2 <nixos-hardware/lenovo/thinkpad/p14s/amd/gen2>
Lenovo ThinkPad P14s AMD Gen 3 <nixos-hardware/lenovo/thinkpad/p14s/amd/gen3>
Lenovo ThinkPad P14s AMD Gen 4 <nixos-hardware/lenovo/thinkpad/p14s/amd/gen4>
Lenovo ThinkPad P16s AMD Gen 1 <nixos-hardware/lenovo/thinkpad/p16s/amd/gen1>
Lenovo ThinkPad P1 <nixos-hardware/lenovo/thinkpad/p1>
Lenovo ThinkPad P50 <nixos-hardware/lenovo/thinkpad/p50>
Lenovo ThinkPad P51 <nixos-hardware/lenovo/thinkpad/p51>
Lenovo ThinkPad P52 <nixos-hardware/lenovo/thinkpad/p52>
Lenovo ThinkPad P53 <nixos-hardware/lenovo/thinkpad/p53>
Lenovo ThinkPad T14 AMD Gen 1 <nixos-hardware/lenovo/thinkpad/t14/amd/gen1>
Lenovo ThinkPad T14 AMD Gen 2 <nixos-hardware/lenovo/thinkpad/t14/amd/gen2>
Lenovo ThinkPad T14 AMD Gen 3 <nixos-hardware/lenovo/thinkpad/t14/amd/gen3>
Lenovo ThinkPad T14 AMD Gen 4 <nixos-hardware/lenovo/thinkpad/t14/amd/gen4>
Lenovo ThinkPad T14 <nixos-hardware/lenovo/thinkpad/t14>
Lenovo ThinkPad T14s AMD Gen 1 <nixos-hardware/lenovo/thinkpad/t14s/amd/gen1>
Lenovo ThinkPad T14s <nixos-hardware/lenovo/thinkpad/t14s>
Lenovo ThinkPad T410 <nixos-hardware/lenovo/thinkpad/t410>
Lenovo ThinkPad T420 <nixos-hardware/lenovo/thinkpad/t420>
Lenovo ThinkPad T430 <nixos-hardware/lenovo/thinkpad/t430>
Lenovo ThinkPad T440p <nixos-hardware/lenovo/thinkpad/t440p>
Lenovo ThinkPad T440s <nixos-hardware/lenovo/thinkpad/t440s>
Lenovo ThinkPad T450s <nixos-hardware/lenovo/thinkpad/t450s>
Lenovo ThinkPad T460 <nixos-hardware/lenovo/thinkpad/t460>
Lenovo ThinkPad T460p <nixos-hardware/lenovo/thinkpad/t460p>
Lenovo ThinkPad T460s <nixos-hardware/lenovo/thinkpad/t460s>
Lenovo ThinkPad T470s <nixos-hardware/lenovo/thinkpad/t470s>
Lenovo ThinkPad T480 <nixos-hardware/lenovo/thinkpad/t480>
Lenovo ThinkPad T480s <nixos-hardware/lenovo/thinkpad/t480s>
Lenovo ThinkPad T490 <nixos-hardware/lenovo/thinkpad/t490>
Lenovo ThinkPad T495 <nixos-hardware/lenovo/thinkpad/t495>
Lenovo ThinkPad T520 <nixos-hardware/lenovo/thinkpad/t520>
Lenovo ThinkPad T550 <nixos-hardware/lenovo/thinkpad/t550>
Lenovo ThinkPad T590 <nixos-hardware/lenovo/thinkpad/t590>
Lenovo ThinkPad W520 <nixos-hardware/lenovo/thinkpad/w520>
Lenovo ThinkPad X1 Yoga <nixos-hardware/lenovo/thinkpad/x1/yoga>
Lenovo ThinkPad X1 Yoga Gen 7 <nixos-hardware/lenovo/thinkpad/x1/yoga/7th-gen>
Lenovo ThinkPad X1 (6th Gen) <nixos-hardware/lenovo/thinkpad/x1/6th-gen>
Lenovo ThinkPad X1 (7th Gen) <nixos-hardware/lenovo/thinkpad/x1/7th-gen>
Lenovo ThinkPad X1 (9th Gen) <nixos-hardware/lenovo/thinkpad/x1/9th-gen>
Lenovo ThinkPad X1 (10th Gen) <nixos-hardware/lenovo/thinkpad/x1/10th-gen>
Lenovo ThinkPad X1 (11th Gen) <nixos-hardware/lenovo/thinkpad/x1/11th-gen>
Lenovo ThinkPad X1 Extreme Gen 2 <nixos-hardware/lenovo/thinkpad/x1-extreme/gen2>
Lenovo ThinkPad X1 Extreme Gen 4 <nixos-hardware/lenovo/thinkpad/x1-extreme/gen4>
Lenovo ThinkPad X1 Nano Gen 1 <nixos-hardware/lenovo/thinkpad/x1-nano/gen1>
Lenovo ThinkPad X13 Yoga <nixos-hardware/lenovo/thinkpad/x13/yoga>
Lenovo ThinkPad X13 Yoga (3th Gen) <nixos-hardware/lenovo/thinkpad/x13/yoga/3th-gen>
Lenovo ThinkPad X13 (Intel) <nixos-hardware/lenovo/thinkpad/x13/intel>
Lenovo ThinkPad X13 (AMD) <nixos-hardware/lenovo/thinkpad/x13/amd>
Lenovo ThinkPad X140e <nixos-hardware/lenovo/thinkpad/x140e>
Lenovo ThinkPad X200s <nixos-hardware/lenovo/thinkpad/x200s>
Lenovo ThinkPad X220 <nixos-hardware/lenovo/thinkpad/x220>
Lenovo ThinkPad X230 <nixos-hardware/lenovo/thinkpad/x230>
Lenovo ThinkPad X250 <nixos-hardware/lenovo/thinkpad/x250>
Lenovo ThinkPad X260 <nixos-hardware/lenovo/thinkpad/x260>
Lenovo ThinkPad X270 <nixos-hardware/lenovo/thinkpad/x270>
Lenovo ThinkPad X280 <nixos-hardware/lenovo/thinkpad/x280>
Lenovo ThinkPad X390 <nixos-hardware/lenovo/thinkpad/x390>
Lenovo ThinkPad Z Series <nixos-hardware/lenovo/thinkpad/z>
Lenovo ThinkPad Z13 Gen 1 <nixos-hardware/lenovo/thinkpad/z/gen1/z13>
Lenovo ThinkPad Z13 Gen 2 <nixos-hardware/lenovo/thinkpad/z/gen2/z13>
LENOVO Yoga 6 13ALC6 82ND <nixos-hardware/lenovo/yoga/6/13ALC6>
LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND <nixos-hardware/lenovo/yoga/7/14ARH7/amdgpu>
LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND <nixos-hardware/lenovo/yoga/7/14ARH7/nvidia>
LENOVO Yoga 7 Slim Gen8 <nixos-hardware/lenovo/yoga/7/slim/gen8>
MSI B550-A PRO <nixos-hardware/msi/b550-a-pro>
MSI B350 TOMAHAWK <nixos-hardware/msi/b350-tomahawk>
MSI GS60 2QE <nixos-hardware/msi/gs60>
MSI GL62/CX62 <nixos-hardware/msi/gl62>
Microchip Icicle Kit <nixos-hardware/microchip/icicle-kit>
Microsoft Surface Go <nixos-hardware/microsoft/surface/surface-go>
Microsoft Surface Pro (Intel) <nixos-hardware/microsoft/surface/surface-pro-intel>
Microsoft Surface Laptop (AMD) <nixos-hardware/microsoft/surface/surface-laptop-amd>
Microsoft Surface Range (Common Modules) <nixos-hardware/microsoft/surface/common>
Microsoft Surface Pro 3 <nixos-hardware/microsoft/surface-pro/3>
Microsoft Surface Pro 9 <nixos-hardware/microsoft/surface-pro/9>
Morefine M600 <nixos-hardware/morefine/m600>
NXP iMX8 MPlus Evaluation Kit <nixos-hardware/nxp/imx8mp-evk>
NXP iMX8 MQuad Evaluation Kit <nixos-hardware/nxp/imx8mq-evk>
Hardkernel Odroid HC4 <nixos-hardware/hardkernel/odroid-hc4>
Hardkernel Odroid H3 <nixos-hardware/hardkernel/odroid-h3>
Omen 15-en0010ca <nixos-hardware/omen/14-fb0798ng>
Omen 15-en0010ca <nixos-hardware/omen/15-en0010ca>
Omen 16-n0005ne <nixos-hardware/omen/16-n0005ne>
Omen 15-en1007sa <nixos-hardware/omen/15-en1007sa>
Omen 15-en0002np <nixos-hardware/omen/15-en0002np>
One-Netbook OneNetbook 4 <nixos-hardware/onenetbook/4>
Panasonic Let's Note CF-LX4 <nixos-hardware/panasonic/letsnote/cf-lx4>
PC Engines APU <nixos-hardware/pcengines/apu>
PINE64 Pinebook Pro <nixos-hardware/pine64/pinebook-pro>
PINE64 RockPro64 <nixos-hardware/pine64/rockpro64>
PINE64 STAR64 <nixos-hardware/pine64/star64>
Protectli VP4670 <nixos-hardware/protectli/vp4670>
Purism Librem 13v3 <nixos-hardware/purism/librem/13v3>
Purism Librem 15v3 <nixos-hardware/purism/librem/15v3>
Purism Librem 5r4 <nixos-hardware/purism/librem/5r4>
Raspberry Pi 2 <nixos-hardware/raspberry-pi/2>
Raspberry Pi 3 <nixos-hardware/raspberry-pi/3>
Raspberry Pi 4 <nixos-hardware/raspberry-pi/4>
Raspberry Pi 5 <nixos-hardware/raspberry-pi/5>
Samsung Series 9 NP900X3C <nixos-hardware/samsung/np900x3c>
StarFive VisionFive v1 <nixos-hardware/starfive/visionfive/v1>
StarFive VisionFive 2 <nixos-hardware/starfive/visionfive/v2>
Supermicro A1SRi-2758F <nixos-hardware/supermicro/a1sri-2758f>
Supermicro M11SDV-8C-LN4F <nixos-hardware/supermicro/m11sdv-8c-ln4f>
Supermicro X10SLL-F <nixos-hardware/supermicro/x10sll-f>
Supermicro X12SCZ-TLN4F <nixos-hardware/supermicro/x12scz-tln4f>
System76 (generic) <nixos-hardware/system76>
System76 Darter Pro 6 <nixos-hardware/system76/darp6>
System76 Gazelle Gaze18 <nixos-hardware/system76/gaze18>
Toshiba Chromebook 2 swanky <nixos-hardware/toshiba/swanky>
Tuxedo InfinityBook v4 <nixos-hardware/tuxedo/infinitybook/v4>
TUXEDO InfinityBook Pro 14 - Gen7 <nixos-hardware/tuxedo/infinitybook/pro14/gen7>
TUXEDO Pulse 14 - Gen3 <nixos-hardware/tuxedo/pulse/14/gen3>
TUXEDO Pulse 15 - Gen2 <nixos-hardware/tuxedo/pulse/15/gen2>

nixos-hardware's People

Contributors

999eagle avatar aciceri avatar azazel75 avatar bors[bot] avatar carlossless avatar dependabot[bot] avatar domenkozar avatar ehmry avatar ericson2314 avatar fgaz avatar gangaram-tii avatar kjhoerr avatar leifhelm avatar lostattractor avatar lukateras avatar ma27 avatar mcdonc avatar mexisme avatar mic92 avatar mitchmindtree avatar nickcao avatar pasqui23 avatar rehno-lindeque avatar stigtsp avatar supersandro2000 avatar tadfisher avatar tlvince avatar tomberek avatar tomfitzhenry avatar truenaho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nixos-hardware's Issues

Nixos-rebuild fails after adding this

When following the README to add this repo as a channel, I get the following error at the next nixos-rebuild switch:

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13
building Nix...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
/tmp/nixos-rebuild.Oj5CEO/nix
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
building the system configuration...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

This is consistently the case for me. It does not seem to happen, if I add the channel with a name not starting with nixos

file 'nixpkgs' was not found

I added <nixos-hardware/lenovo/thinkpad/t410> to my configuration, and then got the error below.

warning: Nix search path entry ‘/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs’ does not exist, ignoring
error: file ‘nixpkgs’ was not found in the Nix search path (add it using $NIX_PATH or -I)

conflicting definitions: console.font in dell/xps/13-9360

Hi,
Im brand new to nixos, but trying to import the <nixos-hardware/dell/xps/13-9360> package.

  [ # Include the results of the hardware scan.
    <nixos-hardware/dell/xps/13-9360>
    ./hardware-configuration.nix
  ];

But im getting

The option `console.font' has conflicting definitions, in 
`/etc/nixos/hardware-configuration.nix' and 
`/nix/var/nix/profiles/per-user/root/channels/nixos-hardware/dell/xps/13-9360'.

The issue is that my hardware-configuration got autogenerated with

 # High-DPI console                                                                       
 console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; 

And xps/13-9360 package also sets mkdefault on that attribute.

console.font = lib.mkDefault "latarcyrheb-sun32";

I use nixos stateVersion = "20.03"

Identifying devices through DMI ID?

The files under /sys/devices/virtual/dmi/id/ should allow most laptops, and probably brand-name pre-built computers too.

This could probably be used to detect available hardware configuration in some way, and the values could be used to help categorize the files in a way that is automatically searchable. Some of that information (modalias) is used in the udev hwdb to detect hardware and apply quirks to them.

I have attached a dump of the data in different classes of machines I own. This will help kickstart discussion and discovery of the helpful attributes.


Acer C720p (with MrChromebox's coreboot-based UEFI)
~ $ (cd /sys/devices/virtual/dmi/id/ ; for f in *; do echo -n "$f="; cat "$f"; done)
bios_date=07/14/2017
bios_vendor=coreboot
bios_version=MrChromebox
board_name=Peppy
board_serial=cat: board_serial: Permission denied
board_vendor=GOOGLE
board_version=1.0
chassis_asset_tag=
chassis_serial=cat: chassis_serial: Permission denied
chassis_type=9
chassis_vendor=GOOGLE
chassis_version=
modalias=dmi:bvncoreboot:bvrMrChromebox:bd07/14/2017:svnGOOGLE:pnPeppy:pvr1.0:rvnGOOGLE:rnPeppy:rvr1.0:cvnGOOGLE:ct9:cvr:
power=cat: power: Is a directory
product_family=Google_Slippy
product_name=Peppy
product_serial=cat: product_serial: Permission denied
product_version=1.0
subsystem=cat: subsystem: Is a directory
sys_vendor=GOOGLE
uevent=MODALIAS=dmi:bvncoreboot:bvrMrChromebox:bd07/14/2017:svnGOOGLE:pnPeppy:pvr1.0:rvnGOOGLE:rnPeppy:rvr1.0:cvnGOOGLE:ct9:cvr:
ASUS TP300LA
~ $ (cd /sys/devices/virtual/dmi/id/ ; for f in *; do echo -n "$f="; cat "$f"; done)
bios_date=11/09/2015
bios_vendor=American Megatrends Inc.
bios_version=TP300LA.205
board_asset_tag=ATN12345678901234567
board_name=TP300LA
board_serial=cat: board_serial: Permission denied
board_vendor=ASUSTeK COMPUTER INC.
board_version=1.0       
chassis_asset_tag=No Asset Tag    
chassis_serial=cat: chassis_serial: Permission denied
chassis_type=10
chassis_vendor=ASUSTeK COMPUTER INC.
chassis_version=1.0       
modalias=dmi:bvnAmericanMegatrendsInc.:bvrTP300LA.205:bd11/09/2015:svnASUSTeKCOMPUTERINC.:pnTP300LA:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnTP300LA:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
power=cat: power: Is a directory
product_family=TP
product_name=TP300LA
product_serial=cat: product_serial: Permission denied
product_uuid=cat: product_uuid: Permission denied
product_version=1.0       
subsystem=cat: subsystem: Is a directory
sys_vendor=ASUSTeK COMPUTER INC.
uevent=MODALIAS=dmi:bvnAmericanMegatrendsInc.:bvrTP300LA.205:bd11/09/2015:svnASUSTeKCOMPUTERINC.:pnTP300LA:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnTP300LA:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
Chuwi Hi10 Pro (HQ64) (cheap atom-based tablet)
~ $ (cd /sys/devices/virtual/dmi/id/ ; for f in *; do echo -n "$f="; cat "$f"; done)
bios_date=11/10/2016
bios_vendor=American Megatrends Inc.
bios_version=5.11
board_asset_tag=Hampoo_reserve
board_name=Cherry Trail CR
board_serial=cat: board_serial: Permission denied
board_vendor=Hampoo
board_version=V103
chassis_asset_tag=Default string
chassis_serial=cat: chassis_serial: Permission denied
chassis_type=3
chassis_vendor=Default string
chassis_version=Default string
modalias=dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd11/10/2016:svnCHUWIINNOVATIONANDTECHNOLOGY(SHENZHEN)CO.LTD:pnHi10protablet:pvrHampoo_reserve:rvnHampoo:rnCherryTrailCR:rvrV103:cvnDefaultstring:ct3:cvrDefaultstring:
power=cat: power: Is a directory
product_family=CherryTrail CR -- Hampoo
product_name=Hi10 pro tablet
product_serial=cat: product_serial: Permission denied
product_uuid=cat: product_uuid: Permission denied
product_version=Hampoo_reserve
subsystem=cat: subsystem: Is a directory
sys_vendor=CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD
uevent=MODALIAS=dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd11/10/2016:svnCHUWIINNOVATIONANDTECHNOLOGY(SHENZHEN)CO.LTD:pnHi10protablet:pvrHampoo_reserve:rvnHampoo:rnCherryTrailCR:rvrV103:cvnDefaultstring:ct3:cvrDefaultstring:
Custom PC build using a P5N7A-VM motherboard
~ $ (cd /sys/devices/virtual/dmi/id/ ; for f in *; do echo -n "$f="; cat "$f"; done)
bios_date=04/29/2010
bios_vendor=American Megatrends Inc.
bios_version=0519   
board_asset_tag=To Be Filled By O.E.M.
board_name=P5N7A-VM
board_serial=cat: board_serial: Permission denied
board_vendor=ASUSTeK Computer INC.
board_version=Rev 1.xx
chassis_asset_tag=Asset-1234567890
chassis_serial=cat: chassis_serial: Permission denied
chassis_type=3
chassis_vendor=Chassis Manufacture
chassis_version=Chassis Version
modalias=dmi:bvnAmericanMegatrendsInc.:bvr0519:bd04/29/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5N7A-VM:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
power=cat: power: Is a directory
product_family=To Be Filled By O.E.M.
product_name=System Product Name
product_serial=cat: product_serial: Permission denied
product_uuid=cat: product_uuid: Permission denied
product_version=System Version
subsystem=cat: subsystem: Is a directory
sys_vendor=System manufacturer
uevent=MODALIAS=dmi:bvnAmericanMegatrendsInc.:bvr0519:bd04/29/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5N7A-VM:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
HP Z420 Workstation
~ $ (cd /sys/devices/virtual/dmi/id/ ; for f in *; do echo -n "$f="; cat "$f"; done)
bios_date=06/01/2016
bios_vendor=Hewlett-Packard
bios_version=J61 v03.90
board_asset_tag=DUFFMAN
board_name=1589
board_serial=cat: board_serial: Permission denied
board_vendor=Hewlett-Packard
board_version=0.00
chassis_asset_tag=DUFFMAN
chassis_serial=cat: chassis_serial: Permission denied
chassis_type=6
chassis_vendor=Hewlett-Packard
chassis_version=
modalias=dmi:bvnHewlett-Packard:bvrJ61v03.90:bd06/01/2016:svnHewlett-Packard:pnHPZ420Workstation:pvr:rvnHewlett-Packard:rn1589:rvr0.00:cvnHewlett-Packard:ct6:cvr:
power=cat: power: Is a directory
product_family=103C_53335X G=D
product_name=HP Z420 Workstation
product_serial=cat: product_serial: Permission denied
product_uuid=cat: product_uuid: Permission denied
product_version=
subsystem=cat: subsystem: Is a directory
sys_vendor=Hewlett-Packard
uevent=MODALIAS=dmi:bvnHewlett-Packard:bvrJ61v03.90:bd06/01/2016:svnHewlett-Packard:pnHPZ420Workstation:pvr:rvnHewlett-Packard:rn1589:rvr0.00:cvnHewlett-Packard:ct6:cvr:

Link with the ArchLinux wiki

The ArchLinux wiki is a wonderful source of information. It has a great deal of information on hardware support and is actively kept up2date. Let's piggy-back on it.

I can think of two things that could be useful:

  • profile naming: there exists a lot of hardware out there. When in doubt with the profile name, that the name of the ArchLinux wiki page.
  • profile info: link back to the ArchLinux wiki page. This will be useful to motivate various configuration decisions.

I think that we should piggy-back on it. For example if there is an ArchLinux wiki page for a specific hardware.

What do you think?

XPS 13 9370 Battery Drain

Does anyone know how to check if deep sleep is properly being forced on the XPS 9370? I'm seeing large battery drains while it's suspended again, and it resumes from suspend faster than I remember when I first enabled this "Fix".

Thanks.

Error after evaluating Dell profile

thmzlt@machine ~> nix-env --verbose -qa
evaluating file ‘/nix/store/0l1dl400k2a5b2r1r6jci113gwyrgqyh-nix-1.11.16/share/nix/corepkgs/derivation.nix’
evaluating file ‘/home/thmzlt/.nix-defexpr/channels_root/nixos-hardware/dell/xps/15-9550/default.nix’
error: cannot auto-call a function that has an argument without a default value (‘lib’)
thmzlt@machine ~> sudo nix-channel --list
nixos-hardware https://github.com/NixOS/nixos-hardware/archive/master.tar.gz
nixos https://nixos.org/channels/nixos-unstable

How to throttle on thermal events?

It doesn't happen often, but sometimes when my laptop is really busy it will decide to shut down completely:

Nov 16 09:26:47 wmertens-nixos kernel: thermal thermal_zone3: critical temperature reached (80 C), shutting down

This is no fun obviously. Is there a way to have it instead throttle?

Using the nixos-channel makes nix-env --upgrade to fail

Hi,

I have an issue when having the nixos-hardware in my channels list: nix-env --upgrade is broken

[fat@fat-openio]$ sudo -i nix-channel --list
nixos https://nixos.org/channels/nixos-18.09
nixos-hardware https://github.com/NixOS/nixos-hardware/archive/master.tar.gz
[fat@fat-openio]$ nix-channel --list
nixos-unstable https://nixos.org/channels/nixos-unstable
[fat@fat-openio]$ sudo -i nix-channel --update
unpacking channels...

[fat@fat-openio]$ nix-channel --update
unpacking channels...
fat@fat-openio]$ nix-env --verbose -u firefox
evaluating file '/nix/store/rffcxk0l94lc96yl07r26sdnfql6x0h4-nix-2.1.3/share/nix/corepkgs/derivation.nix'
evaluating file '/nix/store/d31qkkqp4s78fs9wixwb72rqyv8dq89y-env-manifest.nix'
evaluating file '/home/fat/.nix-defexpr/channels_root/nixos-hardware/supermicro/a1sri-2758f/default.nix'
error: cannot auto-call a function that has an argument without a default value ('pkgs')

If I remove the nixos-hardware channel, nix-env works great.

Has someone an idea for fixing or helping debugging the issue ?

Thanks

Requesting configuration for Thinkpad A485

I am new to NixOS Community, finally made my jump from manjaro to nix. I am not able to find a profile ready to be used with my laptop Thinkpad A485. I am using Thinkpad T495 since they beling to same lineup. I am facing the problem where once the system is put to sleep, it will not wake up. It is a request to add one config for A485.

Enable intel-media-driver?

cc: @yegortimoshenko

Today I leaned that there is another driver from Intel that works with libva for accelerated video.

IF you add intel-media-driver to opengl packages, you can do this
LIBVA_DRIVER_NAME=iHD vainfo and see that a different driver is being used.

I don't really understand the pro/cons or any differences between using i965 and iHD, but I wanted to mention it since it doesn't seem widely documented/known.

I documented this on the related wiki page: https://nixos.wiki/wiki/Accelerated_Video_Playback

What is a proper way to create ALSA device mode patch on NixOS?

Regularly, to bind hardware ID ports to proper devices, if there are no ALSA mode supported - there can be a patch supplied.


(unwrap) 1. Patch, for example, `/lib/firmware/asus-g752vt.fw`:

[codec]
0x10ec0668 0x10431ced 0

[pincfg]
#Pin 12 is Internal Mic
0x12 0x90a60160
#Pin 14 is Internal "front" speakers
0x14 0x90170110
#Pin 15 is "Line Out" according to the manual, But Pin 15 won't work
#Trying to use this as an output will have a constant tone too.
#Using this as an output breaks the front speakers working correctly with detection
0x15 0x40f000f0
#Pin 16 is the headphone jack.
0x16 0x0321403f
#Pin 18 is the external Microphone jack.
0x18 0x03a19020
#Pin 19 is nothing.
0x19 0x411111f0
#Pin 1a is the internal subwoofer.  (Set the sound system to Stereo 2.1)
0x1a 0x90170151
#Pin 1b is nothing.
0x1b 0x411111f0
#Pin 1d is nothing.
0x1d 0x40c6852d
#Pin 1e is the internal SPDIF out.
0x1e 0x014b1180
#Pin 1f is nothing.
0x1f 0x411111f0

  1. And then (/etc/modprobe.d/alsa-base.conf) sound.extraConfig =
options snd-hda-intel enable=1 index=0 enable_msi=1 model=asus-mode5 patch=asus-g752vt.fw

When I would get the setup working - I would submit it here.

But I do not know how to properly supply a patch, so I am asking in the best place possible - here.

Dell XPS 13 2-in-1 (7390) WiFi won't work with current (5.3) kernel

Hi,

(First of all, this is my first time using NixOS on a physical machine - as opposed to VM or container - so I'm sorry if this is not the right way/place to report this!)

I just installed NixOS on a Dell XPS 13 2-in-1 (apparently that's the "7390" model). I used the minimal installation CD (from here). The WiFi interface (a "Killer Wi-Fi 6 AX1650i 201NGW") wasn't recognized. I installed over Ethernet, and after rebooting on the newly installed system, I noticed the following message in the kernel log:

[    3.829133] iwlwifi 0000:00:14.3: Collecting data: trigger 15 fired.
[    4.080199] iwlwifi 0000:00:14.3: Start IWL Error Log Dump:
[    4.080221] iwlwifi 0000:00:14.3: Status: 0x00000000, count: -1090658721
[    4.080246] iwlwifi 0000:00:14.3: Loaded firmware version: 50.3e391d3e.0
[    4.080276] iwlwifi 0000:00:14.3: 0xFC7539BB | ADVANCED_SYSASSERT          
...
[    4.082177] iwlwifi 0000:00:14.3: 0x05B0905B | CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[    4.082233] iwlwifi 0000:00:14.3: 0x0000025B | CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[    4.082352] iwlwifi 0000:00:14.3: SecBoot CPU1 Status: 0x5d55, CPU2 Status: 0x3
[    4.082375] iwlwifi 0000:00:14.3: Failed to start RT ucode: -110
[    4.082437] iwlwifi 0000:00:14.3: Firmware not running - cannot dump error
[    4.094234] iwlwifi 0000:00:14.3: Failed to run INIT ucode: -110

(Full kernel log in an attached file.)

After looking around, I found a few messages (here, here, here) suggesting that this is a regression in 5.4 kernels, but supposedly fixed. The kernel that I was running was 5.4.46 (nixbld@localhost) (gcc version 9.2.0 (GCC)) #1-NixOS SMP Wed Jun 10 18:24:58 UTC 2020.

Since this looks like a recent 5.4 kernel, I thought it would include the fix mentioned above; but just in case, I wanted to try to downgrade to a 5.3 kernel. I couldn't find how to do that, however I saw 5.5 and 5.6 kernels on NixOS, so I added boot.kernelPackages = pkgs.linuxPackages_5_6; in my /etc/nixos/configuration.nix, reconfigured, rebooted, and lo and behold, now the WiFi interface is recognized correctly (and after fiddling with wpa_supplicant, I got it to connect to my network).

I see this directory with configuration for this specific laptop. Would it make sense to add something there to use the 5.6 kernel? Or, since I expect that the "main" kernel will eventually work, should it be a note in the README there instead?

(For what it's worth, when I ordered that laptop, there was no way to get another WiFi interface with it, so I think it's the only WiFi interface that can be installed in it, but I'm not 100% sure either.)

Thank you!

kern.log

lenovo: Improve profile quality

boot = {
kernelModules = [ "tp_smapi" ];
extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ];
};

tp_smapi is not specific to this particular model, but works with ThinkPads in general: http://www.thinkwiki.org/wiki/Tp_smapi#Model-specific_status

# hard disk protection if the laptop falls
services.hdapsd.enable = true;

hdapsd should be used for all laptops that have a hard drive, and any ThinkPad model might use SSD instead of a hard drive since it's not soldered in.

# fingerprint reader: login and unlock with fingerprint (if you add one with `fprintd-enroll`)
#services.fprintd.enable = true;

fprintd is commented out and thus not available if profile is read-only (#29). Fingerprint reader might or might not be available depending on laptop configuration.

boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

Whether to use EFI boot or legacy boot and which bootloader to use should not be coupled with hardware configuration, in my opinion, for all devices except where it's explicitly coupled, like Raspberry Pi.

https://github.com/NixOS/nixos-hardware/blob/440088677b4e6f9527466cbc5b02abf2bf3f863d/lenovo/thinkpad/t410.nix#L35-89

Either POWERTOP or tlp should handle this.

hardware.cpu.intel.updateMicrocode = true;

This should be on for all hardware that uses Intel processors, unless user explicitly opts out.

kernelParams = [
# Kernel GPU Savings Options (NOTE i915 chipset only)
"drm.debug=0"
"drm.vblankoffdelay=1"
"i915.semaphores=1"
"i915.modeset=1"
"i915.use_mmio_flip=1"
"i915.powersave=1"
"i915.enable_ips=1"
"i915.disable_power_well=1"
"i915.enable_hangcheck=1"
"i915.enable_cmd_parser=1"
"i915.fastboot=0"
"i915.enable_ppgtt=1"
"i915.reset=0"
"i915.lvds_use_ssc=0"
"i915.enable_psr=0"
"vblank_mode=0"
"i915.i915_enable_rc6=1"
];

Some options seem to be too aggressive, which goes against README saying that stability should be favored above all else.

{
boot.kernelModules = mkDefault [ "kvm-intel" ];
services.xserver.videoDrivers = [ "intel" ];
}

This should be on for every machine that has a modern Intel processor with integrated GPU.


Larger problem is that ThinkPads don't usually warrant a per-model hardware profile. I still think it is useful to have a per-model hardware profile in case if things have to be fixed later on, but most configuration in these profiles could be just moved to common.nix.

Flakes: also export the common modules?

I have a Lenovo C940 and it's pretty similar to the X1 but still different, and I want to build my own. However, I can't use flakes for that, I can't reach the intel, ssd etc modules.

@Mic92 ?

Generated hardware-configuration.nix files use deprecated attribute

The generated hardware-configuration.nix files still use the now deprecated i18n.consoleFont attribute (it should now be console.font). Because of this you get warnings such as below

trace: warning: The option `i18n.consoleFont' defined in `/etc/nixos/hardware-configuration.nix' has been renamed to `console.font'.

apple/macbook-pro/12-1: won't resume after hibernation

description:
systemctl hibernate -- works fine, though when resuming it fails to get into the system, and the system reboots by itself.

kernel:
Linux mac 5.4.78 #1-NixOS SMP Wed Nov 18 18:20:34 UTC 2020 x86_64 GNU/Linux

using:

  systemd.sleep.extraConfig = ''
    HibernateMode=shutdown
  '';

ram/swap:

free -m
              total        used        free      shared  buff/cache   available
Mem:           7870        1675        4452         507        1742        5397
Swap:          8191           0        8191

using luks encryption:

lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda             8:0    0   113G  0 disk
├─sda1          8:1    0   511M  0 part  /boot
└─sda2          8:2    0 112.5G  0 part
  └─crypted   254:0    0 112.5G  0 crypt
    ├─vg-swap 254:1    0     8G  0 lvm   [SWAP]
    └─vg-root 254:2    0 104.5G  0 lvm   /

General Thinkpad config

First off, I really like the idea behind this repo.

We should abstract a bit more to find good optimizations that work for every thinkpad (or at least a category of them).

e.g. I factored out some in vuizvui:

{ lib, config, pkgs, ... }:

with lib;

let
  cfg = config.vuizvui.hardware.thinkpad;

in
{
  options.vuizvui.hardware.thinkpad = {
    enable = mkEnableOption "thinkpad support";
  };

  config = mkIf cfg.enable {
    # read acpi stats (e.g. battery)
    environment.systemPackages = [ pkgs.acpi ];

    # for wifi
    hardware.enableAllFirmware = true;

    hardware.trackpoint = {
      enable = true;
      emulateWheel = true;
      speed = 250;
      sensitivity = 140;
    };

    # TLP Linux Advanced Power Management
    services.tlp.enable = true;
  };
}

This piece of code also uses the power options give (e.g. I then use vuizvui.hardware.thinkpad.enable in my config). vuizvui is a bit special though, I don’t know if it’s viable to do with a drop-in module. @aszlig could tell us more.

Importing <nixos-hardware/dell/xps/15-9500/nvidia> fails

System: Nixos 20.03

Output when importing this configuration:

building Nix...
building the system configuration...
error: The option `hardware.nvidia.prime' defined in `/nix/var/nix/profiles/per-user/root/channels/nixos-hardware/common/gpu/nvidia.nix' does not exist.
(use '--show-trace' to show detailed location information)

<nixos-hardware/dell/xps/15-9500> works well

Way to automatically detect device and apply correct fixes

Don't know if it's possible but there should be a way to do something like <nixos-hardware/auto-detect> which would automatically include the right config for the device, which could enable including the right config in an automated fashion.

Otherwise a tool that just returns the right path or nothing if no hardware-quirk conf is needed would be cool

Needing this for scripting purposes

Asus FX504GD: Touchpad stop working suddenly

Hello, I've been using NixOS for a week, but I still have a problem: my touchpad seems to stop working from time to time for almost 3 minutes, and I have this problem like 7 times a day and all I can do is wait until he reworks again. I specified services.xserver.libinput.enable = true; in my /etc/nixos/configuration.nix, but I still have the same problem. I'm actually using an Asus FX504GD.
Did anybody encouter this issue and knows how to solve the problem ? I would be glad, thanks.

Thinkpad trackpoint config optimization (plus possible bug?)

I don't have a lot of experience with trackpoints, but coming from a mac I couldn't get the touchpad into a shape where I felt comfortable so I turned it off and rely on the trackpoint entirely.

Optimal configuration
(1) is there a consensus that the default trackpoint config is good? In https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/trackpoint.nix I can see that the default sensitivity is 128 and the default speed is 97. The Lenovo configs in this repo don't configure that.

I found that my finger started to hurt and the trackpoint seems to require a lot of pressure. I'm running libinput 1.9.4. Lots of users online say that the Linux Thinkpad trackpoints are not ideal - see a bunch of threads https://www.reddit.com/r/thinkpad/search?q=trackpoint+linux&restrict_sr=on&include_over_18=on

I bumped mine to 255 for speed and sensitivity in hardware-configuration.nix - but it didn't seem to be noticeable. cat /sys/devices/platform/i8042/serio1/serio2/{speed,sensitivity} showed the same values even after reboot. echo 255 | sudo tee /sys/devices/platform/i8042/serio1/serio2/speed" from the same thread clearly increased the speed, but did not persist on reboot. Is anyone else seeing this bug, or is it user error? I confirmed that the proper value was set with nixos-option hardware.trackpoint.speed.

In a thread from last week https://www.reddit.com/r/thinkpad/comments/8ea9eh/how_to_make_touchpad_and_trackpoint_work_nicely/ people suggest libinput 1.10.0 so I added the unstable nixos channel and just tried it (using nixos-rebuild test). Don't notice much different so far.

Other problems - hardware, worn out rubber, skill, expectations
Aside from configuration, I imagine that thinkpads have varying trackpoint hardware? Possibly different ideal sensitivities apply.

I'm hoping that I'll just get better with a trackpoint over time and it will be less painful.

I'm using a slightly worn trackpoint so I have fresh ones on the way https://www.amazon.com/gp/product/B072PQ7NT3/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

Anyone out there super-happy with their trackpoints speed / sensitivity?

Other workarounds: I end up relying even more heavily on vimium in chromium and vim mode in editors since scrolling is so painful.

Metadata

It would be nice to have information included in the modules such as

  • The problems solved, and their symptoms
  • Maintainers
  • Which models are known to be covered

undefined variable

When I try to add Thinkpad T410 to my config i get the error: error: undefined variable ‘mkDefault’ at /nix/var/nix/profiles/per-user/root/channels/nixos-hardware/lenovo/thinkpad/intel.nix:2:24

I see that the variable is defined in the file common.nix but it doesn't look like this file is included in the profile or in intel.nix that uses the variable.

XPS 13 (9370): Additional i915 flags to set?

Please note, I don't have hard data for any of this, I can't say if these things are guaranteed improvements -- its more that I trust the Arch Wiki's XPS13 page and have been running these settings for sometime.

In my kernel params, I have some extras that aren't included via the xps-13-9370 file in this repository.

        "i915.modeset=1"       # entirely absent in nixos-hardware
        "i915.enable_guc=2" # entirely absent in nixos-hardware
        "i915.enable_gvt=1" # entirely absent in nixos-hardware
        "i915.enable_psr=1" # entirely absent in nixos-hardware
        "i915.fastboot=1"     # entirely absent in nixos-hardware

        "i915.enable_fbc=1" # set to 2 in nixos-hardware

I think I checked everywhere those could be getting set, but I could be incorrect about all of those being missing.

Thoughts from other XPS 13 users?

Listing derivations (nix-env -qa) does not work

When I try to list available packages with nix-env -qaP the evaluation breaks in nixos-hardware/default.nix and I don't know what's wrong. The following logs are taken as root but it behaves the same with an unprivileged user.

nix-env -qaP --show-trace

[root@tsundoku:/home/zarel]# nix-env -qaP --show-trace
error: while evaluating 'buildProfile' at /nix/store/rkb722vhq7xkhid0nbnl55i2r59csd77-nixos-hardware/nixos-hardware/default.nix:18:18, called from /nix/store/rkb722vhq7xkhid0nbnl55i2r59csd77-nixos-hardware/nixos-hardware/default.nix:51:20:
while evaluating the attribute 'system' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/default.nix:33:3:
while evaluating the attribute 'config.system.build.toplevel' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:273:5:
while evaluating 'foldr' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:39:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:137:12:
while evaluating 'fold'' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:42:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:46:8:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:137:52, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:45:14:
while evaluating anonymous function at /nix/store/vs30cml2ma72nd6vavfzc7ljrqw3p356-nixos-18.09.1819.76aafbf4bf4/nixos/pkgs/build-support/replace-dependency.nix:20:1, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:138:7:
cannot import '/nix/store/parl2dsdfc22mzdqcfi9ic60r9cgp4k4-references.nix', since path '/nix/store/k0my68piibb4180drdqcpvxnla2fd76w-references.nix.drv' is not valid, at /nix/store/vs30cml2ma72nd6vavfzc7ljrqw3p356-nixos-18.09.1819.76aafbf4bf4/nixos/pkgs/build-support/replace-dependency.nix:26:16

nix-info

[root@tsundoku:/home/zarel]# nix-info
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.1.3, channels(root): "nixos-hardware, nixos-18.09.1819.76aafbf4bf4", channels(zarel): "nixpkgs-19.03pre161900.61c3169a0e1", nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

nix-channel --list

[root@tsundoku:/home/zarel]# nix-channel --list
nixos https://nixos.org/channels/nixos-18.09
nixos-hardware https://github.com/NixOS/nixos-hardware/archive/master.tar.gz

The nixos-rebuild operations work as expected.

NixOS on Thinkpad T480s seeing only one battery

I have included the hardware setup for T480s in my config like so:

    <nixos-hardware/lenovo/thinkpad/t480s>

But when I check using acpi I can see only one battery:

 > acpi
Battery 0: Discharging, 77%, 02:04:23 remaining

Same goes for the sys filesystem:

 > ls /sys/class/power_supply/   
AC  BAT0

But the device clearly has two:

The ThinkPad T480 comes standard with built-in Power Bridge technology. This innovation is the answer to 'low battery' warnings, especially if you are on the road or without a nearby power outlet. It allows you to swap out a battery and replace it with a fully charged one—without having to turn your machine off.

I also know because both were visible on Debian.

Support for the Lenovo X1 Extreme

Hi there

I've been using the Lenovo X1 Extreme with NixOS and ran into a lot of problems regarding the hardware support.
Especially the hybrid graphics (Intel and Nvidia) including the HDMI outlet and the webcam don't seem to be working.

The ArchLinux people seem to have figured out most of the problems:
https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Extreme

I would love to continue using NixOS on this device.
Are there any plans to extend this overlay for the X1 Extreme?

Thanks a million

dell xps: consider enabling AC power supply "fix"

I'm not fully sure of all of the implications, but the last cause of problems with CPU scaling on my XPS 13 9370 was tracked down to weird combinations of my USB Type C Hub and various Type C power supplies that I have around.

Using msr-tools and executing sudo wrmsr -a 0x1FC 2 "fixes" this problem.

I don't fully understand the implications of this, so I'm not going to send a PR right away, but I thought I'd offer it for consideration (and as a potential warning to others in the future).

Also, in the interest of potentially helping other XPS users, the Nov 2018 firmware update has been a big improvement to performance and consistency.

Dell XPS 13 7390 Settings - Frequently freezing screen

Hi there,

cc @Alecktos @Mic92 as you seem to have this laptop model, too (deducing that from your collaboration on this file https://github.com/NixOS/nixos-hardware/blob/master/dell/xps/13-7390/default.nix)

I have frequent screen freezes in pretty random situations/frequency. (Yesterday with a specific USB c hub it was a freezing screen roughly every minute for 1 second).
After going through some forums and finding experiences/fixes of other users, i got this fixed by setting:

boot.kernelParams = [
  "intel_idle.max_cstate=1"
  "i915.enable_dc=0"
];

With this setting the freezing is gone and the whole laptop feels much more responsive.

Is that something that other 7390 users experienced (on linux / NixOS), too, or is my experience here completely odd?
If it's not just me i'd open a pull request on that file adding this setting.

Source channel declaratively?

I'd like to get up and running on a new system without remembering to add the channel beforehand. Is there a way to do this with, for example an overlay?

Dell XPS 13 is now throttled to 95C instead of 97C

I think this is related to move to "throttled" to fix the intel throttling issue on various laptops.

While trying to use undervolt last night, I realized that something is still overriding the temperature target. Watch:

[cole@xeep:~/code/nixcfg]$ sudo undervolt --temp 97

[cole@xeep:~/code/nixcfg]$ sudo undervolt --read
temperature target: -3 (97C)
core: -99.61 mV
gpu: -75.2 mV
cache: -99.61 mV
uncore: -99.61 mV
analogio: -99.61 mV

# wait a second

[cole@xeep:~/code/nixcfg]$ sudo undervolt --read
temperature target: -5 (95C)
core: -99.61 mV
gpu: -75.2 mV
cache: -99.61 mV
uncore: -99.61 mV
analogio: -99.61 mV

And yet:

● lenovo_fix.service - Stop Intel throttling
   Loaded: loaded (/nix/store/ra5wj7nzkgyxgj5w22fbdjnyxscs9a3w-throttled-0.6/lib/systemd/system/lenovo_fix.service; enabled; vendor preset: enabled)
  Drop-In: /nix/store/ys52kwpvs7b3psrllinzlk0axrckhcs7-system-units/lenovo_fix.service.d
           └─overrides.conf
   Active: active (running) since Thu 2019-11-21 04:06:59 PST; 11h ago
 Main PID: 910 (.lenovo_fix.py-)
       IP: 0B in, 0B out
    Tasks: 2
   Memory: 34.5M
      CPU: 3.425s
   CGroup: /system.slice/lenovo_fix.service
           └─910 /nix/store/gpnm7i19lpj8p43mjrdw03d0hjalmskl-python3-3.7.5/bin/python3.7 /nix/store/ra5wj7nzkgyxgj5w22fbdjnyxscs9a3w-throttled-0.6/bin/.lenovo_fix.py-wrapped

Nov 21 04:06:59 xeep systemd[1]: Started Stop Intel throttling.
Nov 21 04:06:59 xeep lenovo_fix.py[910]: [I] Detected CPU architecture: Intel Kaby Lake (R)
Nov 21 04:06:59 xeep lenovo_fix.py[910]: [I] Loading config file.
Nov 21 04:06:59 xeep lenovo_fix.py[910]: [I] Starting main loop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.