From 0c5f6c91ea6b1c03a8eb4fd23a68655a1f2c8de5 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 22 Jan 2021 00:21:27 +0100 Subject: Update acpi_override --- machines/asus/acpi_override | Bin 113664 -> 113664 bytes machines/asus/configuration.nix | 12 ++++++++++-- machines/asus/hardware-configuration.nix | 27 ++++++++++++++++++++++----- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/machines/asus/acpi_override b/machines/asus/acpi_override index 19d39ae..dcb1124 100755 Binary files a/machines/asus/acpi_override and b/machines/asus/acpi_override differ diff --git a/machines/asus/configuration.nix b/machines/asus/configuration.nix index 444f9f0..a64f9d2 100755 --- a/machines/asus/configuration.nix +++ b/machines/asus/configuration.nix @@ -1,5 +1,12 @@ { config, pkgs, ... }: - +let + screen-orient = pkgs.writeScriptBin "screen-orient" '' + #!${pkgs.stdenv.shell} + xrandr --output DSI1 --primary --mode 800x1280 --pos 0x0 --rotate left --output DP1 --off --output HDMI1 --off + +xinput set-prop "SIS0457:00 0457:113D" "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1 + ''; +in { imports = [ @@ -21,6 +28,7 @@ environment.systemPackages = with pkgs; [ libimobiledevice + screen-orient ]; services.usbmuxd.enable = true; @@ -33,7 +41,7 @@ services.xserver = { videoDrivers = [ "intel" ]; deviceSection = '' - Option "Backlight" "intel_backlight" + Option "Backlight" "intel_backlight" Option "DIR" "2" Option "TearFree" "true" ''; diff --git a/machines/asus/hardware-configuration.nix b/machines/asus/hardware-configuration.nix index ef6aaa7..180bfdc 100644 --- a/machines/asus/hardware-configuration.nix +++ b/machines/asus/hardware-configuration.nix @@ -10,14 +10,31 @@ boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_acpi" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ "kvm-intel" "brcmfmac" ]; boot.extraModulePackages = [ ]; - boot.initrd.prepend = [ "${./acpi_override}" ]; + boot.kernelParams = [ "intel_idle.max_cstate=1" ]; - boot.loader.grub = { - efiSupport = true; - device = "nodev"; + boot.initrd.prepend = [ "${./acpi_override}" ]; + boot.kernelPatches = [ + { + name = "acpi_upgrade"; + patch = null; + extraConfig = '' + ACPI_TABLE_UPGRADE y + ''; + } + ]; + + boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; + grub = { + efiSupport = true; + device = "nodev"; + }; }; fileSystems."/" = lib.mkForce -- cgit 1.4.1