Skip to content

On Nvidia 535, tearing/flickering observed with PresentMode::Fifo #5491

Open
@acarl005

Description

Description

I am observing tearing between 2 frames on Linux with X11 and Nvidia 535 drivers.

Repro steps

I have modified the "shadow" example in order to accentuate this effect: acarl005#1
This branch just renders 2 frames in rapid succession every 1 second.

Expected vs observed behavior

I observe the expected behavior on the integrated GPU.

WAYLAND_DISPLAY="" cargo run --bin wgpu-examples -- shadow
PXL_20240404_024350904.TS.mp4

However, when I switch to my Nvidia GPU, I instead see tearing and/or flickering.

WAYLAND_DISPLAY="" WGPU_POWER_PREF=high cargo run --bin wgpu-examples -- shadow
PXL_20240403_202650141.TS.mp4

The examples use PresentMode::Fifo, which says:

"No tearing will be observed."

Platform

Forked the current trunk branch of wgpu, commit ed843f802974eae9d708d3b3895264e9efb01dc6.

See acarl005#1

uname -a
Linux queenie 6.5.0-21-generic #21~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb  9 13:32:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
nvidia-smi
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.161.07             Driver Version: 535.161.07   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3050 ...    Off | 00000000:01:00.0 Off |                  N/A |
| N/A   45C    P0              N/A /  25W |      3MiB /  4096MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      2055      G   /usr/bin/gnome-shell                          1MiB |
+---------------------------------------------------------------------------------------+

Metadata

Assignees

No one assigned

    Labels

    api: vulkanIssues with Vulkanarea: wsiIssues with swapchain management or windowingplatform: x11Issues with integration with linux/x11

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions