Recently, we have received many feedbacks from users, saying that our software interface is a mess, and there is no way to find any button locations. That’s really difficult to resolve because we do nothing extra about the rendering part of our software.
This article will first give a conclusion to help you solve the problem and then show our investigation process.
This post is written in multiple languages. Please select yours:
中文 English
Yes, all the buttons are displayed everywhere, and covered across each other, and be positioned here and there. You can’t even read any UI texts. The UI elements change and flash after your mouse move.
Under normal circumstances, there are indeed many reasons for WPF rendering to blow up, but most of them are just broken in a single computer. But this blog talks about some widespread rendering problems that many computers are suffering from. And this time, DELL make this happen.
Now please check the NahimicOSD.dll
file which is the critical key point of this rendering issue. It may be in these locations:
All of the paths above are from DELL Alienware. Also, there are some other paths but I’m not sure whether it breaks the WPF rendering.
NahimicOSD is an on-screen display library that displays something on any software using DirectX as its rendering engine. Unfortunately, the additional rendering blooms the rendering of WPF apps (DirectX 9 application precisely).
If you’re not a developer or you just want to solve it for yourself, try these:
I’ve posted the issue on the DELL Alienware community and waiting for their reply and new driver update. You can see my discussions there:
If you’re a developer and want to solve this issue for your software users, you can view these two methods.
Write this code below before any WPF window shown:
1 | System.Windows.Media.RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly; |
---|
And your windows will render in software mode and the NahimicOSD will not break your app.
Open this file C:\ProgramData\A-Volute\DellInc.AlienwareSoundCenter\Modules\ScheduledModules\Configurator\BlackApps.dat
and append your process name at the end of it and then your process will not be injected by the NahimicOSD.dll.
This is totally a text file so it’s easy to edit.
Some of our software users gave feedback to us with the messing UI as attachments. Most of them were DELL devices with a 10th CPU and two graphics cards which confuses us. We tried to switch the default graphics card and tried to upgrade the graphics drivers but nothing helped.
What made changes was a special user which was using a LENOVO device. We find that the DELL Alienware Sound Center was installed on his/her computer. It seems that the DELL Alienware Sound Center is the criminal. So we dumped our software and get the proves that the NahimicOSD.dll in DELL’s path was injected into our software. We deleted the NahimicOSD.dll file and everything go back to fine.
This GitHub issue made me surprised because this was the right topic to talk about the same issue which I was concerned about. What made me surprised more is that I was one of the talkers of them two years ago but I remember nothing.
References
本文会经常更新,请阅读原文: https://blog.walterlv.com/post/wpf-renders-wrong-because-of-nahimicosd-en.html ,以避免陈旧错误知识的误导,同时有更好的阅读体验。
本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。欢迎转载、使用、重新发布,但务必保留文章署名 吕毅 (包含链接: https://blog.walterlv.com ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请 与我联系 ([email protected]) 。