mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Prevent race condition
This commit is contained in:
@@ -24,6 +24,9 @@ case "$gpu_mode" in
|
|||||||
# Let hybrid mode be the default after system sleep
|
# Let hybrid mode be the default after system sleep
|
||||||
sudo rm -rf /usr/lib/systemd/system-sleep/force-igpu
|
sudo rm -rf /usr/lib/systemd/system-sleep/force-igpu
|
||||||
|
|
||||||
|
# Remove the startup delay override (not needed for Hybrid mode)
|
||||||
|
sudo rm -rf /etc/systemd/system/supergfxd.service.d/delay-start.conf
|
||||||
|
|
||||||
omarchy-cmd-reboot
|
omarchy-cmd-reboot
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@@ -36,9 +39,12 @@ case "$gpu_mode" in
|
|||||||
sudo mkdir -p /usr/lib/systemd/system-sleep
|
sudo mkdir -p /usr/lib/systemd/system-sleep
|
||||||
sudo cp -p $OMARCHY_PATH/default/systemd/system-sleep/force-igpu /usr/lib/systemd/system-sleep/
|
sudo cp -p $OMARCHY_PATH/default/systemd/system-sleep/force-igpu /usr/lib/systemd/system-sleep/
|
||||||
|
|
||||||
echo "Disabling dedicated GPU..."
|
# Delay supergfxd startup to avoid race condition with display manager
|
||||||
supergfxctl -m Vfio
|
# that can cause system freeze when booting in Integrated mode
|
||||||
supergfxctl -m Integrated
|
sudo mkdir -p /etc/systemd/system/supergfxd.service.d
|
||||||
|
sudo cp -p $OMARCHY_PATH/default/systemd/system/supergfxd.service.d/delay-start.conf /etc/systemd/system/supergfxd.service.d/
|
||||||
|
|
||||||
|
omarchy-cmd-reboot
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[Service]
|
||||||
|
# Delay startup to avoid race condition with display manager initialization
|
||||||
|
# when booting in Integrated mode. Without this delay, the system can freeze
|
||||||
|
# on boot because supergfxd tries to disable the dGPU while the display
|
||||||
|
# subsystem is still initializing.
|
||||||
|
ExecStartPre=/bin/sleep 5
|
||||||
Reference in New Issue
Block a user