Display/GPU Troubleshooting

Quick Reference

# Display info
xrandr                       # X11 outputs
wlr-randr                    # Wayland (wlroots)
hyprctl monitors             # Hyprland

# GPU info
lspci -v | grep -i vga
glxinfo | head -20
vulkaninfo --summary

# Driver info
lsmod | grep -E "nvidia|amdgpu|i915|nouveau"
cat /proc/driver/nvidia/version

# Logs
journalctl -b | grep -i "gpu\|drm\|nvidia\|amd"
dmesg | grep -i "drm\|gpu"
cat /var/log/Xorg.0.log

GPU Detection and Information

Identify GPU Hardware

# List GPU devices
lspci | grep -i vga
lspci | grep -i 3d
lspci -v -s $(lspci | grep -i vga | cut -d' ' -f1)

# Detailed info
lspci -vnn | grep -A 20 VGA

# Using glxinfo (requires mesa-utils)
glxinfo | head -30
glxinfo | grep "OpenGL renderer"
glxinfo | grep "OpenGL version"

# Vulkan info
vulkaninfo --summary
vulkaninfo | grep "GPU"

# DRM devices
ls -la /dev/dri/
cat /sys/class/drm/card0/device/vendor
cat /sys/class/drm/card0/device/device

Check Driver Status

# Loaded kernel modules
lsmod | grep -E "nvidia|amdgpu|radeon|i915|nouveau"

# Current driver in use
lspci -k | grep -A 3 VGA

# Check kernel messages
dmesg | grep -i "drm\|gpu\|nvidia\|amdgpu\|i915"

# Module info
modinfo nvidia
modinfo amdgpu
modinfo i915

NVIDIA Troubleshooting

Check NVIDIA Driver

# Driver version
nvidia-smi
cat /proc/driver/nvidia/version

# NVIDIA settings
nvidia-settings

# GPU info
nvidia-smi -q
nvidia-smi --query-gpu=name,driver_version,memory.total --format=csv

# Check kernel module
lsmod | grep nvidia
modinfo nvidia | head

