<?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>449948</bug_id>
          
          <creation_ts>2022-02-10 16:27:31 +0000</creation_ts>
          <short_desc>After kwin_wayland crashes and restarts or is manually restarted, Reboot, shutdown and logout do not work due to ksmserver relying on XWayland which also died and did not come back.</short_desc>
          <delta_ts>2023-12-12 23:25:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>ksmserver</product>
          <component>general</component>
          <version>5.24.0</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=442846</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>wayland-only</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Silva">bugseforuns</reporter>
          <assigned_to name="John Brooks">john</assigned_to>
          <cc>agurenko</cc>
    
    <cc>auxsvr</cc>
    
    <cc>bernie</cc>
    
    <cc>dev+kde</cc>
    
    <cc>devurandom+kde</cc>
    
    <cc>dkxls23</cc>
    
    <cc>grasm</cc>
    
    <cc>herzenschein</cc>
    
    <cc>john</cc>
    
    <cc>kishore96</cc>
    
    <cc>Linus</cc>
    
    <cc>lucia.mrenica</cc>
    
    <cc>me</cc>
    
    <cc>mistry01</cc>
    
    <cc>nate</cc>
    
    <cc>peter5leconte</cc>
    
    <cc>pfyu817</cc>
    
    <cc>pilotgi</cc>
    
    <cc>plasma-bugs-null</cc>
    
    <cc>post</cc>
    
    <cc>postix</cc>
    
    <cc>putr4.s</cc>
    
    <cc>sebastian.pb31</cc>
    
    <cc>tristang</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/-/commit/015652168e7e2949efde4ab2707ac72ef934ce96</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>2102939</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2022-02-10 16:27:31 +0000</bug_when>
    <thetext>SUMMARY
I use systemd startup if it matters.

STEPS TO REPRODUCE
1. use Wayland session
2. restart kwin_wayland by running &apos;kwin_wayland --replace&apos; with krunner
3. if Plasma is not automatically restarted, do it by running &apos;plasmashell --replace&apos; with krunner
4. try to reboot, shutdown or logout  via kickoff

OBSERVED RESULT
nothing happens. journalctl log prints these messages after the last step:

fev 10 13:05:55 Arch-PC dbus-daemon[632]: [session uid=1003 pid=632] Activating service name=&apos;org.kde.LogoutPrompt&apos; requested by &apos;:1.175&apos; (uid=1003 pid=7036 comm=&quot;/usr/bin/plasmashell --replace &quot;)
fev 10 13:05:55 Arch-PC dbus-daemon[7617]: writing oom_score_adj error: Permission denied
^X@sdfev 10 13:06:06 Arch-PC kwin_wayland[6788]: This plugin does not support raise()
fev 10 13:06:06 Arch-PC kwin_wayland[6788]: This plugin does not support raise()

