Bug 346535

Summary: KScreen does not detect external monitor the second time unless user logs out
Product: [Plasma] KScreen Reporter: talonx
Component: commonAssignee: Daniel Vrátil <dvratil>
Status: RESOLVED FIXED    
Severity: major CC: guillaume.debure, oecetinel, sebas, thuryn1, tromzy, xgdgsc
Priority: NOR    
Version: 1.0.2   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description talonx 2015-04-24 08:16:06 UTC
KScreen does not detect external monitor the second time unless user logs out

Reproducible: Always

Steps to Reproduce:
1. Login to KDE, without connecting the monitor
2. Connect the monitor. 
3. Go to Display Settings, I can see both the laptop and the external monitor. Successfully mirrored displays on both.
4. Unplug the external monitor from the laptop
5. Plug in the external monitor again. The external monitor does not show anything. Display Settings shows only the laptop.

This behaviour persists until I logout and login again. Then the same sequence of steps above can be repeated to replicate the problem.

Actual Results:  
KScreen does not persist the config for the external monitor

Expected Results:  
KScreen should persist the config for the external monitor
Comment 1 GSC 2015-09-20 13:11:32 UTC
Same here with archlinux kscreen 5.4.1-1. When I unplug the monitor, new launched applications still go to the external monitor, making the desktop unusable.
Comment 2 Simone Gaiarin 2015-10-13 08:38:54 UTC
Same on Plasma 5.4.2 on Manjaro.

I did the following tests:
- Dock the notebook when already on (two monitors attached to docking station)

I obtained these different results:
1. No external monitors detected
2a. External monitor detected but disabled and display "No resolutions available", so that it's not possible to activate them
2b. As 2a but a third non existent monitor is detected.

After I tried to logout, in the login screen all the three monitors are active, when I login all the three monitor are disabled. Also the notebook one.

To solve I login via a shell and removed all the kscreen config files. I tried to login again and it got stuck during the KDE/Plasma loading phase (still in the splash screen).

Then I rebooted and the three monitor are detected correctly automatically.

This will last until I'll put my notebook to sleep where all the configurations files will be screwed again.
Comment 3 Guillaume DE BURE 2016-01-04 16:36:12 UTC
Same here, attaching dmesg output in case it's useful for anything...

[21682.501703] usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd
[21682.517152] hub 4-1:1.0: USB hub found
[21682.517186] hub 4-1:1.0: 4 ports detected
[21682.735150] usb 3-1: new high-speed USB device number 5 using xhci_hcd
[21682.909529] hub 3-1:1.0: USB hub found
[21682.909567] hub 3-1:1.0: 4 ports detected
[21683.188758] usb 3-1.1: new low-speed USB device number 6 using xhci_hcd
[21683.287090] usb 3-1.1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[21683.289789] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1.1/3-1.1:1.0/0003:046D:C05A.0004/input/input40
[21683.290136] hid-generic 0003:046D:C05A.0004: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:14.0-1.1/input0
[21683.368857] usb 3-1.2: new low-speed USB device number 7 using xhci_hcd
[21683.484436] usb 3-1.2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[21683.484448] usb 3-1.2: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
[21683.494768] input: Chicony HP Elite USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1.2/3-1.2:1.0/0003:03F0:034A.0005/input/input41
[21683.545919] hid-generic 0003:03F0:034A.0005: input,hidraw1: USB HID v1.10 Keyboard [Chicony HP Elite USB Keyboard] on usb-0000:00:14.0-1.2/input0
[21683.556236] input: Chicony HP Elite USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1.2/3-1.2:1.1/0003:03F0:034A.0006/input/input42
[21683.609344] hid-generic 0003:03F0:034A.0006: input,hidraw2: USB HID v1.10 Device [Chicony HP Elite USB Keyboard] on usb-0000:00:14.0-1.2/input1
[21684.433416] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[21684.877596] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[21684.879416] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
Comment 4 Ömer 2016-05-26 10:37:26 UTC
Most of the Multi-screen issues are gone with this patch: https://git.reviewboard.kde.org/r/125451/ but this problem still seems to persist according to this: https://bbs.archlinux.org/viewtopic.php?pid=1629934#p1629934 Post.

So this is maybe not bug in KDE/Plasma?
Comment 5 tromzy 2016-05-27 08:40:53 UTC
Same problem here on up-to-date Arch Linux and I confirm the patch does not solve it.
Comment 6 Simone Gaiarin 2016-10-27 20:49:00 UTC
Fixed for me in Plasma 5.8.2.
Comment 7 Sebastian Kügler 2016-11-10 10:27:00 UTC
Thanks for confirmation!