Bug 461121

Summary: KWin fails to display output on 2nd external monitor
Product: [Plasma] kwin Reporter: Benjamin T <b.terrier>
Component: platform-drmAssignee: Benjamin T <b.terrier>
Status: RESOLVED WORKSFORME    
Severity: normal CC: b.terrier, nate, xaver.hugl
Priority: NOR    
Version First Reported In: 5.25.5   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: kscreen_backend_launcher logs
Result of `kscreen-doctor -o`

Description Benjamin T 2022-10-28 16:11:09 UTC
Created attachment 153265 [details]
kscreen_backend_launcher logs

SUMMARY

I have an XPS laptop with 2 externals monitor.
Since today, and after having updated some KDE packages, I cannot use 2 external monitors in plasma.
I can use one or the other, but not both at the same time.

I do not have this issue in tty, sddm3 or gnome.


STEPS TO REPRODUCE
1. Open "Display Configuration"
2. Select 1st external display and enable it
3. Click apply => works fine
4. On the dialog prompting if settings should be kept or reverted, select to keep the settings.
5. Select 2nd external display and enable it
6. Click apply... nothings happen

OBSERVED RESULT
When clicking "Apply" in step 6, the button Apply is greyed out.
But nothing else seems to happen, the dialog to ask use if changes should be kept or reverted is not displayed.
The 2nd display is effectively still disabled.

EXPECTED RESULT
The 2nd screen is effectively enabled and taken out of stand by.

SOFTWARE/OS VERSIONS
Kubuntu 22.04 + backport PPA
Linux: 5.15.0-48-generic
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Benjamin T 2022-10-31 10:36:05 UTC
After more investigation it seems linked to recent nvidia drivers.

nvidia-driver-470: OK
nvidia-driver-510: OK
nvidia-driver-515: OK
nvidia-driver-520: Bug
nvidia-driver-515-open: Bug
nvidia-driver-520-open: Bug

When using faulty drivers I have this in dmesg:

GPU 0000:01:00.0: RmInitAdapter failed! (0x63:0x0:1900)
NVRM: GPU 0000:01:00.0: rm_init_adapter failed, device minor number 0
[drm:nv_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to allocate NvKmsKapiDevice
[drm:nv_drm_probe_devices [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to register device

But again, only KDE/Plasma is affected: gnome (x11) and sddm3 can mae use of the 2 external monitors at the same time.
Comment 2 Benjamin T 2022-10-31 11:22:36 UTC
Ok, so I went a bit too fast with my last comment.
After I was done testing I tried to revert to one the working driver versions, but actually none of them worked anymore.
I could not make the 2 external monitors with any driver versions, regardless of the presence of the dmesg error.
I even tried to use nouveau without any success.

I tried upgrading to Plasma 5.25.5 using the backport-extra ppa, but it did not change anything.
Comment 3 Nate Graham 2022-11-10 18:04:18 UTC
Can you please Paste the output of `kscreen-doctor -o` before you click the Apply button, and then again afterwards? Thanks!
Comment 4 Benjamin T 2022-11-15 11:58:59 UTC
Created attachment 153762 [details]
Result of `kscreen-doctor -o`

Added the result of kscreen-doctor -o
With the USB hub connected on 2 different USB-C ports.

For both ports the output before and after clicking Apply are the same
Comment 5 Nate Graham 2022-11-15 18:27:42 UTC
Hmm, everything that was "enabled connected" in the Before output is still "enabled connected" in the After output. The outputs are identical. Which means KScreen appears to be doing the right thing here, and the issue is KWin failing to send video to the monitor. Moving to KWin.

Still probably an NVIDIA driver bug, but maybe we can work around it somehow...?
Comment 6 Zamundaaa 2023-08-02 11:36:22 UTC
Is this still happening with KWin 5.27.7?
Comment 7 Bug Janitor Service 2023-08-17 03:45:14 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Bug Janitor Service 2023-09-01 03:45:34 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!