# X11 configuration
cat /etc/X11/xorg.conf.d/*nvidia*

NVIDIA Driver Installation

# Arch Linux
pacman -S nvidia nvidia-utils nvidia-settings
# For older GPUs: nvidia-470xx-dkms

# Check for nouveau (open source)
lsmod | grep nouveau

# Blacklist nouveau if using proprietary
# /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0

# Regenerate initramfs
# Arch
mkinitcpio -P
# Debian/Ubuntu
update-initramfs -u
# Fedora
dracut --force

NVIDIA Wayland Support

# Required kernel parameters (GRUB)
# /etc/default/grub
GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1"

# Update GRUB
grub-mkconfig -o /boot/grub/grub.cfg

# Environment variables for Wayland
# ~/.config/hypr/hyprland.conf or shell profile
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1

# Check DRM modeset
cat /sys/module/nvidia_drm/parameters/modeset
# Should show: Y

NVIDIA Common Issues

# Screen tearing (X11)
# /etc/X11/xorg.conf.d/20-nvidia.conf
Section "Device"
    Identifier "Nvidia Card"
    Driver "nvidia"
    Option "NoLogo" "true"
    Option "TripleBuffer" "true"
EndSection

Section "Screen"
    Identifier "Default Screen"
    Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
EndSection

# Or via nvidia-settings
nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

# Black screen after update
# Boot with nomodeset
# Then reinstall driver
pacman -S nvidia nvidia-utils

# Check Xorg log
cat /var/log/Xorg.0.log | grep -E "EE|WW"

AMD GPU Troubleshooting

Check AMD Driver

# AMDGPU driver (open source)
lsmod | grep amdgpu

# GPU info
cat /sys/class/drm/card0/device/gpu_busy_percent
cat /sys/class/drm/card0/device/power_dpm_state
cat /sys/kernel/debug/dri/0/amdgpu_pm_info

# Vulkan (RADV)
vulkaninfo | grep -i radv
echo $AMD_VULKAN_ICD   # Should be RADV for open source

# Check OpenGL
glxinfo | grep "OpenGL renderer"

AMD Driver Installation

# Arch Linux (open source - recommended)
pacman -S mesa vulkan-radeon libva-mesa-driver

# For AMDGPU PRO (proprietary)
# Download from AMD website
# Usually not needed for most users

# Enable AMDGPU for older GCN cards
# /etc/modprobe.d/amdgpu.conf
options amdgpu si_support=1
options amdgpu cik_support=1

# Blacklist radeon for older cards using AMDGPU
# /etc/modprobe.d/blacklist-radeon.conf
blacklist radeon

AMD Common Issues

# Screen flickering
# Try different power management
echo "high" | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level

# Reset GPU
echo 1 | sudo tee /sys/class/drm/card0/device/gpu_reset

# Check for errors
dmesg | grep -i amdgpu
journalctl -b | grep -i amdgpu

# HDMI audio issues
# Enable audio via kernel parameter
# /etc/modprobe.d/amdgpu.conf
options amdgpu audio=1

# Performance issues - check power profile
cat /sys/class/drm/card0/device/power_dpm_force_performance_level
# Options: auto, low, high, manual

Intel GPU Troubleshooting

Check Intel Driver

# i915 driver
lsmod | grep i915

# GPU info
cat /sys/kernel/debug/dri/0/i915_capabilities
intel_gpu_top                # Real-time monitoring

# OpenGL
glxinfo | grep "OpenGL renderer"

# Vulkan
vulkaninfo | grep -i intel

Intel Driver Installation

# Arch Linux
pacman -S mesa vulkan-intel intel-media-driver

# For older hardware
pacman -S libva-intel-driver

# Early KMS
# /etc/mkinitcpio.conf
MODULES=(i915)
mkinitcpio -P

Intel Common Issues

# Screen tearing (X11)
# /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
    Identifier "Intel Graphics"
    Driver "modesetting"
    Option "TearFree" "true"
EndSection

# Or use i915 driver
Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "TearFree" "true"
    Option "AccelMethod" "sna"
EndSection

# GuC/HuC firmware
# /etc/modprobe.d/i915.conf
options i915 enable_guc=2

# Check firmware loading
dmesg | grep -i guc
dmesg | grep -i huc

Display Output Configuration

X11 (xrandr)

# List outputs
xrandr

# Set resolution
xrandr --output HDMI-1 --mode 1920x1080

# Set refresh rate
xrandr --output HDMI-1 --mode 1920x1080 --rate 60

# Add custom mode
cvt 1920 1080 60
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode HDMI-1 "1920x1080_60.00"
xrandr --output HDMI-1 --mode "1920x1080_60.00"

# Multi-monitor
xrandr --output HDMI-1 --right-of eDP-1
xrandr --output HDMI-1 --left-of eDP-1
xrandr --output HDMI-1 --same-as eDP-1     # Mirror
xrandr --output HDMI-1 --above eDP-1

# Disable output
xrandr --output HDMI-1 --off

# Set primary
xrandr --output eDP-1 --primary

# Scaling
xrandr --output eDP-1 --scale 1.5x1.5

Wayland Output Configuration

# wlr-randr (wlroots compositors)
wlr-randr
wlr-randr --output DP-1 --mode 3840x2160@60
wlr-randr --output DP-1 --scale 1.5
wlr-randr --output DP-1 --pos 0,0
wlr-randr --output eDP-1 --off

# Hyprland
hyprctl monitors
hyprctl keyword monitor DP-1,3840x2160@60,0x0,1.5
hyprctl keyword monitor eDP-1,disable

# GNOME (via gnome-control-center or gsettings)
gnome-control-center display

# KDE (via systemsettings or kscreen)
kscreen-doctor --outputs

Persistent Configuration

# X11 - xorg.conf
# /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
    Identifier "HDMI-1"
    Option "PreferredMode" "1920x1080"
    Option "Position" "0 0"
EndSection

Section "Monitor"
    Identifier "eDP-1"
    Option "PreferredMode" "1920x1080"
    Option "Position" "1920 0"
    Option "Primary" "true"
EndSection

# Hyprland
# ~/.config/hypr/hyprland.conf
monitor = DP-1, 3840x2160@60, 0x0, 1.5
monitor = eDP-1, 1920x1080@60, 2560x0, 1

# kanshi (dynamic output config for Wayland)
# ~/.config/kanshi/config
profile docked {
    output eDP-1 disable
    output DP-1 mode 3840x2160 position 0,0 scale 1.5
}

profile undocked {
    output eDP-1 enable mode 1920x1080 position 0,0
}

Resolution and Refresh Rate Issues

Display Not Detected

# Force detection
xrandr --auto

# Check EDID
cat /sys/class/drm/card0-HDMI-A-1/edid | edid-decode

# Force output on
xrandr --output HDMI-1 --mode 1920x1080

# Check kernel messages
dmesg | grep -i "drm\|hdmi\|dp"

Resolution Missing

# Generate modeline
cvt 1920 1080 60
# Or for reduced blanking (better for some monitors)
cvt -r 1920 1080 60

# gtf alternative
gtf 1920 1080 60

# Add mode
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode HDMI-1 "1920x1080_60.00"
xrandr --output HDMI-1 --mode "1920x1080_60.00"

# Make persistent
# /etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
    Identifier "HDMI-1"
    Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
EndSection

Wrong Refresh Rate

# Check available rates
xrandr | grep -A 10 HDMI-1

# Set specific rate
xrandr --output HDMI-1 --mode 1920x1080 --rate 144

# For Wayland/Hyprland
monitor = DP-1, 1920x1080@144, 0x0, 1

# Check if monitor supports rate
edid-decode < /sys/class/drm/card0-DP-1/edid | grep -i "rate"

Screen Tearing and VSync

X11 Compositors

# Picom (compositor)
# ~/.config/picom/picom.conf
backend = "glx"
vsync = true
glx-no-stencil = true

# Start picom
picom --backend glx --vsync

# For NVIDIA
picom --backend glx --vsync --no-use-damage

# Without compositor - use driver vsync
# NVIDIA: ForceFullCompositionPipeline
# Intel: TearFree option
# AMD: TearFree option

Wayland

# Wayland compositors handle vsync natively
# No additional configuration needed

# If tearing on NVIDIA Wayland
# Ensure nvidia-drm.modeset=1
cat /sys/module/nvidia_drm/parameters/modeset

# Check for explicit sync support
# (kernel 6.8+ and nvidia 555+)

Multiple Monitors

Common Multi-Monitor Issues

# Monitor not detected
# Check cable connection
# Try different port
# Check dmesg
dmesg | grep -i "drm\|hdmi\|dp"

# Wrong monitor order
# X11
xrandr --output HDMI-1 --right-of eDP-1

# Hyprland
monitor = HDMI-1, 1920x1080, 1920x0, 1   # Position: x=1920

# Different DPI/scaling
# X11 - limited support
xrandr --output eDP-1 --scale 1.5x1.5 --output HDMI-1 --scale 1x1

# Wayland - native fractional scaling
monitor = eDP-1, 2560x1440, 0x0, 1.5
monitor = HDMI-1, 1920x1080, 1707x0, 1

HiDPI and Scaling

# X11 - DPI setting
# ~/.Xresources
Xft.dpi: 192

# Apply
xrdb -merge ~/.Xresources

# GTK scaling (X11)
export GDK_SCALE=2
export GDK_DPI_SCALE=0.5

# Qt scaling (X11)
export QT_SCALE_FACTOR=2
export QT_FONT_DPI=96

# Wayland - native scaling
# Hyprland
monitor = eDP-1, 3840x2160, 0x0, 2

# wlr-randr
wlr-randr --output eDP-1 --scale 2

Backlight and Brightness

Control Backlight

# Check backlight interface
ls /sys/class/backlight/

# Read current brightness
cat /sys/class/backlight/intel_backlight/brightness
cat /sys/class/backlight/intel_backlight/max_brightness

# Set brightness (requires root or udev rule)
echo 500 | sudo tee /sys/class/backlight/intel_backlight/brightness

# Using brightnessctl
brightnessctl
brightnessctl set 50%
brightnessctl set +10%
brightnessctl set 10%-

# Using xbacklight (X11)
xbacklight -get
xbacklight -set 50
xbacklight -inc 10
xbacklight -dec 10

# Using light
light -G
light -S 50
light -A 10
light -U 10

Backlight Not Working

# Check available interfaces
ls /sys/class/backlight/

# ACPI backlight not working
# Add kernel parameter
acpi_backlight=vendor
# or
acpi_backlight=video
# or
acpi_backlight=native

# NVIDIA backlight
# /etc/X11/xorg.conf.d/20-nvidia.conf
Section "Device"
    Identifier "Nvidia"
    Driver "nvidia"
    Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

# AMD backlight
# Usually works with amdgpu driver
# Check /sys/class/backlight/amdgpu_bl0/

GPU Performance

Monitor GPU Usage

# NVIDIA
nvidia-smi
nvidia-smi dmon -s u    # Continuous monitoring
watch -n 1 nvidia-smi

# AMD
cat /sys/class/drm/card0/device/gpu_busy_percent
radeontop

# Intel
intel_gpu_top

# Generic
glxgears               # Simple benchmark (not accurate)
vkcube                 # Vulkan test

GPU Power Management

# NVIDIA power management
nvidia-smi -pm 1                        # Enable persistent mode
nvidia-smi -pl 200                      # Set power limit (watts)
nvidia-smi --auto-boost-default=0       # Disable auto boost

# AMD power management
cat /sys/class/drm/card0/device/power_dpm_force_performance_level
# Options: auto, low, high, manual
echo "high" | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level

# Intel power management
# Usually automatic via i915 driver

Common Issues

Black Screen After Boot

# Boot with nomodeset
# Add to GRUB kernel line: nomodeset

# Then fix:
# 1. Check if driver loaded
lsmod | grep -E "nvidia|amdgpu|i915"

# 2. Check Xorg log
cat /var/log/Xorg.0.log | grep -E "EE|WW"

# 3. Reinstall driver
# NVIDIA
pacman -S nvidia nvidia-utils

# 4. Regenerate initramfs
mkinitcpio -P

# 5. Check display manager
systemctl status sddm
systemctl status gdm

Flickering Display

# PSR (Panel Self Refresh) issues - Intel
# /etc/modprobe.d/i915.conf
options i915 enable_psr=0

# NVIDIA - disable framebuffer compression
# Kernel parameter
nvidia-drm.fbdev=0

# AMD - power management
echo "high" | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level

# Check refresh rate
xrandr | grep current

Freezing/Hanging

# Check for GPU reset
dmesg | grep -i "gpu reset\|gpu hang"

# NVIDIA: Check power
nvidia-smi -q -d POWER

# AMD: Check for errors
journalctl -b | grep -i "amdgpu.*error"

# Kernel panic on GPU issue
# Try different driver version
# Check thermals
sensors
nvidia-smi -q -d TEMPERATURE

External Monitor Issues

# USB-C/Thunderbolt
# Check if thunderbolt loaded
lsmod | grep thunderbolt

# Authorize devices
cat /sys/bus/thunderbolt/devices/*/authorized

# DisplayPort over USB-C
# May need USB-C alternate mode
# Check dmesg for connection
dmesg | grep -i "dp\|usb\|type-c"

# HDMI adapter issues
# Check cable/adapter compatibility
# Try different port

Diagnostic Commands

Collect Display Information

# GPU hardware
lspci -v | grep -A 20 VGA
lspci -k | grep -A 3 VGA

# Driver and mesa
glxinfo | head -40
vulkaninfo --summary

# X11 info
xdpyinfo | head -30
xrandr --verbose

# Wayland info
echo $XDG_SESSION_TYPE
echo $WAYLAND_DISPLAY

# Kernel messages
dmesg | grep -i "drm\|gpu\|nvidia\|amd\|intel"

# Xorg log
cat /var/log/Xorg.0.log | grep -E "EE|WW|LoadModule"

# System info
inxi -G

Debug Logs

# Increase Xorg verbosity
# Start Xorg manually
startx -- -logverbose 6

# Check journald
journalctl -b | grep -i "gpu\|drm\|nvidia\|amd"
journalctl --user -b | grep -i "wayland\|compositor"

# Enable DRM debug
echo 0x1ff | sudo tee /sys/module/drm/parameters/debug
dmesg -w

# NVIDIA debug log
nvidia-bug-report.sh

Quick Reference

# GPU info
lspci | grep -i vga
nvidia-smi                   # NVIDIA
glxinfo | grep renderer      # OpenGL
vulkaninfo --summary         # Vulkan

# Display config
xrandr                       # X11
wlr-randr                    # Wayland wlroots
hyprctl monitors             # Hyprland

# Set resolution
xrandr --output HDMI-1 --mode 1920x1080 --rate 60
wlr-randr --output DP-1 --mode 1920x1080@60

# Multi-monitor
xrandr --output HDMI-1 --right-of eDP-1

# Brightness
brightnessctl set 50%
xbacklight -set 50

# Troubleshooting
dmesg | grep -i drm
cat /var/log/Xorg.0.log | grep -E "EE|WW"
journalctl -b | grep -i gpu