Low P state affects the display output smoothness

This seems to be universal across most ASUS ROG laptops, and all wayland based desktops. I am testing both COSMIC desktop, and Gnome with mutter patched using Nvidia secondary GPU copy acceleration (!3304) · Merge requests · GNOME / mutter · GitLab

TLDR; I have to force P0 state consistently through driver opt or everything gets very janky when the P state changes to P8 (and will not change unless load is very high). The result is external outputs are very shoddy.

The effect can be seen easily enough using vkcube-wayland. This starts off nice and fast, smooth, but then progressively slows right down. Watching the P state, you can see it correlates to that. Once in P8 it doesn’t ramp back up.

Forcing P state using Nvidia secondary GPU copy acceleration (!3304) · Merge requests · GNOME / mutter · GitLab keeps things pretty smooth in both COSMIC and Gnome with mutter patch.

nvidia-bug-report.log.gz (372.7 KB)

1 Like

Apologies if this isn’t helpful - but how are you monitoring the p state?

It’s a good question because I’m using nvidia-smi to check and I wonder if maybe that is also impacting the p-state. I don’t think it is because a watcgh on it while doing __NV_PRIME_RENDER_OFFLOAD=1 vkcube --present_mode 2 shows it bouncing between P8, P5, P4, P0.

But __NV_PRIME_RENDER_OFFLOAD=1 vkcube --present_mode 0 shows P0 and it stays smooth (and fast).

Additionally to this:

  • game + no v-sync + FPS over refresh rate = smooth
  • game + no v-sync + FPS under refresh rate = stutters every few seconds (p-state change?)
  • game + v-sync + FPS over refresh rate = smooth
  • game + v-sync + FPS under refresh rate = smooth (and possible input lag?)

where game is say Quake II RTX (rtx vs opengl renderers), and Cyberpunk 2070

It’s here if you run nvidia-smi, it’s running in P5 in the screen snippet.
image

1 Like

A quick update, I installed KDE 6, and this for whatever reason is using P0 state when external is connected. The result is silky smooth display.

The nvidia-smi details are:

❯ nvidia-smi 
Tue Jan 30 09:00:47 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.40.07              Driver Version: 550.40.07      CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| 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 4060 ...    Off |   00000000:01:00.0  On |                  N/A |
| N/A   42C    P0             16W /   80W |      97MiB /   8188MiB |     35%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      2771      G   /usr/bin/kwin_wayland                           2MiB |
+-----------------------------------------------------------------------------------------+

Isn’t that because you use wayland now and not X11?

No. I’ve used Wayland exclusively for a couple of years now.