✅ Enable mgag200 properly
1. Edit GRUB
vi /etc/default/grub
Find the line:
GRUB_CMDLINE_LINUX=""
Replace it with:
GRUB_CMDLINE_LINUX="video=mgag200.modeset=1"
2. Update GRUB
update-grub
3. Reboot
4. Check that mgag200 is loaded
lsmod | grep mgag200
Expected output should show the driver loaded, something like:
mgag200 73728 1
i2c_algo_bit 16384 2 mgag200,nouveau
5. Check Xorg is using modesetting
grep -i driver /var/lib/gdm3/.local/share/xorg/Xorg.0.log
You should see the following in one of the lines:
(II) modesetting: Driver for Modesetting Kernel Drivers: kms
✅ Set Up Watchdog
This will automatically restart GDM if a black screen occurs.
Step 1 — Create the watchdog script
tee /usr/local/bin/mgag200-watchdog.sh >/dev/null <<'EOF'
#!/bin/bash
# mgag200-watchdog.sh
# Lightweight watchdog for Matrox G200eW3 GPU
LOG_FILE="/var/lib/gdm3/.local/share/xorg/Xorg.0.log"
DM="gdm3"
# How old (seconds) Xorg log can be before we consider it hung
MAX_AGE=60
# Check if any user is logged in on console
if who | grep -q "(:0)"; then
exit 0
fi
# Check if Xorg log exists
if [ ! -f "$LOG_FILE" ]; then
exit 0
fi
# Time since last modification
AGE=$(( $(date +%s) - $(stat -c %Y "$LOG_FILE") ))
if [ "$AGE" -gt "$MAX_AGE" ]; then
echo "$(date) - mgag200-watchdog: Xorg log idle for $AGE s, restarting $DM" >> /var/log/mgag200-watchdog.log
systemctl restart "$DM"
fi
EOF
Make it executable:
chmod +x /usr/local/bin/mgag200-watchdog.sh
Step 2 — Create a systemd service
tee /etc/systemd/system/mgag200-watchdog.service >/dev/null <<'EOF'
[Unit]
Description=Watchdog for Matrox G200eW3 GPU
[Service]
Type=oneshot
ExecStart=/usr/local/bin/mgag200-watchdog.sh
EOF
Step 3 — Create a systemd timer
tee /etc/systemd/system/mgag200-watchdog.timer >/dev/null <<'EOF'
[Unit]
Description=Run mgag200 GPU watchdog every 10 seconds
[Timer]
OnBootSec=10s
OnUnitActiveSec=10s
AccuracySec=2s
Unit=mgag200-watchdog.service
[Install]
WantedBy=timers.target
EOF
Step 4 — Enable and start the timer
systemctl daemon-reload
systemctl enable --now mgag200-watchdog.timer
Check status of the timer:
systemctl status mgag200-watchdog.timer