<?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>481026</bug_id>
          
          <creation_ts>2024-02-07 18:14:10 +0000</creation_ts>
          <short_desc>kscreenlocker fallback theme multimonitor race condition</short_desc>
          <delta_ts>2025-12-13 03:46:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>Screen locking</component>
          <version>6.2.4</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=481027</see_also>
    
    <see_also>https://bugs.kde.org/show_bug.cgi?id=433563</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>multiscreen</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Flesch">benjaminflesch</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>fanzhuyifan</cc>
    
    <cc>kdedev</cc>
    
    <cc>kubrick</cc>
    
    <cc>nate</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>2286986</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Flesch">benjaminflesch</who>
    <bug_when>2024-02-07 18:14:10 +0000</bug_when>
    <thetext>SUMMARY
***
When kscreenlocker fallback theme is used in a multimonitor setup, an instance of the fallback theme is created for each monitor. When authenticator.onPromptForSecret() signal is received every single instance receives this signal and sends the content of their password field via `authenticator.respond(password.text);`. 

In some cases, the instance with the password textfield that&apos;s been edited by the user is sent, and in some cases the empty password fields of an fallback instance on another monitor is sent first.

This creates a problem where the user types in the correct password, but the login still fails - which can lead to locking of their session (happened to me some times).
***


STEPS TO REPRODUCE
1. have a multimonitor setup
2. use fallback theme
3. type in password on one of the screens, press enter
4. sometimes, login fails even though you have typed in the proper password (verify with &quot;show password&quot; button on the password input box) - this is the race condition
5. once the race condition is met, you need to figure out which window is processed first and/or type in your password into the password field on each monitor to unlock again

OBSERVED RESULT
user gets locked out even though they have proper password

EXPECTED RESULT
no locking out and no race conditon

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.93

ADDITIONAL INFORMATION
In my theme I have fixed this issue by setting `Connections { target : authenticator; enabled: false }` for all lockscreen instances on monitors who don&apos;t have user interaction. In order to check for user interaction, I&apos;m using a `MouseArea { hoverEnabled: true; }` and a state transition for the lockscreen root element  like this: 

```
  states: [
    State {
      name: &quot;NoInput&quot;
      when: !myMouseArea.containsMouse
      PropertyChanges {
        target: myAuthenticatorConnection
        enabled: false
      }
    },
    State {
      name: &quot;ReadyForInput&quot;
      when: myMouseArea.containsMouse
      PropertyChanges {
        target: myAuthenticatorConnection
        enabled: true
      }
    }
  ] 
```

With this `mouseArea.containsMouse` hack you can prevent the race condition, because only the &quot;enabled&quot; connection will receive the signal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2286987</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Flesch">benjaminflesch</who>
    <bug_when>2024-02-07 18:16:37 +0000</bug_when>
    <thetext>I&apos;ve experienced this race condition with fallback lockscreen today on plasma v6 RC2 on a three monitor setup, one monitor via HDMI and two via DVI over an USB-C docking station (displaylink)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2286988</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Flesch">benjaminflesch</who>
    <bug_when>2024-02-07 18:20:49 +0000</bug_when>
    <thetext>can&apos;t seem to trigger it in the breeze lockscreen right now</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2286991</commentid>
    <comment_count>3</comment_count>
    <who name="">fanzhuyifan</who>
    <bug_when>2024-02-07 18:31:23 +0000</bug_when>
    <thetext>Where is the authorization triggered? It is possible to put a patch there so that it works for all themes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2288834</commentid>
    <comment_count>4</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2024-02-15 03:48:24 +0000</bug_when>
    <thetext>I think Ultimately the issue here is that the input fields should be synced, but they&apos;re not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2393775</commentid>
    <comment_count>5</comment_count>
    <who name="François Guerraz">kubrick</who>
    <bug_when>2025-01-30 10:30:54 +0000</bug_when>
    <thetext>Just checking, is this the bug where monitors go to sleep and then when waking up, displays are dark, and can be resolved by switching to a VT and back to KDE?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2470051</commentid>
    <comment_count>6</comment_count>
    <who name="TraceyC">kdedev</who>
    <bug_when>2025-11-13 18:19:54 +0000</bug_when>
    <thetext>Thanks for the bug report. I&apos;m sorry we weren&apos;t able to get to this yet. There have been many fixes and improvements since this was reported, and this issue may have been fixed.

Can you please re-test on your system with Plasma 6.5.2 or later and let us know if you can still reproduce the problem? If you can, please set this report back to CONFIRMED. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2473276</commentid>
    <comment_count>7</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2025-11-28 03:46:09 +0000</bug_when>
    <thetext>🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2476598</commentid>
    <comment_count>8</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2025-12-13 03:46:19 +0000</bug_when>
    <thetext>🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>