Skip to content
Snippets Groups Projects
Verified Commit c75e917c authored by Xenhat Hex's avatar Xenhat Hex
Browse files

Add check for switcheroo functionality when multiple GPUs are detected

Some Linux distributions do not enable switcheroo-control by default, despite it being part of most system installations these days.
This implements a simple check to warn the user of degraded functionality if switcherooctl exists but returns no GPU list (as is the case when the service doesn't run).

For more information, see https://man.archlinux.org/man/switcherooctl.1.en
parent 53412bcf
No related branches found
No related tags found
1 merge request!4Add check for switcheroo functionality when multiple GPUs are detected
......@@ -107,6 +107,11 @@ else
echo "Please install wine to enable full voice functionality."
fi
# Check if switcheroo is needed
if [[ -d /sys/class/drm/card1 ]] && command -v switcherooctl >/dev/null 2>&1 && [[ "$(switcherooctl)" == "" ]]; then
notify-send "Automatic GPU selection is not available" "Please enable switcheroo-control.service"
fi
# Run the program.
# Don't quote $LL_WRAPPER because, if empty, it should simply vanish from the
# command line. But DO quote "${ARGS[@]}": preserve separate args as
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment