summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-07-12 02:22:32 +0200
committerAhmed Abdelhalim <[email protected]>2026-07-12 02:22:32 +0200
commit58bc35f4d7ae8be5327fbda24dd3db240c804f99 (patch)
tree78361bdf1c3985b10bbc6eea31ec3d00cb6a03fb /roles
parent333705edb12ea598e62eca28cd9ef8ae7ab9609f (diff)
Fix nvidia driver on desktop
The nvidia_gtx1060 role rebuilds the initramfs via mkinitcpio but never synced the result to the ESP that rEFInd actually boots from. The sync only happens automatically via a pacman hook on `linux` package upgrades, so a manual mkinitcpio rebuild (e.g. after changing this role's modprobe.d config) left rEFInd booting a stale initramfs - nouveau kept winning the race for the GPU until the next kernel upgrade happened to trigger the hook. Co-Authored-By: Claude.ai
Diffstat (limited to 'roles')
-rw-r--r--roles/nvidia_gtx1060/handlers/main.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/nvidia_gtx1060/handlers/main.yml b/roles/nvidia_gtx1060/handlers/main.yml
index 67408c79..7307a4b0 100644
--- a/roles/nvidia_gtx1060/handlers/main.yml
+++ b/roles/nvidia_gtx1060/handlers/main.yml
@@ -4,3 +4,15 @@
ansible.builtin.command:
cmd: "mkinitcpio -P"
changed_when: true
+ notify: "Sync kernel to EFI partition"
+
+- name: "Sync kernel to EFI partition"
+ # This desktop dual-boots via rEFInd, reading the kernel/initramfs straight from the ESP
+ # (see ansible-distro-install roles/bootstrap). Its pacman hook only re-syncs the ESP
+ # on `linux` package upgrades, not on a manual mkinitcpio rebuild like this one, so
+ # skipping this step leaves rEFInd booting a stale initramfs (e.g. missing this role's
+ # nouveau blacklist) until the next kernel upgrade happens to trigger the hook.
+ become: true
+ ansible.builtin.command:
+ cmd: "/usr/local/bin/refind-sync-kernel"
+ changed_when: true