···11+#!/bin/bash
22+# Quick GPU health check - run before meetings to verify GPU state
33+44+RED='\033[0;31m'
55+GREEN='\033[0;32m'
66+YELLOW='\033[0;33m'
77+NC='\033[0m'
88+99+echo "GPU Health Check"
1010+echo "================"
1111+1212+# Check for critical GPU errors in current boot
1313+errors=$(journalctl -b -k 2>/dev/null | grep -E "(VPE.*(fail|reset)|IB.*(fail|test failed)|MES.*fail|amdgpu.*(reset|hang|error))" | grep -v "collaborate mode")
1414+1515+if [ -z "$errors" ]; then
1616+ echo -e "${GREEN}[OK]${NC} No GPU errors in current boot"
1717+else
1818+ echo -e "${RED}[WARN]${NC} GPU errors detected:"
1919+ echo "$errors" | head -5
2020+ echo -e "${YELLOW}Recommendation: Reboot before your meeting${NC}"
2121+fi
2222+2323+# Check GPU is responding
2424+if busy=$(cat /sys/class/drm/card*/device/gpu_busy_percent 2>/dev/null | head -1); then
2525+ echo -e "${GREEN}[OK]${NC} GPU responding (${busy}% busy)"
2626+else
2727+ echo -e "${RED}[FAIL]${NC} Cannot read GPU status"
2828+fi
2929+3030+# Check VRAM
3131+if vram=$(cat /sys/class/drm/card*/device/mem_info_vram_used 2>/dev/null | head -1); then
3232+ vram_mb=$((vram / 1024 / 1024))
3333+ echo -e "${GREEN}[OK]${NC} VRAM in use: ${vram_mb}MB"
3434+else
3535+ echo -e "${YELLOW}[SKIP]${NC} VRAM info not available"
3636+fi
3737+3838+# Summary
3939+echo ""
4040+if [ -z "$errors" ]; then
4141+ echo -e "${GREEN}GPU is healthy - safe to start meeting${NC}"
4242+else
4343+ echo -e "${RED}GPU may be unstable - consider rebooting${NC}"
4444+fi
+2
zsh/.dotfiles/zsh/aliases.shrc
···126126alias mscreener="~/.config/mutt/initial_screening.sh >> ~/.config/mutt/logs/screening.log 2>&1"
127127alias msync="offlineimap -a sspaeti.com"
128128129129+# Omarchy / hyprland
130130+alias gpu-check="~/.config/hypr/sspaeti/gpu-health-check"
129131130132# use open as on macOs to open pdf, videos, images, and directories (send output to dev and start in background for file manager (nautilus))
131133open() { xdg-open "$@" &>/dev/null & }