<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>429266</bug_id>
          
          <creation_ts>2020-11-17 21:34:31 +0000</creation_ts>
          <short_desc>Unplugging and replugging screen leads to configuration issues</short_desc>
          <delta_ts>2021-07-17 19:38:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>KScreen</product>
          <component>common</component>
          <version>5.20.3</version>
          <rep_platform>Neon</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>UPSTREAM</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Riccardo Robecchi">sephiroth_pk</reporter>
          <assigned_to name="kscreen-bugs-null@kde.org">kscreen-bugs-null</assigned_to>
          <cc>ongun.kanat</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1976129</commentid>
    <comment_count>0</comment_count>
    <who name="Riccardo Robecchi">sephiroth_pk</who>
    <bug_when>2020-11-17 21:34:31 +0000</bug_when>
    <thetext>SUMMARY
I have a laptop connected to a USB-C docking station, which is then connected to an external monitor using a DisplayPort cable. If I plug in the docking station at login time, the screen is enumerated as &quot;DisplayPort-4&quot;, but if I unplug and then re-plug the dock the screen becomes &quot;DisplayPort-5&quot; and loses all the associated configuration (e.g. panels, docks, wallpaper, etc). To be more correct, it does not use the configuration, as it is seen as a different screen; the configuration is not actually lost. Moreover, when I re-plug the USB-C cable I have to manually activate the screen, otherwise it is disabled.
If I plug in the dock after the login, then everything works as expected and unplugging and re-plugging the dock has no effect whatsoever on the screen as it should be.

STEPS TO REPRODUCE
1. plug in a display at login
2. unplug it after the login
3. re-plug it

OBSERVED RESULT
The screen is disabled and needs manual enabling in the settings; moreover, it &quot;loses&quot; the configuration with elements such as panels, docks and wallpapers not being shown.

