On Fri, Dec 18, 2020 at 01:37:00PM +0100, Alex Raschi wrote: > >Synopsis: X11 freezes with Radeon RX 560 and other issues > >Category: system kernel amd64 > >Environment: > System : OpenBSD 6.8 > Details : OpenBSD 6.8-current (GENERIC.MP) #218: Wed Dec 9 > 23:06:07 MST 2020 > > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > Architecture: OpenBSD.amd64 > Machine : amd64 > >Description: > X11 freezes after some usage with amdgpu driver leaving the screen > unresponsive, this happen with both xf86-video-amdgpu and > xf86-video-modesetting. With modesetting the system is generally more > stable and lasts longer. Sometimes i am able to switch to a tty and > restart xenodm otherwise i need to reboot. > > With xf86-video-amdgpu libGL is unable to use DRI3 and falls back to > DRI2, this does not happen with xf86-video-modesetting. I noticed this > also on a intel computer but i cannot try with modesetting there > because the gpu supports only opengl 1.4. I added a sample output of > `LIBGL_DEBUG=verbose glxinfo` with both drivers at the end. I tried > also with `Option "DRI" "3"` but without luck. > > With xf86-video-amdgpu if the monitor turns off for some time (for > example with dpms/screensaver) i cannot turn it on again anymore (for > example by typing or moving mouse), this again does not happen with > xf86-video-modesetting. When this occurs the kernel and X11 do not > write anything, the logs are the same as the ones below without the > error messages.
Not sure what is going on there, don't see that here. > > On Linux mesa creates $XDG_CACHE_HOME/mesa_shader_cache but on OpenBSD > this does not happen, i know this is just an optimization but i wonder > if it was disabled or simply doesn't work. The shader cache is disabled to avoid pledge/unveil violations with web browsers. > > I had a file in /etc/X11/xorg.conf.d with inside: > > Section "ServerFlags" > Option "DontVTSwitch" "1" > Option "DontZap" "1" > EndSection > > But after removing it and leaving the xorg.conf.d directory empty i > still have the freeze issue. I initially thought this file was the > problem. During the last month i tried the multiple snapshots of > -current. > > Related: > https://marc.info/?l=openbsd-bugs&m=160736093218686&w=2 > https://marc.info/?l=openbsd-bugs&m=159383256417523&w=2 > >How-To-Repeat: > X11 can freeze near boot (after xenodm login) or after some hours/days, > the most problematic usage seems to be using opengl/acceleration > programs like games and fat browsers. Sometimes running 2 games for > some seconds is enough. > >Fix: > With xf86-video-modesetting there are no issues with DRI3/monitor and > it is more stable than xf86-video-amdgpu, however X11 freezes with this > driver too. A complete fix is unknown. The ring timeouts/gpu hangs you see show on other amdgpu parts as well and can also be triggered with piglit. Newer Mesa releases don't seem to help. It seems to be a problem specific to OpenBSD but it isn't clear what is causing it.
