[nvidia] Secondary monitor performance is slow on an Nvidia hybrid system in Wayland sessions

Bug #1970291 reported by gutopardini
100
This bug affects 16 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Unknown
Mutter
Fix Released
Unknown
mutter (Ubuntu)
In Progress
Medium
Daniel van Vugt

Bug Description

In session with Wayland the Nvidia driver settings do not load. And there is a sluggishness when opening apps, show applications menu, maximize, changing workspace, resize, changing monitor windows etc. When in an Xorg session the Nvidia settings load correctly and the performance is satisfactory.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: xorg 1:7.7+23ubuntu2
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
.proc.driver.nvidia.capabilities.gpu0: Error: path was not a regular file.
.proc.driver.nvidia.capabilities.mig: Error: path was not a regular file.
.proc.driver.nvidia.gpus.0000.01.00.0: Error: path was not a regular file.
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.suspend: suspend hibernate resume
.proc.driver.nvidia.suspend_depth: default modeset uvm
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 510.60.02 Wed Mar 16 11:24:05 UTC 2022
 GCC version:
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: pass
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Mon Apr 25 21:18:08 2022
DistUpgraded: Fresh install
DistroCodename: jammy
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, including running git bisection searches
GraphicsCard:
 Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] [8086:3e9b] (prog-if 00 [VGA controller])
   Subsystem: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] [8086:2086]
 NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] [10de:2191] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Intel Corporation TU116M [GeForce GTX 1660 Ti Mobile] [8086:2086]
