mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-09 16:16:21 +01:00
Compare commits
6 commits
69039ee727
...
fa4b758050
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa4b758050 | ||
|
|
52113c4f5c | ||
|
|
fc4c7c6ec7 | ||
|
|
744975050f | ||
|
|
427956eeb5 | ||
|
|
4771157250 |
|
|
@ -15,7 +15,7 @@
|
|||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usb-storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"usb-storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -19,21 +19,78 @@
|
|||
config.boot.kernelPackages.nvidia_x11
|
||||
];
|
||||
|
||||
# Comprehensive audio fixes for Legion Pro 7 16IRX8H
|
||||
# This model has both Realtek ALC287 and TAS2781 audio components
|
||||
# The TAS2781 I2C codec binds to the HDA subsystem and requires special handling
|
||||
boot.kernelParams = [
|
||||
# Audio configuration
|
||||
"snd_hda_intel.enable_msi=1"
|
||||
# Legion-specific audio model (required until kernel quirk is upstreamed)
|
||||
"snd_hda_intel.model=lenovo-legion-7i"
|
||||
# TAS2781 calibration reset to handle CRC errors in factory calibration data
|
||||
# This is a known issue on Legion laptops where the TAS2781 firmware has corrupted
|
||||
# calibration values; resetting allows the codec to initialize with defaults
|
||||
"snd_soc_tas2781.reset_calib=1"
|
||||
# More aggressive TAS2781 fixes for Legion
|
||||
"snd_soc_tas2781.tas2781_dev_id=0x6a"
|
||||
"snd_hda_intel.single_cmd=1"
|
||||
# Hardware fixes
|
||||
"tsc=reliable" # Fix TSC ADJUST firmware bugs common on Legion laptops
|
||||
# ACPI thermal management fixes for Legion BIOS issues
|
||||
"acpi.debug_layer=0x2"
|
||||
"acpi.debug_level=0x2"
|
||||
"processor.ignore_ppc=1"
|
||||
];
|
||||
|
||||
# Additional audio configuration for Legion Pro 7
|
||||
boot.extraModprobeConfig = ''
|
||||
# Force specific Legion audio model for proper speaker routing
|
||||
options snd-hda-intel model=lenovo-legion-7i single_cmd=1 probe_mask=1
|
||||
# TAS2781 specific options
|
||||
options snd-soc-tas2781-comlib reset_calib=1
|
||||
options snd-hda-scodec-tas2781-i2c reset_calib=1
|
||||
'';
|
||||
|
||||
# Hardware firmware support for Legion audio
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
|
||||
# Enable Bluetooth modules
|
||||
boot.kernelModules = [
|
||||
"bluetooth"
|
||||
"btusb"
|
||||
];
|
||||
|
||||
hardware = {
|
||||
nvidia = {
|
||||
modesetting.enable = lib.mkDefault true;
|
||||
powerManagement.enable = lib.mkDefault true;
|
||||
#
|
||||
prime = {
|
||||
intelBusId = "PCI:00:02:0";
|
||||
nvidiaBusId = "PCI:01:00:0";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable Bluetooth with Legion-optimized settings
|
||||
bluetooth = {
|
||||
enable = lib.mkDefault true;
|
||||
powerOnBoot = lib.mkDefault false; # Save battery
|
||||
settings = {
|
||||
General = {
|
||||
ControllerMode = "dual";
|
||||
FastConnectable = "true";
|
||||
Experimental = "true"; # Enable LE Audio features
|
||||
KernelExperimental = "true"; # Enable ISO socket support
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Cooling management
|
||||
# Cooling management for Legion laptops
|
||||
services.thermald.enable = lib.mkDefault true;
|
||||
|
||||
# Audio group permissions
|
||||
users.groups.audio = { };
|
||||
|
||||
# √(2560² + 1600²) px / 16 in ≃ 189 dpi
|
||||
services.xserver.dpi = 189;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ lib.mkIf config.hardware.librem5.customInitrdModules {
|
|||
"tps6598x"
|
||||
"xhci_hcd"
|
||||
"usbcore"
|
||||
"usb_storage"
|
||||
"usb-storage"
|
||||
"uas"
|
||||
"xhci_plat_hcd"
|
||||
];
|
||||
|
|
@ -56,7 +56,7 @@ lib.mkIf config.hardware.librem5.customInitrdModules {
|
|||
"tps6598x"
|
||||
"xhci_hcd"
|
||||
"usbcore"
|
||||
"usb_storage"
|
||||
"usb-storage"
|
||||
"uas"
|
||||
"xhci_plat_hcd"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3;
|
||||
initrd.availableKernelModules = [
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"usb-storage"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@
|
|||
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"usb-storage"
|
||||
"vc4"
|
||||
"pcie_brcmstb" # required for the pcie bus to work
|
||||
"pcie-brcmstb" # required for the pcie bus to work
|
||||
"reset-raspberrypi" # required for vl805 firmware to load
|
||||
]
|
||||
++ lib.optional config.boot.initrd.network.enable "genet";
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ in
|
|||
initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"usb-storage"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue