This looks like a graphics driver and OpenGL/Mesa configuration issue. The errors indicate problems with GLX context creation and DRI (Direct Rendering Infrastructure) authentication. Here's how to diagnose and fix this:
First, let's check your current graphics setup:
# Check your GPU
lspci -k | grep -A 2 -E "(VGA|3D)"
# Check loaded kernel modules
lsmod | grep -E "(nvidia|nouveau|radeon|amdgpu|i915)"
# Check installed drivers
dpkg -l | grep -E "(nvidia|mesa|vulkan|libgl)"
# Check GLX info (might fail given your errors)
glxinfo | head -20
Common fix approaches:
If you have NVIDIA:
- Remove all NVIDIA drivers and start fresh:
sudo apt purge nvidia* libnvidia*
sudo apt autoremove
sudo apt install ubuntu-drivers-common
sudo ubuntu-drivers autoinstall
- Or manually install a specific version:
# List available drivers
ubuntu-drivers devices
# Install specific version (e.g., nvidia-driver-545)
sudo apt install nvidia-driver-545
For Intel/AMD or if you want to use open-source drivers:
- Reinstall Mesa and related packages:
sudo apt update
sudo apt install --reinstall libgl1-mesa-glx libgl1-mesa-dri libglx-mesa0
sudo apt install --reinstall mesa-vulkan-drivers mesa-utils
- Fix potential library conflicts:
# Reconfigure dynamic linker
sudo ldconfig
# Update alternatives for GL libraries
sudo update-alternatives --config glx
General cleanup steps:
- Remove conflicting packages:
# Remove broken packages
sudo apt --fix-broken install
# Clean package cache
sudo apt clean
sudo apt autoclean
- Regenerate initramfs (important after driver changes):
sudo update-initramfs -u
- Reset Xorg configuration:
# Backup and remove custom Xorg configs
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup 2>/dev/null
sudo rm -rf /etc/X11/xorg.conf.d/*.conf
- Reboot after making changes:
sudo reboot
If problems persist:
- Check for held packages:
dpkg --get-selections | grep hold
- Force reinstall graphics stack:
sudo apt install --reinstall xserver-xorg-core xserver-xorg-video-all
- Check system logs for more details:
journalctl -b | grep -E "(nvidia|nouveau|mesa|GLX|DRI)"
dmesg | grep -E "(nvidia|nouveau|drm)"
Let me know what GPU you have and the output of the diagnostic commands, and I can provide more specific guidance!