u/GoldLegoBoi

▲ 21 r/omarchy

GPU switching UI with Dgpu Only support for Laptop [Experimental]

I noticed the Hybrid GPU menu in the hardware options is a bit lacking, and it only supports 3 modes being Integrated, Hybrid and VFIO, but no support for so i made my own with a front end that works on wofi - It also grabs the GTK CSS from omarchy so it also matches your theme.

https://github.com/goldlego/omarchy-gpu-menu

it is highly experimental, but it should work out of the box

u/GoldLegoBoi — 7 days ago

Question on Hybrid GPU toggle

Asking out of curiosity

Why does thy hybrid gpu option do all this:

```bash

gpu_mode=$(supergfxctl -g)

case "$gpu_mode" in

"Integrated")

if gum confirm "Enable dedicated GPU and reboot?"; then

# Switch to hybrid mode

sudo sed -i "s/\"mode\": \".*\"/\"mode\": \"Hybrid\"/" /etc/supergfxd.conf

# Let hybrid mode be the default after system sleep

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-system-reboot

fi

;;

"Hybrid")

if gum confirm "Use only integrated GPU and reboot?"; then

# Switch to integrated mode and ensure vfio is enabled (needed for sleep/wake trick)

sudo sed -i "s/\"mode\": \".*\"/\"mode\": \"Integrated\"/" /etc/supergfxd.conf

sudo sed -i 's/"vfio_enable": false/"vfio_enable": true/' /etc/supergfxd.conf

# Force igpu mode after system sleep (or dgpu could get activated)

sudo mkdir -p /usr/lib/systemd/system-sleep

sudo cp -p $OMARCHY_PATH/default/systemd/system-sleep/force-igpu /usr/lib/systemd/system-sleep/

# Delay supergfxd startup to avoid race condition with display manager

# that can cause system freeze when booting in Integrated mode

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-system-reboot

fi

;;

*)

```

instead of simply doing this:

```bash

gpu_mode=$(supergfxctl -g)

case "$gpu_mode" in

"Integrated")

if gum confirm "Enable dedicated GPU and reboot?"; then

# Switch to hybrid mode

sudo supergfxctl -m "Hybrid"

# Let hybrid mode be the default after system sleep

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-system-reboot

fi

;;

"Hybrid")

if gum confirm "Use only integrated GPU and reboot?"; then

# Switch to integrated mode and ensure vfio is enabled (needed for sleep/wake trick)

sudo supergfxctl -m "Integrated"

# Force igpu mode after system sleep (or dgpu could get activated)

sudo mkdir -p /usr/lib/systemd/system-sleep

sudo cp -p $OMARCHY_PATH/default/systemd/system-sleep/force-igpu /usr/lib/systemd/system-sleep/

# Delay supergfxd startup to avoid race condition with display manager

# that can cause system freeze when booting in Integrated mode

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-system-reboot

fi

;;

*)

```

also, why does the OS also do all of the stuff after the supergfxd.conf edits?

reddit.com
u/GoldLegoBoi — 9 days ago