EXPECTED RESULT
power options always work

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Graphics Platform: Wayland</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103036</commentid>
    <comment_count>1</comment_count>
    <who name="Vlad Zahorodnii">vlad.zahorodnii</who>
    <bug_when>2022-02-10 19:30:55 +0000</bug_when>
    <thetext>When you run kwin_wayland --replace, Xwayland will go down together with kwin. Unfortunately, ksmserver still requires X11, so it also goes down after running kwin_wayland --replace, i.e. the shutdown screen may not work as desired. Hopefully, this will be fixed with crash resilience changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103560</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-02-11 19:34:55 +0000</bug_when>
    <thetext>Sounds like the proper fix would be for ksmserver to not require x11; as there will never be a time when kwin_wayland will never crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2111896</commentid>
    <comment_count>3</comment_count>
    <who name="Bernie Innocenti">bernie</who>
    <bug_when>2022-03-19 04:04:44 +0000</bug_when>
    <thetext>Could bug #448517 be related to this one?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113657</commentid>
    <comment_count>4</comment_count>
    <who name="Dennis Schridde">devurandom+kde</who>
    <bug_when>2022-03-26 22:57:19 +0000</bug_when>
    <thetext>(In reply to Nate Graham from comment #2)
&gt; Sounds like the proper fix would be for ksmserver to not require x11; as
&gt; there will never be a time when kwin_wayland will never crash.

I noticed that Flatpak apps using X11 also hang indefinitely. Deleting /tmp/.X11-unix/X1 (and restarting them) resolves that. Just having ksmserver not depend on X11 seems not enough: kwin_wayland might need to be able to restart XWayland.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113754</commentid>
    <comment_count>5</comment_count>
    <who name="Dennis Schridde">devurandom+kde</who>
    <bug_when>2022-03-27 11:37:42 +0000</bug_when>
    <thetext>P.S. Is there a workaround? Can I somehow restart XWayland manually and make Flatpak apps and the logout dialogue work again?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2115934</commentid>
    <comment_count>6</comment_count>
      <attachid>148011</attachid>
    <who name="m1st0">mistry01</who>
    <bug_when>2022-04-07 01:22:36 +0000</bug_when>
    <thetext>Created attachment 148011
attachment-9976-0.html

** Removed at the request of the author **</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2115935</commentid>
    <comment_count>7</comment_count>
    <who name="m1st0">mistry01</who>
    <bug_when>2022-04-07 01:30:24 +0000</bug_when>
    <thetext>Any helpful relationship?

Xwayland crash in gdm as screen off and touchscreen detach.
https://bugs.launchpad.net/oem-priority/+bug/1948894</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2116016</commentid>
    <comment_count>8</comment_count>
    <who name="Ben Cooksley">bcooksley</who>
    <bug_when>2022-04-07 10:00:57 +0000</bug_when>
    <thetext>The content of attachment 148011 has been deleted</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117699</commentid>
    <comment_count>9</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-04-16 19:16:13 +0000</bug_when>
    <thetext>*** Bug 448517 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117701</commentid>
    <comment_count>10</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-04-16 19:16:24 +0000</bug_when>
    <thetext>*** Bug 450716 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117703</commentid>
    <comment_count>11</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-04-16 19:16:31 +0000</bug_when>
    <thetext>*** Bug 446143 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2118039</commentid>
    <comment_count>12</comment_count>
    <who name="Dennis Schridde">devurandom+kde</who>
    <bug_when>2022-04-18 20:16:40 +0000</bug_when>
    <thetext>Something possibly related came up in https://bugs.kde.org/show_bug.cgi?id=442846#c25</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2118092</commentid>
    <comment_count>13</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2022-04-19 07:52:38 +0000</bug_when>
    <thetext>&gt;Sounds like the proper fix would be for ksmserver to not require x11

No. It&apos;s sole job is an X11 session manager.

Bigger question is why it being missing prevents shutdown, it shouldn&apos;t. How are you shutting down exactly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2118195</commentid>
    <comment_count>14</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-04-19 15:00:47 +0000</bug_when>
    <thetext>Any method: click buttons in Kickoff or activate any of the session items from KRunner.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2125973</commentid>
    <comment_count>15</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-05-23 20:08:36 +0000</bug_when>
    <thetext>*** Bug 454071 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2126114</commentid>
    <comment_count>16</comment_count>
    <who name="Lucia Mrenica">lucia.mrenica</who>
    <bug_when>2022-05-24 08:13:19 +0000</bug_when>
    <thetext>Does installing xorg-xwayland-git from AUR fix this issue? It does for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2126272</commentid>
    <comment_count>17</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2022-05-24 15:45:49 +0000</bug_when>
    <thetext>(In reply to Matej Mrenica from comment #16)
&gt; Does installing xorg-xwayland-git from AUR fix this issue? It does for me.

Cannot confirm. The bug persists with xorg-xwayland-git from AUR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2126277</commentid>
    <comment_count>18</comment_count>
    <who name="Lucia Mrenica">lucia.mrenica</who>
    <bug_when>2022-05-24 15:55:06 +0000</bug_when>
    <thetext>(In reply to Patrick Silva from comment #17)
&gt; (In reply to Matej Mrenica from comment #16)
&gt; &gt; Does installing xorg-xwayland-git from AUR fix this issue? It does for me.
&gt; 
&gt; Cannot confirm. The bug persists with xorg-xwayland-git from AUR.

Do you know the exact steps that always trigger the issue for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2126280</commentid>
    <comment_count>19</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2022-05-24 15:58:18 +0000</bug_when>
    <thetext>1. start Plasma Wayland session
2. run &apos;kwin_wayland --replace&apos; with krunner</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2126282</commentid>
    <comment_count>20</comment_count>
    <who name="Lucia Mrenica">lucia.mrenica</who>
    <bug_when>2022-05-24 16:04:38 +0000</bug_when>
    <thetext>(In reply to Patrick Silva from comment #19)
&gt; 1. start Plasma Wayland session
&gt; 2. run &apos;kwin_wayland --replace&apos; with krunner

You are correct, the issue is NOT fixed by installing xorg-xwayland-git the steps above result in the issue described in OP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138913</commentid>
    <comment_count>21</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-07-13 19:51:14 +0000</bug_when>
    <thetext>*** Bug 456601 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2177652</commentid>
    <comment_count>22</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-11-25 17:45:44 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2364</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2177813</commentid>
    <comment_count>23</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-11-26 04:46:28 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2368</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2178038</commentid>
    <comment_count>24</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-11-26 13:49:33 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2369</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2188204</commentid>
    <comment_count>25</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-12-22 22:50:26 +0000</bug_when>
    <thetext>Fixed by David Edmunsdon with https://invent.kde.org/plasma/plasma-workspace/-/commit/c593897b80c9962c575f10391cabe4cf8fbc1fe0 in Plasma 5.27!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2270562</commentid>
    <comment_count>26</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2023-12-02 13:29:09 +0000</bug_when>
    <thetext>Can reproduce on Plasma 6 beta.

STEPS TO REPRODUCE
1. use Wayland session
2. restart kwin_wayland by running &apos;kwin_wayland --replace&apos; with krunner
3. invoke the logout screen by pressing ctrl+alt+del
4. choose Log Out, or Restart, or Shut Down

Result: nothing happens

Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Graphics Platform: Wayland</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2270730</commentid>
    <comment_count>27</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2023-12-03 02:48:13 +0000</bug_when>
    <thetext>*** Bug 477911 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2272390</commentid>
    <comment_count>28</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2023-12-08 22:35:09 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3672</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2273430</commentid>
    <comment_count>29</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2023-12-12 21:47:49 +0000</bug_when>
    <thetext>Git commit 015652168e7e2949efde4ab2707ac72ef934ce96 by David Edmundson.
Committed on 12/12/2023 at 22:32.
Pushed by davidedmundson into branch &apos;master&apos;.

plasma-shutdown: Continue on ksmserver errors

If ksmserver fails to respond to a shutdown request it is more important
to continue the user&apos;s request of shutting down than it is to bail out.

This comes up more often the legitimate case wayland where an xwayland
crash would leave ksmserver not running, but does not log the user out.
We want to move in the direction of ksmserver being optional on wayland.

M  +2    -2    startkde/plasma-shutdown/shutdown.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/015652168e7e2949efde4ab2707ac72ef934ce96</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>148011</attachid>
            <date>2022-04-07 01:22:37 +0000</date>
            <delta_ts>2022-04-07 01:22:37 +0000</delta_ts>
            <desc>attachment-9976-0.html</desc>
            <filename>attachment-9976-0.html</filename>
            <type>text/plain</type>
            <size>0</size>
            <attacher name="m1st0">mistry01</attacher>
            
              <data encoding="base64"></data>

          </attachment>
      

    </bug>

</bugzilla>