tari-project / universe

Other
11 stars 24 forks source link

Hardware Acceleration causing DWM/WDDM Screen Pixelation on AMD RX 7900 XTX and Nvidia RTX 4090 #619

Open uforiaio opened 2 months ago

uforiaio commented 2 months ago

Describe the bug

//* Under High GPU Load Due to GPU Resource Contention will cause any app to potentially have issues with ludicrous mode on. Also, it is exasperated if you connect to your machines via RDP, which uses the Micrsoft Remote Display Adapter, which yes, uses hardware acceleration.

There appears to be an issue in Windows Desktop Window Manager (DWM) / Windows Display Driver Model (WDDM) that leads to pixelation issues over time. This problem has been observed on systems equipped with Nvidia RTX 4090s. Similar behavior occurs when using AMD GPUs (7900 XTX), but the issue appears more frequent on Nvidia hardware. The issue can be temporarily resolved by restarting the system or disabling hardware acceleration, but it returns when intensive GPU usage resumes.

To Reproduce Steps to reproduce the behavior:

Use an Nvidia RTX 4090 or AMD 7900 XTX system with intensive GPU load (e.g., mining or video playback). Ensure hardware acceleration is enabled for browsers and DWM is relying on the GPU. Run intensive GPU tasks such as mining with Universe or watching Netflix. Notice the appearance of visual artifacts and pixelation on the screen. Expected behavior

The GPU should handle tasks like DWM rendering and hardware-accelerated browser tasks without leading to screen pixelation or artifacts, even when running intensive GPU workloads.

Screenshots

Here are screenshots showing the pixelation and artifact issues:

image image image

Sidenote: Animation will also rise to the top over time, and change its orientation. Not sure if this is by design or not.

image

Desktop:

OS & Version: Windows 11 Version 23H2 (OS Build 22631.4169) GPUs: Nvidia RTX 4090 (on affected systems), AMD 7900 XTX (issue was reproduced intentionally)

GPU Drivers: Nvidia and AMD (Tried newest drivers, as well as two older drivers) Browser & Version: All browsers since they use GPU Smartphone: n/a

The issue seems to be tied to how DWM relies on the GPU for rendering windows and hardware acceleration in browsers.

Assorted apps that you can reproduce the issue with ludicrous mode /w visualizations enabled. I also did some testing with Windows experience, Best Performance ad Best Looking (?).

Web Browsers:

Google Chrome Mozilla Firefox Microsoft Edge Opera

Media Players:

VLC Media Player Windows Media Player / Movies & TV App Kodi

Video Editing and Rendering Software:

Adobe Premiere Pro DaVinci Resolve Blender Autodesk AutoCAD Autodesk 3ds Max Autodesk Maya

Gaming Platforms and Games:

Steam Epic Games Launcher Origin Microsoft Store Games

Design and Graphics Software:

Adobe Photoshop Adobe Illustrator CorelDRAW

Office Productivity Software:

Microsoft Office Suite (Word, Excel, PowerPoint)

Communication and Collaboration Tools:

Zoom Microsoft Teams Discord

Streaming Applications:

Netflix App YouTube (via browsers) Amazon Prime Video Hulu Disney+

Virtualization Software:

VirtualBox VMware Workstation

Utilities and System Applications:

Windows Desktop Window Manager (DWM) File Explorer Microsoft Photos App

Creative Applications:

Affinity Designer Affinity Photo Affinity Publisher SketchUp Cinema 4D

Other Notable Applications:

Google Earth Pro Spotify Desktop App OBS Studio (Open Broadcaster Software)

uforiaio commented 2 months ago

I have 57" monitors running at 240hz.

I read the React Framer Motion docs, and this caught my eye.

requestAnimationFrame if not defined will use system default settings, which /wo throttling will use the system refresh rate and sync to the monitor refresh rate

uforiaio commented 2 months ago

Found a javascript example using chatgt.o1

let lastTime = 0; const fps = 30; // Target 30fps instead of 60fps const interval = 1000 / fps;

function animate(currentTime) { const deltaTime = currentTime - lastTime; if (deltaTime >= interval) { lastTime = currentTime - (deltaTime % interval); // Update animation logic here } requestAnimationFrame(animate); } requestAnimationFrame(animate);

uforiaio commented 2 months ago

If anyone runs into the issue, I set my refresh rate to 60hz/1920xwhatever and I didn't have artifacts. I will fork it and grab an IDE later to see if setting the throttle for requestAnimationFrame changes the behavior.