WindTerm icon indicating copy to clipboard operation
WindTerm copied to clipboard

[Case report]: OpenGL/Mesa problem and solution (X11 forwarding)

Open whatbh opened this issue 3 months ago • 0 comments

Target:

  • Local: Gentoo, Linux 6.12, OpenRC
  • Remote: Arch, Linux 6.15, systemd

Problem:

When enable X11 forwarding:

  • Most GUI programs run well (Firefox, Thunar, xfce4-terminal, xed, mousepad)
  • glxgears does not work
  • glxinfo will stop at this step name of display: localhost:10.0

Solution:

  • Set LIBGL_ALWAYS_SOFTWARE=1 (i.e.,export LIBGL_ALWAYS_SOFTWARE=1) to force Mesa renderer
  • This could be automated in "Session Settings > Authentication > Execute command after authentication:". Write in export LIBGL_ALWAYS_SOFTWARE=1\r. (The \r is to automate pressing Enter)

Known issues:

  • This disable hardware-acceleration, so programs rely on that will work now, but significantly slower than bare-metal
  • Programs fully depend on hardware rendering (e.g., WezTerm) completely broken despite any solution. Probably you can try something like virtualgl if really really need it, I have never tested

If time permits, an investigation of this issue or user-facing documentation would be appreciated. For example, if this persists for other systems, make a check routine for hardware support, if not, fallback to use software renderer by default.

whatbh avatar Sep 25 '25 05:09 whatbh