Blank plot windows on laptop screen, works with external monitor

Hi,

I’m using FreeFEM-cs on Windows 11 (laptop) and the graphics panel stays
empty (plain grey background) when I run a script with plot().

  • FreeFEM version: 4.17
  • FreeFEM-cs version: 26.1
  • only one gpu

What works and what doesn’t:

  • The script runs fine in FreeFEM-cs: the console output is correct, and
    the “figure” tabs are created, but the plot area is blank.
  • The same script run with the standard FreeFem++ shows the plots correctly.
  • When I plug an external monitor into the laptop, FreeFEM-cs displays the
    plots correctly. Without the external monitor, they are blank again.

Minimal example:

mesh Th = square(10, 10);
plot(Th, wait=true);

Has anyone seen this, or does anyone know a fix or workaround?

Thanks!

Hi xavkrs,

Thank you for this detailed bug report. I have never seen it before. It looks like an OpenGL problem. To correct it, I need to reproduce it on equivalent hardware. Do you know which graphics card your laptop uses? In the meantime, maybe you can try another version of your graphics driver, but there is no guarantee that it will work. You could also try to disable OpenGL acceleration, but then graphics would be much slower.

Thanks for the quick reply. My laptop is an HP 14s-fq0xxx with an AMD Ryzen 5 4500U and its integrated “AMD Radeon™ Graphics” (single GPU, no dedicated card). Driver version: 31.0.12044.3 (25 Oct 2022). Also, where can I disable OpenGL ?

Ok, thank you for the details. Be careful not to disable OpenGL, only “acceleration”. I don’t know where that is under Windows. If in doubt, it is better not to try it, there is no certainty that it will help.

Hi, I tried to plug an external screen to my laptop but the bug did not appear. So I have found something for you to try: could you download the binary Mesa3D version of OpenGL from https://fdossena.com/?p=mesa/index.frag, extract the file opengl32.dll, copy that file to c:\Program Files\FreeFEM-cs\obj (as an Administrator) and run FreeFEM-cs again? If the bug disappears, then we know it’s an OpenGL problem. Thank you in advance.

It works ! Thank you very much, let me know if there’s anything else I can do.

Xavier.

That’s pretty good news. I will add a Mesa3D version of FFCS on the download page in case other people face the same bug. One drawback of Mesa3D is that it is slower. So if some graphics become too slow, please get back to me.

Antoine