EXPECTED RESULT
Re-plugging the screen leads to it working as it did before unplugging it.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon Focal 
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2006150</commentid>
    <comment_count>1</comment_count>
    <who name="Riccardo Robecchi">sephiroth_pk</who>
    <bug_when>2021-02-24 22:54:32 +0000</bug_when>
    <thetext>I found out in the intervening time that this issue can be avoided completely by getting to the login screen without the external monitor plugged in. Plugging it in after the login leads to everything working as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2014700</commentid>
    <comment_count>2</comment_count>
    <who name="Ongun Kanat">ongun.kanat</who>
    <bug_when>2021-03-12 00:32:03 +0000</bug_when>
    <thetext>I don&apos;t think this is a Plasma/KScreen bug. Probably a kernel or userspace driver bug. Because one can check xrandr and replugging will result in increment in the port number.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2015527</commentid>
    <comment_count>3</comment_count>
    <who name="Riccardo Robecchi">sephiroth_pk</who>
    <bug_when>2021-03-15 16:17:22 +0000</bug_when>
    <thetext>(In reply to Ongun Kanat from comment #2)
&gt; I don&apos;t think this is a Plasma/KScreen bug. Probably a kernel or userspace
&gt; driver bug. Because one can check xrandr and replugging will result in
&gt; increment in the port number.

It may indeed be an issue with the kernel or with the userspace driver, but the issue was not present before Plasma 5.19 and this is what has led me to file the bug here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2046014</commentid>
    <comment_count>4</comment_count>
      <attachid>139962</attachid>
    <who name="Ongun Kanat">ongun.kanat</who>
    <bug_when>2021-07-09 02:25:15 +0000</bug_when>
    <thetext>Created attachment 139962
The outputs before unplugging the dock

Sorry for the delayed response. Due to many hardware issues with my T14, I stopped using Linux as my main desktop OS. I booted my system and noticed the bug again and remembered this bug report so I decided to test it properly.

Hardware info: Thinkpad T14 AMD Gen 1 and Thinkpad USB-C dock Gen 2


This is definitely not a KDE / KWin / KScreen bug. To be sure, I decided to use a completely different software stack to test it. I used a wlroots based Wayland compositor, Wayfire [1]. With wlr based compositors, one can use wlr-randr utility in a similar way to xrandr. As it can be seen in the attachments the port organization changes after unplugging and replugging the dock.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2046015</commentid>
    <comment_count>5</comment_count>
      <attachid>139963</attachid>
    <who name="Ongun Kanat">ongun.kanat</who>
    <bug_when>2021-07-09 02:25:53 +0000</bug_when>
    <thetext>Created attachment 139963
The outputs after replugging the dock</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2047489</commentid>
    <comment_count>6</comment_count>
    <who name="Riccardo Robecchi">sephiroth_pk</who>
    <bug_when>2021-07-17 19:38:22 +0000</bug_when>
    <thetext>(In reply to Ongun Kanat from comment #4)
&gt; Created attachment 139962 [details]
&gt; The outputs before unplugging the dock
&gt; 
&gt; Sorry for the delayed response. Due to many hardware issues with my T14, I
&gt; stopped using Linux as my main desktop OS. I booted my system and noticed
&gt; the bug again and remembered this bug report so I decided to test it
&gt; properly.
&gt; 
&gt; Hardware info: Thinkpad T14 AMD Gen 1 and Thinkpad USB-C dock Gen 2
&gt; 
&gt; 
&gt; This is definitely not a KDE / KWin / KScreen bug. To be sure, I decided to
&gt; use a completely different software stack to test it. I used a wlroots based
&gt; Wayland compositor, Wayfire [1]. With wlr based compositors, one can use
&gt; wlr-randr utility in a similar way to xrandr. As it can be seen in the
&gt; attachments the port organization changes after unplugging and replugging
&gt; the dock.

Thank you for your effort! I&apos;m marking this as an upstream bug then.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>139962</attachid>
            <date>2021-07-09 02:25:15 +0000</date>
            <delta_ts>2021-07-09 02:27:13 +0000</delta_ts>
            <desc>The outputs before unplugging the dock</desc>
            <filename>before_replug.txt</filename>
            <type>text/plain</type>
            <size>1806</size>
            <attacher name="Ongun Kanat">ongun.kanat</attacher>
            
              <data encoding="base64">RFAtMyAiVW5rbm93biBVMjc5MEIgMHgwMDAwOTY1OCAoRFAtMykiCiAgUGh5c2ljYWwgc2l6ZTog
NjAweDM0MCBtbQogIEVuYWJsZWQ6IG5vCiAgTW9kZXM6CiAgICAzODQweDIxNjAgcHgsIDU5Ljk5
NzAwMiBIeiAocHJlZmVycmVkKQogICAgMzg0MHgyMTYwIHB4LCA2MC4wMDAwMDAgSHoKICAgIDM4
NDB4MjE2MCBweCwgNTkuOTM5OTk5IEh6CiAgICAzODQweDIxNjAgcHgsIDUwLjAwMDAwMCBIegog
ICAgMzg0MHgyMTYwIHB4LCAzMC4wMDAwMDAgSHoKICAgIDM4NDB4MjE2MCBweCwgMjkuOTY5OTk5
IEh6CiAgICAzODQweDIxNjAgcHgsIDI5Ljk4MTAwMSBIegogICAgMzg0MHgyMTYwIHB4LCAyNS4w
MDAwMDAgSHoKICAgIDM4NDB4MjE2MCBweCwgMjQuMDAwMDAwIEh6CiAgICAzODQweDIxNjAgcHgs
IDIzLjk3NjAwMCBIegogICAgMTkyMHgyMTYwIHB4LCA1OS45ODc5OTkgSHoKICAgIDI1NjB4MTQ0
MCBweCwgNTkuOTUxMDAwIEh6CiAgICAxOTIweDEwODAgcHgsIDYwLjAwMDAwMCBIegogICAgMTky
MHgxMDgwIHB4LCA1OS45Mzk5OTkgSHoKICAgIDE5MjB4MTA4MCBweCwgNTAuMDAwMDAwIEh6CiAg
ICAxNjgweDEwNTAgcHgsIDU5Ljg4Mjk5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tMSkiCiAgUGh5c2ljYWwgc2l6ZTog
MzEweDE3MCBtbQogIEVuYWJsZWQ6IHllcwogIE1vZGVzOgogICAgMTkyMHgxMDgwIHB4LCA2MC4w
MzMwMDEgSHogKHByZWZlcnJlZCwgY3VycmVudCkKICAgIDE2ODB4MTA1MCBweCwgNjAuMDMzMDAx
IEh6CiAgICAxMjgweDEwMjQgcHgsIDYwLjAzMzAwMSBIegogICAgMTQ0MHg5MDAgcHgsIDYwLjAz
MzAwMSBIegogICAgMTI4MHg4MDAgcHgsIDYwLjAzMzAwMSBIegogICAgMTI4MHg3MjAgcHgsIDYw
LjAzMzAwMSBIegogICAgMTAyNHg3NjggcHgsIDYwLjAzMzAwMSBIegogICAgODAweDYwMCBweCwg
NjAuMDMzMDAxIEh6CiAgICA2NDB4NDgwIHB4LCA2MC4wMzMwMDEgSHoKICBQb3NpdGlvbjogMCww
CiAgVHJhbnNmb3JtOiBub3JtYWwKICBTY2FsZTogMS4wMDAwMDAK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>139963</attachid>
            <date>2021-07-09 02:25:53 +0000</date>
            <delta_ts>2021-07-09 02:25:53 +0000</delta_ts>
            <desc>The outputs after replugging the dock</desc>
            <filename>after_replug.txt</filename>
            <type>text/plain</type>
            <size>1806</size>
            <attacher name="Ongun Kanat">ongun.kanat</attacher>
            
              <data encoding="base64">ZURQLTEgIlVua25vd24gMHg1NzNEIDB4MDAwMDAwMDAgKGVEUC0xKSIKICBQaHlzaWNhbCBzaXpl
OiAzMTB4MTcwIG1tCiAgRW5hYmxlZDogeWVzCiAgTW9kZXM6CiAgICAxOTIweDEwODAgcHgsIDYw
LjAzMzAwMSBIeiAocHJlZmVycmVkLCBjdXJyZW50KQogICAgMTY4MHgxMDUwIHB4LCA2MC4wMzMw
MDEgSHoKICAgIDEyODB4MTAyNCBweCwgNjAuMDMzMDAxIEh6CiAgICAxNDQweDkwMCBweCwgNjAu
MDMzMDAxI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