[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
Fix Released
Unknown
Mutter
Fix Released
Unknown
mutter (Ubuntu)
Fix Released
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

CVE References

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

Revision history for this message
Zingam (registrirayme) wrote :

I am observing multiple issues with external monitor NVIDIA GPU in a Gnome session:

- Disconnecting HDMI cable crashes the desktop to login screen
- Desktop freezes for prolonged time when using VSCode and Firefox (the only opened applications), maybe also playing YouTube in the background or on the primary display.Sometimes the freez is complete sometimes it recovers.

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

Those issues are unrelated so please log a separate bug report for each one.

Revision history for this message
Zingam (registrirayme) wrote :

Thank you. I created two reports. The system experiencing the problems is similar to the one in this issue:

https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2050865
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2050866

Revision history for this message
Zingam (registrirayme) wrote :

I just switched from Ubuntu to macOS and everything is so much smoother on macOS with almost the same setup: a browser and a Visual Studio code. Scrolling, selecting text, typing, everything feels much smoother on the macOS. Is the jerkiness, the unsmooth mouse movement, text selection etc. related to this same issue? I don't have an FPS counter but it feels as if sometimes the FPS tanks into the ground on the Ubuntu machine.

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

We're tracking that in bug 2050866. If you have another different issue then please open a new bug.

Revision history for this message
ELMX (elx-1) wrote : Re: [Bug 1970291] Re: [nvidia] Secondary monitor performance is slow on an Nvidia hybrid system in Wayland sessions
Download full text (4.4 KiB)

better than webseed ("mutter")

On Fri, Sep 29, 2023 at 8:38 AM Daniel van Vugt <email address hidden>
wrote:

> First prototype solution proposed here:
> https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3304
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1970291
>
> Title:
> [nvidia] Secondary monitor performance is slow on an Nvidia hybrid
> system in Wayland sessions
>
> Status in GNOME Shell:
> New
> Status in Mutter:
> Fix Released
> Status in mutter package in Ubuntu:
> In Progress
>
> 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: ...

Read more...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in mutter (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 46.0-1ubuntu6

---------------
mutter (46.0-1ubuntu6) noble; urgency=medium

  * Rebuild for CVE-2024-3094

 -- Jeremy Bícha <email address hidden> Sun, 31 Mar 2024 10:24:22 -0400

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

Just out of curiosity. The issue is fixed in Mutter but the status in Gnome Shell is New? Does it mean it is partially fixed? How are these related in the bug report?

 ​
  GNOME Shell

New

Unknown

auto-gitlab.gnome.org-gnome-gnome-shell-- #6221


  Mutter

Fix Released

Unknown

auto-gitlab.gnome.org-gnome-mutter-- #2247

​ mutter (Ubuntu)
Fix Released

Medium

  Daniel van Vugt

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

It's complicated. You will at least need libmutter version 46.0 installed to get the fix for bug 1970291. But then you still have bug 2038801 slowing you down. That one can be solved by adding CLUTTER_PAINT=disable-dynamic-max-render-time to /etc/environment. Or just wait for libmutter 46.1 which I expect will have both fixes.

tags: added: fixed-in-mutter-46.1 fixed-upstream
Changed in gnome-shell:
status: New → Fix Released
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.