mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Simplify
This commit is contained in:
@@ -1,22 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Use the Vfio to Integrated trick to put turn off NVIDIA dgpu when in integrated mode
|
# Use the Vfio to Integrated trick to turn off NVIDIA dgpu when in integrated mode
|
||||||
# without needing to restart the computer. This is needed because computers like the Asus G14
|
# without needing to restart the computer. This is needed because computers like the Asus G14
|
||||||
# will wake after suspend in Hybrid mode, even if the system was in Integrated mode before
|
# will wake after suspend in Hybrid mode, even if the system was in Integrated mode before
|
||||||
# suspending.
|
# suspending.
|
||||||
|
|
||||||
case "$1" in
|
if [[ $1 == "post" ]]; then
|
||||||
post)
|
# small delay so the device is fully re-enumerated
|
||||||
# small delay so the device is fully re-enumerated
|
sleep 4
|
||||||
sleep 4
|
|
||||||
|
|
||||||
# force-bind dGPU to vfio (fully detached from nvidia)
|
# force-bind dGPU to vfio (fully detached from nvidia)
|
||||||
/usr/bin/supergfxctl -m Vfio
|
/usr/bin/supergfxctl -m Vfio
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# then go back to Integrated, which powers it off again
|
# then go back to Integrated, which powers it off again
|
||||||
/usr/bin/supergfxctl -m Integrated
|
/usr/bin/supergfxctl -m Integrated
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|||||||
Reference in New Issue
Block a user