diff --git a/config/automatrop/host_vars/curacao.geoffrey.frogeye.fr b/config/automatrop/host_vars/curacao.geoffrey.frogeye.fr index 4b2fadf..36cbfec 100644 --- a/config/automatrop/host_vars/curacao.geoffrey.frogeye.fr +++ b/config/automatrop/host_vars/curacao.geoffrey.frogeye.fr @@ -15,10 +15,13 @@ extensions: - g - gh x11_screens: -# nvidia +# nvidia-xrun # - HDMI-0 # - eDP-1-1 -# nouveau - - HDMI-1-3 +# mesa + nouveau + # - HDMI-1-3 + # - eDP1 +# mesa + nvidia + - HDMI-1-0 - eDP1 max_video_height: 1440 diff --git a/config/automatrop/roles/system/files/xorg/intel_backlight.conf b/config/automatrop/roles/system/files/xorg/intel_backlight.conf index fa7796b..6b68693 100644 --- a/config/automatrop/roles/system/files/xorg/intel_backlight.conf +++ b/config/automatrop/roles/system/files/xorg/intel_backlight.conf @@ -1,5 +1,5 @@ Section "Device" - Identifier "Intel Graphics" + Identifier "intel" Driver "intel" Option "Backlight" "intel_backlight" EndSection diff --git a/config/scripts/nv b/config/scripts/nv new file mode 100755 index 0000000..e576154 --- /dev/null +++ b/config/scripts/nv @@ -0,0 +1,83 @@ +#!/usr/bin/env bash + +# Extracted frm nvidia-xrun +DRY_RUN=0 + +function execute { + if [[ ${DRY_RUN} -eq 1 ]] + then + echo ">>Dry run. Command: $*" + else + eval $* + fi +} + + +function turn_off_gpu { + if [[ "$REMOVE_DEVICE" == '1' ]]; then + echo 'Removing Nvidia bus from the kernel' + execute "sudo tee /sys/bus/pci/devices/${DEVICE_BUS_ID}/remove <<<1" + else + echo 'Enabling powersave for the graphic card' + execute "sudo tee /sys/bus/pci/devices/${DEVICE_BUS_ID}/power/control <<