InstallationDate: Installed on 2022-04-24 (1 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Beta amd64 (20220329.1)
MachineType: Avell High Performance A60 MUV
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.15.0-27-generic root=UUID=894cb598-7172-481c-a449-3133b8f226e5 ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/11/2020
dmi.bios.release: 5.13
dmi.bios.vendor: Intel Corp.
dmi.bios.version: QCCFL357.0122.2020.0911.1520
dmi.board.name: Avell High Performance
dmi.board.vendor: Avell High Performance
dmi.chassis.type: 10
dmi.chassis.vendor: Avell High Performance
dmi.chassis.version: 1.0
dmi.ec.firmware.release: 1.25
dmi.modalias: dmi:bvnIntelCorp.:bvrQCCFL357.0122.2020.0911.1520:bd09/11/2020:br5.13:efr1.25:svnAvellHighPerformance:pnA60MUV:pvr:rvnAvellHighPerformance:rnAvellHighPerformance:rvr:cvnAvellHighPerformance:ct10:cvr1.0:skuA60MUV:
dmi.product.family: A60 MUV
dmi.product.name: A60 MUV
dmi.product.sku: A60 MUV
dmi.sys.vendor: Avell High Performance
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.110-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 22.0.1-1ubuntu2
version.libgl1-mesa-glx: libgl1-mesa-glx N/A
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:21.1.3-2ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-2build3
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20210115-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.17-2build1

Revision history for this message
gutopardini (gutopardini) wrote :
affects: xorg (Ubuntu) → wayland (Ubuntu)
affects: wayland (Ubuntu) → mutter (Ubuntu)
summary: - When using wayland session everything is slow
+ Secondary monitor performance is slow on an Nvidia hybrid system in
+ Wayland sessions
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Secondary monitor performance is slow on an Nvidia hybrid system in Wayland sessions

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mutter (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-510 (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report. It looks like the issue is what was documented in:

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2341

We will need a future Nvidia driver to resolve that fully.

Changed in mutter (Ubuntu):
status: Confirmed → Opinion
importance: Undecided → Medium
Changed in nvidia-graphics-drivers-510 (Ubuntu):
importance: Undecided → Medium
tags: added: nvidia
summary: - Secondary monitor performance is slow on an Nvidia hybrid system in
- Wayland sessions
+ [nvidia] Secondary monitor performance is slow on an Nvidia hybrid
+ system in Wayland sessions
tags: added: hybrid multimonitor wayland
Changed in nvidia-graphics-drivers-510 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
gutopardini (gutopardini) wrote :

I actually did the test and unplugged the monitor and everything worked smoothly.

tags: added: nvidia-wayland
Revision history for this message
Zingam (registrirayme) wrote (last edit ):

I can't confirm that the description matches my issue but maybe it is the same. So here is my own description:

I use the same monitor 1440p, keyboard and mouse connected via HDMI to older MacBook Pro and dual boot Laptop (Ubuntu + Win10) with Hybrid graphics Intel 630HD and GeForce 1050Ti.

Since 22.04 the mouse movement on my external monitor feels laggy, jerky, while on the internal display it feels OK. I think on Ubuntu 20.04 there was not such an issue.
I feel that the mouse movement on the internal display is much smoother.

Otherwise GNOME Shell, YouTube, VLC don't seem to experience bad performance.

I use FireFox mostly. GNOME Shell animation feel slow for this system.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please try selecting the Xorg option on the login screen. It will either be called 'Ubuntu on Xorg' or just 'Ubuntu'.

Revision history for this message
Zingam (registrirayme) wrote :

I'm quite convinced that moving the mouse fast in circles over Firefox for example doesn't feel quite right both on Wayland and on Xorg on my external monitor.

I just noticed that night light doesn't work on Wayland but I guess that is a known issue.

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

> I'm quite convinced that moving the mouse fast in circles over Firefox
> for example doesn't feel quite right both on Wayland and on Xorg
> on my external monitor.

If you encounter a problem in Xorg sessions then please open a new bug. This bug is about external monitors in Wayland sessions.

> I just noticed that night light doesn't work on Wayland but I guess that
> is a known issue.

That's bug 1972728.

Revision history for this message
Zingam (registrirayme) wrote :

Hi, Daniel, I got a big update yesterday. I feel subjectively that the situation improved significantly (Wayland). Was there a fix for the issue?

Though I still feel that macOS on Iris Graphics HD4000 is still smoother on 1440p than what I get on my hybrid HD630/1050Ti.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

No there have been no updates to gnome-shell or mutter yet in 22.04.

Still, if you experience this bug then please just select a Xorg session on the login screen.

Changed in mutter:
status: Unknown → Fix Released
Revision history for this message
Zingam (registrirayme) wrote :

Is there an option to see the rendering performance of the gnome shell.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes,

1. Add this to /etc/environment: CLUTTER_SHOW_FPS=1

2. Reboot.

3. Watch the log: journalctl -f /usr/bin/gnome-shell

no longer affects: mutter
Revision history for this message
Zingam (registrirayme) wrote :

Thank you, Daniel,

very interesting info. I noticed some strange behavior/stats when moving the terminal with the log between the internal and external displays. Maybe it's normal but it felt weired.

The log output without the CLUTTER option yields this:

~$ journalctl -f /usr/bin/gnome-shell
юни 11 08:48:29 hristo-Inspiron-15-7000-Gaming gnome-shell[2083]: DING: Detected async api for thumbnails
юни 11 08:48:30 hristo-Inspiron-15-7000-Gaming gnome-shell[2083]: DING: GNOME nautilus 42.1.1
юни 11 08:48:39 hristo-Inspiron-15-7000-Gaming gnome-shell[2083]: ATK Bridge is disabled but a11y has already been enabled.
юни 11 08:49:34 hristo-Inspiron-15-7000-Gaming <email address hidden>[2083]: unable to update icon for software-update-available
юни 11 08:49:34 hristo-Inspiron-15-7000-Gaming <email address hidden>[2083]: unable to update icon for livepatch
юни 11 08:50:35 hristo-Inspiron-15-7000-Gaming gnome-shell[2083]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
юни 11 08:52:42 hristo-Inspiron-15-7000-Gaming gnome-shell[2083]: libinput error: client bug: timer event9 debounce short: scheduled expiry is in the past (-26ms), your system is too slow
юни 11 09:07:17 hristo-Inspiron-15-7000-Gaming gnome-shell[2083]: libinput error: client bug: timer event9 debounce short: scheduled expiry is in the past (-26ms), your system is too slow
юни 11 09:12:29 hristo-Inspiron-15-7000-Gaming gnome-shell[2083]: libinput error: event9 - Logitech G603: client bug: event processing lagging behind by 33ms, your system is too slow
юни 11 09:12:29 hristo-Inspiron-15-7000-Gaming gnome-shell[2083]: libinput error: client bug: timer event9 debounce short: scheduled expiry is in the past (-21ms), your system is too slow

Revision history for this message
Zingam (registrirayme) wrote :

With:

1. Add this to /etc/environment: CLUTTER_SHOW_FPS=1

2. Reboot.

3. Watch the log: journalctl -f /usr/bin/gnome-shell

all sorts of values anywhere between 3.74 fps and 50fps when running vkcube from the Vulkan SDK and around 30fps when playing YouTube in Mozilla. I never saw 60fps (my monitor is capable of more than that).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

None of the log messages in comment #14 are relevant to this bug. Please see instead bug 1871262 and bug 1870597 about those.

We also don't need to discuss this bug 1970291 any more because its cause is fully understood: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2341

Revision history for this message
Zingam (registrirayme) wrote (last edit ):

On the same Monitor + mouse + keyboard setup: I connected another Dell Latitude

https://www.intel.com/content/www/us/en/products/sku/122589/intel-core-i78550u-processor-8m-cache-up-to-4-00-ghz/specifications.html

Intel® Core™ i7-8550U Processor with Intel® UHD Graphics 620

vs

Intel® Core™ i7-7700HQ Processor with Intel® HD Graphics 630 + NVIDIA GeForce 1050Ti

both systems are updated to the latest 22.04. The Intel only Latitude runs way, way smoother still.

This includes browsing with Firefox and YouTube videos play at higher resolutions in FF. On the Hybrid system FF switches to lower resolutions automatically.

Revision history for this message
gutopardini (gutopardini) wrote :

Tested with nvidia-graphics-drivers-515 and the problem persists.

Changed in nvidia-graphics-drivers-515 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
ELMX (elx-1) wrote :

Hi,

I would to share my case

I think is a environment variable we know DISPLAY and some xorg.conf tweaks (edid, modevalidation maybe)

under wayland i echo display like this:

echo $DISPLAY

it returns :1

Ihave built-in and an external monitor

echo $WAYLAND_DISPLAY ; returns
wayland-0

and

when i unset DISPLAY, under wayland games performance is better and less glitches ...

XWAYLAND_NO_GLAMOR=1 appears working right now

Any idea??

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That's not really related to this bug. But yes, some apps incorrectly prefer X11 over Wayland when both protocols are available. That's a bug in the app (or sometimes intentional), so please talk to the app developers.

Revision history for this message
ELMX (elx-1) wrote :

With my built-in monitor, wayland performs as good as xorg

I commented edid and modevalidation because my xorg log show a message about nvidia(g0) virtual size, different of my external display Native resolutions

Another info is that i cant modify display brightness in on-demand profile

I need to chance prime-select to nvidia and on BIOS chance it too

My BIOS appears to setup with other than _dsm function

Called:
nv DDS

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The cause of this bug is well known (https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2341) so we don't need to discuss it any more here. Although I feel you're also touching on other unrelated issues - please open new bugs for those.

Changed in mutter:
status: Unknown → Fix Released
no longer affects: nvidia-graphics-drivers-515 (Ubuntu)
affects: nvidia-graphics-drivers-510 (Ubuntu) → nvidia-graphics-drivers-525 (Ubuntu)
Changed in mutter (Ubuntu):
status: Opinion → Triaged
importance: Medium → High
Changed in nvidia-graphics-drivers-525 (Ubuntu):
importance: Medium → High
Changed in gnome-shell:
status: Unknown → New
Revision history for this message
Luis Alvarado (luisalvarado) wrote :

Wanted to update on this. I tested 525 and 530 and it has the same issue with 2 monitors. I will test 535 right now.

Revision history for this message
Syver Stensholt (7rst1) wrote :

I just tested with 535 and I still have this issue :(

Revision history for this message
gutopardini (gutopardini) wrote :

I also tested with Nvidia 535, but no solution. I will never have Nvidia again. Sorry for the rant but it's frustrating

Revision history for this message
ELMX (elx-1) wrote :

Is xwayland a nested-wayland cli session ...

Revision history for this message
ELMX (elx-1) wrote :

How work xwayland|wayland 'figthing' screen updates (hz)

a) wayland
b) both
c) xwayland 'exclusive'

Revision history for this message
ELMX (elx-1) wrote :

Xorg is fine till now

Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
no longer affects: nvidia-graphics-drivers-525 (Ubuntu)
Changed in mutter (Ubuntu):
status: Triaged → In Progress
importance: High → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

First prototype solution proposed here:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3304

Revision history for this message
mohammad (swing-team) wrote :

hope this one merges soon

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.