Bug 1889474 - External display laggy when using xorg, nouveau, hybrid mode with lid closed
Summary: External display laggy when using xorg, nouveau, hybrid mode with lid closed
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 33
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1816645 1816768
TreeView+ depends on / blocked
 
Reported: 2020-10-19 18:09 UTC by Mark Pearson
Modified: 2020-11-18 17:56 UTC (History)
19 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Mark Pearson 2020-10-19 18:09:11 UTC
1. Please describe the problem:
I know this is a weird combo of settings, but I've hit it and now a customer has too so I was hoping the RH engineers might have some insight.

Seen on systems with a Nvidia graphics cards (I've reproduced on P1G2, and a customer using Fedora has seen it on P15g)

If you use xorg instead of wayland (which in my case I have to use for screen share and running MS teams) then if the lid is closed the external display performance becomes really laggy. It doesn't seem to impact systems without an Nvidia card (at least from my limiting testing).

In my case booting in discrete mode solved the problem.

I couldn't spot anything obviously wrong in the kernel message logs. Let me know if there is anything else I should/could dig into


2. What is the Version-Release number of the kernel: 5.8.12


3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :
Not sure I'm afraid. I'll see if I can reproduce it on a different machine - the one I'm seeing it on is my daily driver so I don't want to mess around with it too much now I have it working.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:
Yes. 
Boot in xorg, discrete mode and close the lid.
Note - I used gnome hacks to disable the suspend on lid close (which I don't think it should do when an external display is on and powered on but that's a different issue)


5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:
Not tried yet

6. Are you running any modules that not shipped with directly Fedora's kernel?:
No

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.
I don't have these available right now, I will reproduce on another system and collect.

Comment 1 Mark Pearson 2020-11-18 16:33:57 UTC
As a note I reproduced this on the P15 with Fedora 33 latest in wayland, with hybrid mode. I have there only seen it with the nvidia driver, but the nouveau driver keeps crashing and doesn't work with an external monitor on my unit so I'm not sure how important that is.

- No obvious messages in the kernel log when switching between output only display and internal or shared.
- When external display is enabled (either external only or shared) the CPU utilisation for xorg goes up to ~40%. But the lagginess is seen only when in external only mode
- nothing controversial or useful in xrandr between modes
- I haven't confirmed with rawhide as the nvidia driver is a pain to install from there. But it is in 5.9.8 and importantly now in wayland which I hadn't seen previously. It means it's much more likely to be encountered by customers and is a bit less of a weird combo.

Let me know if there is anything useful I can collect as data

Mark

Comment 2 Mark Pearson 2020-11-18 17:56:05 UTC
I reinstalled F33 and confirmed I don't see the issue with Nouveau with the caveat that I can only enable external only with HDMI attached - it crashes with USB-c into a Thunderbolt port.

This seems to be Nvidia driver related at this point. I should really go and retest with my P1G2 but it's my daily machine so messing around with it is a bit of a pain :)

Mark


Note You need to log in before you can comment on or make changes to this bug.