mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

AMD GPU: GUI is rendered incorrectly all over the window

Open Juri-3D opened this issue 2 years ago • 27 comments

Hey, I had to switch to a new computer and while the simulations are running as always, I can't use the simulate.exe anymore. The GUI is rendered all over the place (see screenshot). The buttons are still clickable on the left black panel, although not visible.

The PC: ASRock X670E Pro RS AMD Ryzen 5 7600X (with integrated graphics) 32GB RAM M.2 SSD AMD Radeon RX 6800 XT Windows 11 22H2 (22621.819)

I've tried the latest AMD Adrenalin (22.5.1 and 22.11.1) and PRO (22Q4) graphics driver versions. I've tried different mujoco releases (2.3.0, 2.3.1) and built it from the source code, always with the same result. Any help is appreciated.

Win11_mujoco_simulate

Juri-3D avatar Dec 09 '22 11:12 Juri-3D

Can you try disabling DPI scaling?

saran-t avatar Dec 09 '22 13:12 saran-t

Can you try disabling DPI scaling?

I did, but nothing changed. An addition to the specs above: I have two monitors, one with 1080p and one with 4k. But I already used those screens on the old PC.

Juri-3D avatar Dec 09 '22 16:12 Juri-3D

Hard for me to make suggestions without being able to reproduce the issue. Are you comfortable with C programming? I'd recommend writing a minimal application that just compiles a model, sets up a rendering context, renders an image, dumps to file, and see if you can get something sensible.

Alternatively, if you can install Python, you can transcribe our tutorial Colab into a small Python script (specifically, just only as far as the first image rendered) and see if you can get the correct image.

saran-t avatar Dec 09 '22 18:12 saran-t

Sadly I'm a mechanical engineer with little experience in C or Python. The issue, however, seems not related to the simulation environment. I can open any example model or my complex models with the "basic.exe" and they are rendered and run perfectly fine. Only the clickable buttons/menus of the "simulate.exe" are broken.

Juri-3D avatar Dec 20 '22 16:12 Juri-3D

I have the same issue. New laptop with AMD Ryzen 5 PRO 6650U with Radeon Graphics, and up to date drivers (Adrenalin Edition Version 22.11.2).

I used the prebuilt simulate.exe binary of mujoco release 2.3.2. I also built simulate.exe from source, same exact issue as the release version.

image

UI renders like this, with a lot of flickering.

basic.exe also works for me

I suspect this is an issue with AMD graphics specifically, since that seems to be the common element with me and @Juri-3D

Ocanath avatar Feb 21 '23 01:02 Ocanath

This is happening to me as well. My laptop has AMD CPU and GPU (Lenovo Z16). I remember simulate.exe worked in late 2022.

Leo428 avatar Feb 22 '23 03:02 Leo428

@Leo428 Can I please ask you to go through each binary release version one-by-one to see when the error first occurred?

saran-t avatar Feb 22 '23 03:02 saran-t

@saran-t I tried as far back as version 2.1.2 and the problem persists on my laptop (Windows 11 and AMD chips). I also tested it on my windows 10 PC with an intel CPU and Nvidia GPU and version 2.3.2 worked fine.

Since I reinstalled my laptop's system in late 2022, I guess it's most likely a driver issue caused by either windows 11 or AMD updates.

Leo428 avatar Feb 22 '23 03:02 Leo428

Forgot to mention, I'm running windows 10

Ocanath avatar Feb 26 '23 20:02 Ocanath

I had the same issue, but it worked after adding simulate.exe of the mujoco folder in the NVIDIA Control Panel program settings and set the preferred graphics processor to the NVIDIA GPU. I think the program tried to use the integrated graphics of my laptop and somehow that caused a problem

Shavdrag avatar Apr 01 '23 18:04 Shavdrag

It seems to be a GPU driver issue. I also have a Radeon GPU and the issue resolved when I downgraded the driver. The version I'm currently using is Adrenalin 22.5.1

ArtifixPrime avatar Apr 04 '23 05:04 ArtifixPrime

I am also having a similar issue on amd based cpu, but haven't faced the issue on my other intel based cpu.

rajuptvs avatar Apr 10 '23 20:04 rajuptvs

I should've thought of this ages ago, but could people who are running into this problem please try setting the environment variables MUJOCO_GL_DEBUG=1 and LIBGL_DEBUG=verbose, and see if you get any message?

saran-t avatar Apr 19 '23 12:04 saran-t

I just got hold of a Windows AMD machine for the first time today, and while I haven't been able to reproduce anything nearly as garbled as the screenshots posted in this thread, I can nevertheless see that the UI panels are not aligned correctly.

