<?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>476533</bug_id>
          
          <creation_ts>2023-11-04 02:39:37 +0000</creation_ts>
          <short_desc>[kdesrc-build Plasma 6] Pressing Esc no longer turns off the screen when locked</short_desc>
          <delta_ts>2024-01-24 20:19:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kscreenlocker</product>
          <component>general</component>
          <version>git-master</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>qt6, regression</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Prajna Sariputra">putr4.s</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>bharadwaj.raju777</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/kscreenlocker/-/commit/0b889fee8cf5080ea21fa5e90d32379b26d58de6</cf_commitlink>
          <cf_versionfixedin>6.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2263432</commentid>
    <comment_count>0</comment_count>
    <who name="Prajna Sariputra">putr4.s</who>
    <bug_when>2023-11-04 02:39:37 +0000</bug_when>
    <thetext>SUMMARY
With Plasma 6 set up using kdesrc-build and after getting around bug 476508 I found that pressing Esc does not turn off the screen when locked, and if the password field is on screen pressing Esc makes it act like I just pressed Enter, it says &quot;Unlocking failed&quot;, shakes the password field and then hides said field.

This is different from bug 466344 in that I don&apos;t get the issue in the distro installed Plasma 5.27.9, and in that other bug pressing Esc doesn&apos;t attempt to unlock the system like in my case.


STEPS TO REPRODUCE
1. Install Plasma 6 via kdesrc-build
2. Login
3. Lock the screen
4. Press Esc

OBSERVED RESULT
The screen does not turn off.

EXPECTED RESULT
The screen turns off.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.6.0
Kernel Version: 6.5.9-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 6800H with Radeon Graphics
Memory: 30.6 GiB of RAM
Graphics Processor: AMD Radeon Graphics

ADDITIONAL INFORMATION
kscreenlocker is at commit 6777145016231427cccb4721de1e469a1512715c when I compiled it.

Also, when I tried adding some QWarning calls at and around [1] and recompiling I see that the greeter did recognise that the Esc key was pressed, but it never gets to the `dpms-&gt;switchMode(KScreen::Dpms::Off)` call. I don&apos;t think it&apos;s an issue with DPMS not being supported since the the turn off screen keyboard shortcut works just fine, even when the screen is locked.

[1]: https://invent.kde.org/plasma/kscreenlocker/-/blob/6777145016231427cccb4721de1e469a1512715c/greeter/greeterapp.cpp#L619</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2263780</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-11-06 14:41:08 +0000</bug_when>
    <thetext>Can reproduce. Fallout from the recent KScreenlocker authenticator changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2264025</commentid>
    <comment_count>2</comment_count>
    <who name="Bharadwaj Raju">bharadwaj.raju777</who>
    <bug_when>2023-11-07 17:41:18 +0000</bug_when>
    <thetext>If I just add an unconditional `dpms-&gt;switchMode(KScreen::Dpms::Off);` before the connect call, it seems to work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2264541</commentid>
    <comment_count>3</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-11-09 21:39:18 +0000</bug_when>
    <thetext>Wanna submit it and see what happens?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2264573</commentid>
    <comment_count>4</comment_count>
    <who name="Prajna Sariputra">putr4.s</who>
    <bug_when>2023-11-10 00:47:47 +0000</bug_when>
    <thetext>I filed https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/176 to get rid of the evidently broken connect call and just turn off the screen directly. No idea what would happen on a system without DPMS support though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2279913</commentid>
    <comment_count>5</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2024-01-12 17:12:22 +0000</bug_when>
    <thetext>Bug 338796 got re-opened, so let&apos;s track it there since there&apos;s an open MR to fix it again.

*** This bug has been marked as a duplicate of bug 338796 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2282740</commentid>
    <comment_count>6</comment_count>
    <who name="Jakob Petsovits">jpetso</who>
    <bug_when>2024-01-23 22:27:07 +0000</bug_when>
    <thetext>Git commit 9aa3bd142370d8fa09f1c42b852ad54846f54260 by Jakob Petsovits, on behalf of Prajna Sariputra.
Committed on 23/01/2024 at 23:18.
Pushed by jpetso into branch &apos;master&apos;.

greeter: Fix pressing Esc to turn off the display

The updated KScreen::Dpms documentation guarantees isSupported()
to work right after construction, so use it without async instead
of the supportedChanged signal which doesn&apos;t get emitted anymore
during initialization.

M  +3    -5    greeter/greeterapp.cpp

https://invent.kde.org/plasma/kscreenlocker/-/commit/9aa3bd142370d8fa09f1c42b852ad54846f54260</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2282987</commentid>
    <comment_count>7</comment_count>
    <who name="Jakob Petsovits">jpetso</who>
    <bug_when>2024-01-24 20:19:30 +0000</bug_when>
    <thetext>Git commit 0b889fee8cf5080ea21fa5e90d32379b26d58de6 by Jakob Petsovits, on behalf of Prajna Sariputra.
Committed on 24/01/2024 at 21:16.
Pushed by jpetso into branch &apos;Plasma/6.0&apos;.

greeter: Fix pressing Esc to turn off the display

The updated KScreen::Dpms documentation guarantees isSupported()
to work right after construction, so use it without async instead
of the supportedChanged signal which doesn&apos;t get emitted anymore
during initialization.


(cherry picked from commit 9aa3bd142370d8fa09f1c42b852ad54846f54260)

M  +3    -5    greeter/greeterapp.cpp

https://invent.kde.org/plasma/kscreenlocker/-/commit/0b889fee8cf5080ea21fa5e90d32379b26d58de6</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>