Bug 469590 - Lag and doubled keystrokes when running SDDM in native Wayland mode with multiple screens and an NVIDIA GPU
Summary: Lag and doubled keystrokes when running SDDM in native Wayland mode with mult...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2023-05-10 17:35 UTC by Wilbur Jaywright
Modified: 2023-06-09 13:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output from command drm_info (112.55 KB, text/plain)
2023-05-16 15:38 UTC, Wilbur Jaywright
Details
Output from command drm_info while on login screen (114.25 KB, text/plain)
2023-05-16 18:42 UTC, Wilbur Jaywright
Details
Output from command drm_info at login with only one monitor with problem (113.95 KB, text/plain)
2023-06-07 20:13 UTC, Wilbur Jaywright
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wilbur Jaywright 2023-05-10 17:35:35 UTC
SUMMARY
When trying to log in, repeatedly SDDM has occasionally been very sluggish (1-2 FPS), and has even occasionally started recording one keystroke as multiple, making typing a password very difficult. This has happened on all kinds of instances where SDDM would launch, including on first boot. On at least two occasions, clicking the password field restored normal functionality. I should note that I do have a dual monitor setup.

STEPS TO REPRODUCE
1. Have a dual monitor setup on the same NVidia card (akmod-nvidia installed).
2. Boot without automatic login, or log out of a signed in account.
3. Move the mouse around. It may not happen every time, so you may have to try multiple times.

OBSERVED RESULT
The mouse and all UI elements except maybe the blinking cursor rare at 1-2 FPS, and trying to type the password may result in doubled keystrokes.

EXPECTED RESULT
No low FPS or sluggishness, and the keyboard functions normally.

SOFTWARE/OS VERSIONS
Windows: X
macOS: X
Linux/KDE Plasma: Fedora 38 spin Plasma
(available in About System)
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION
I am using an NVidia RTX 2060 SUPER with X-11.
Comment 1 Nate Graham 2023-05-15 19:25:53 UTC
Do you have multiple screens?

Is the sddm-wayland-plasma package installed, or is it sddm-x11?
Comment 2 Wilbur Jaywright 2023-05-15 19:34:00 UTC
Yes, I do have multiple screens, two to be exact. I did not manually install either of the mentioned sddm packages (unless they were a dependency), but I checked and they are both installed.
Comment 3 Nate Graham 2023-05-15 19:42:09 UTC
Can you remove sddm-x11 and reboot?

If that doesn't fix it, can you disconnect one of the screens and reboot, and see if that fixes it?
Comment 4 Wilbur Jaywright 2023-05-15 19:46:13 UTC
Uh, hol up, I'm sorry: sddm-x11 is NOT installed. My way of checking for it was to try and install it and see if I got the "is already installed" message. I did, but it was for sddm-wayland-plasma, which I guess is because dnf knows they do the same job. Since I am using X11 because I use NVidia, should I remove sddm-wayland-plasma and install sddm-x11?
Comment 5 Nate Graham 2023-05-15 19:48:20 UTC
For now, let's keep sddm-wayland-plasma.

Can you disconnect one of the screens and reboot, and see if that fixes it?
Comment 6 Wilbur Jaywright 2023-05-15 19:53:16 UTC
Tried it, that definitely is connected to the problem. Not only was it not sluggish booting with the other monitor disconnected, but it became sluggish as soon as the other monitor was reconnected while still on the login screen.
Comment 7 Nate Graham 2023-05-16 13:48:53 UTC
Ok, thanks. Moving to KWin, since KWin handles this when SDDM is running in native Wayland mode.
Comment 8 Zamundaaa 2023-05-16 13:58:19 UTC
Please attach the output of drm_info (https://gitlab.freedesktop.org/emersion/drm_info)
Comment 9 Wilbur Jaywright 2023-05-16 15:38:39 UTC
Created attachment 159004 [details]
Output from command drm_info

Here is the log. I will note that in one instance, even without multi-monitors, SDDM was sluggish for a few seconds, but it cleared up quickly.
Comment 10 Zamundaaa 2023-05-16 17:29:39 UTC
you have simpledrm and NVidia at the same time, which might explain the problem. Does your CPU have an integrated GPU, and did you change any kernel boot arguments?

Can you attach the output of drm_info executed while sddm is active? The simplest way to get that would be with ssh from another computer (or phone)
Comment 11 Wilbur Jaywright 2023-05-16 18:28:32 UTC
If my CPU does have an integrated GPU, I can't connect it to a display. I don't think I changed any kernel boot options. I do use OpenRGB.
Comment 12 Wilbur Jaywright 2023-05-16 18:39:44 UTC
Notably, when logging in via SSH, and not the GUI, I needed super user privileges to “retrieve information from /dev/dri/card0” and “card1”.
Comment 13 Wilbur Jaywright 2023-05-16 18:42:30 UTC
Created attachment 159011 [details]
Output from command drm_info while on login screen

Notably, I had to use sudo to run this without the GUI logged in.
Comment 14 Zamundaaa 2023-05-17 14:20:42 UTC
Did you have both monitors plugged in while getting that output, or only one?
Comment 15 Wilbur Jaywright 2023-06-01 19:31:58 UTC
Note, I am still having this problem with only one monitor, but it has been strictly of the kind where clicking on another user account icon clears it up.
Comment 16 Wilbur Jaywright 2023-06-02 18:30:27 UTC
Was having kind of similar issue in Wayland desktop. Now with no tablet connected and all background apps closed, I finally got a clean session running. Note that the background apps should NOT cause such performance lag.
Comment 17 Zamundaaa 2023-06-07 19:13:21 UTC
Please answer my question: did you have both monitors plugged in while getting the drm_info output, or just one of them?

If you don't remember, attaching a new output of drm_info while only having one display connected would also work
Comment 18 Wilbur Jaywright 2023-06-07 19:47:00 UTC
Pretty sure both monitors were connected. Will check again. Should I wait until the problem does occur to do it, though?
Comment 19 Wilbur Jaywright 2023-06-07 20:13:11 UTC
Created attachment 159524 [details]
Output from command drm_info at login with only one monitor with problem
Comment 20 Wilbur Jaywright 2023-06-07 20:13:45 UTC
Notably, the problem did not occur on first boot this time, only after logging back out.
Comment 21 Zamundaaa 2023-06-09 13:45:59 UTC
The drm_info output shows two outputs, one for the NVidia driver, the other for simpledrm - both attempting to control the same physical monitor. So this is a driver / distro setup problem.

I don't know too well where to start looking into this, but you can probably ask about this in https://discussion.fedoraproject.org/
Comment 22 Wilbur Jaywright 2023-06-09 13:57:30 UTC
Ah, too many cooks spoiling the broth, eh? All right, I’ll ask in said forum. Thanks.