Can I please ask anyone affected who's still following this thread to verify:

  • that the Simulate app is still garbled, and
  • what happens when you press Tab and Shift+Tab to hide both UI panes

Thanks!

saran-t avatar Oct 20 '23 19:10 saran-t

The issue of the display being cut off still exists on my laptop. When I press Tab and Shift+Tab, the display returns to normal, but, of course, the user cannot interact with the UI panes. So, it is very likely that this issue is with the two interface panes. You can watch the video below. screen-capture (1).webm

NghiaPhamttk27 avatar Oct 21 '23 00:10 NghiaPhamttk27

Could you please patch the following, launch the viewer (both with and without a model loaded), and post screenshots here? This patch replaces the side panels with solid blocks of colours, hopefully this will help us better understand what operation is causing the problem.

0001-Set-debug-colors.patch

saran-t avatar Oct 21 '23 12:10 saran-t

I followed your instructions both with a model and without a model. In the case with a model, even when I press Shift+Tab, I can't see the model as before. You can check the two videos below. With humanoid model.webm without model.webm

NghiaPhamttk27 avatar Oct 22 '23 01:10 NghiaPhamttk27

Thanks. Unfortunately that's not at all what I expected to see (not that I know what I expected to see, but certainly not that!).

This means that I still can't repro this problem fully. Might take a while to get this figured out.

saran-t avatar Oct 22 '23 11:10 saran-t

Yeah, it's quite sad to hear. I still hope the issue can be resolved because I can't have an Nvidia GPU as a replacement anytime soon.

NghiaPhamttk27 avatar Oct 22 '23 12:10 NghiaPhamttk27

image help, why did I click simulate.exe and then the window flashed back

Xiaxuli avatar Oct 25 '23 11:10 Xiaxuli

Interestingly, the new bug report #1144 shows an identical screenshot to what I saw on last week. Note that it's much less garbled than what's posted here thus far, but still wrong.

saran-t avatar Oct 28 '23 12:10 saran-t

I have a laptop with AMD Internal GPU as well as Nvidia GPU running Windows 11. After recent AMD graphics driver update I faced the same issue. The way I fixed the issue is that, I went to Windows Settings->System->Display->Graphics and under Custom options for apps, clicked browse, chose the Simulate.exe. Once I have added the custom app, selected MuJoCo->Options and instead of let windows decide, chose my NVIDIA Graphics card as my Graphics Preference. Now it works fine. image

codeslord avatar Nov 14 '23 13:11 codeslord

Thank you for your reply, but I tried your method, but it still did not solve the problem that the click could not open 1699975017347

Xiaxuli avatar Nov 14 '23 15:11 Xiaxuli

@saran-t I have the exact same issue as the screenshot in #1144 with AMD driver 23.12.1 (on Ryzen 7 6800U). This is on a local build using VS 2022.

Interestingly enough, downgrading to 22.5.1 fixes the GUI and everything renders well (I remember trying a couple of different driver versions a while ago). That might give some hints as to what's going on.

rkourdis avatar Dec 23 '23 16:12 rkourdis

I just started off with Mujoco and I faced the same problem. My CPU and GPU are both AMD. I believe is was on version 24.xx.xx.xx (forgot to check the exact number) and the GUI was glitching out. I downgraded my driver to 21.40.18.10 since it was already saved on my computer and now simulate.exe runs without any issues. I hope a fix can be found for the latest AMD drivers soon.

girishkolli avatar Feb 07 '24 16:02 girishkolli

Hey, I had to switch to a new computer and while the simulations are running as always, I can't use the simulate.exe anymore. The GUI is rendered all over the place (see screenshot). The buttons are still clickable on the left black panel, although not visible.

The PC: ASRock X670E Pro RS AMD Ryzen 5 7600X (with integrated graphics) 32GB RAM M.2 SSD AMD Radeon RX 6800 XT Windows 11 22H2 (22621.819)

I've tried the latest AMD Adrenalin (22.5.1 and 22.11.1) and PRO (22Q4) graphics driver versions. I've tried different mujoco releases (2.3.0, 2.3.1) and built it from the source code, always with the same result. Any help is appreciated.

Win11_mujoco_simulate

I faced the same issue with AMD Ryzen 6000 series and NVIDIA GEFORCE RTX GPU. I changed the GPU mode from standard to ultimate (in ASUS ROG zephyrus G15) and it fixed the issue as I shifted to NVIDIA GPU. I think there is any issue with the AMD driver.

RajneeshSingh111 avatar May 31 '24 02:05 RajneeshSingh111

Can confirm this issue is still there for AMD stand-alone graphics card (7900XTX). Hopefully it can be fixed soon.

wjxway avatar Jul 07 '24 22:07 wjxway