Plasma is crashing after suspend since last big update

Ah, maybe not… I kind of skimmed it to be honest.

1 Like

O well it crashed again. Its not the kernel

Iv just realized its actually worse than just the panel, i actually just get a black screen. I never noticed before because i usually have a browser and other windows covering the desktop so i didn’t see it.

My god i hate this.

I am trying to just get it to reset the dam thing itself when i wakes but its almost impossible.

I tried
/usr/lib/systemd/system-sleep/myscript.sh

#!/bin/bash

case $1/$2 in
    pre/*)
        echo "$(date) - myscript.sh: Pre-suspend executed" >> /tmp/myscript-debug.log
        ;;
    post/*)
        echo "$(date) - myscript.sh: Post-resume executed" >> /tmp/myscript-debug.log
        plasmashell --replace > /dev/null 2>&1 &
        ;;
esac

it runs but it dont restart the plasma display

so next

#!/bin/bash

case $1/$2 in
    pre/*)
        echo "$(date) - myscript.sh: Pre-suspend executed" >> /tmp/myscript-debug.log
        ;;
    post/*)
        echo "$(date) - myscript.sh: Post-resume executed" >> /tmp/myscript-debug.log
        export DISPLAY=:0
        export XAUTHORITY=/home/greg/.Xauthority
        plasmashell --replace > /dev/null 2>&1 &
        ;;
esac

didnt work

tried adding xhost +SI:localuser:root didnt work

tried some code from the web

#!/bin/bash

case $1/$2 in
    pre/*)
        logger "myscript.sh: Pre-suspend triggered."
        ;;
    post/*)
        logger "myscript.sh: Post-resume triggered."
        
        # Identify the user and environment variables
        user="greg"
        env_reference_process=$(pgrep -u "$user" kdeinit | head -1)

        if [ -n "$env_reference_process" ]; then
            export DBUS_SESSION_BUS_ADDRESS=$(cat /proc/"$env_reference_process"/environ | grep --null-data ^DBUS_SESSION_BUS_ADDRESS= | sed 's/DBUS_SESSION_BUS_ADDRESS=//')
            export DISPLAY=$(cat /proc/"$env_reference_process"/environ | grep --null-data ^DISPLAY= | sed 's/DISPLAY=//')
        else
            logger "myscript.sh: Could not determine the environment variables for the user session."
            exit 1
        fi

        # Grant root access to the X session
        /usr/bin/xhost +SI:localuser:root

        # Restart Plasma
        sleep 2
        plasmashell --replace > /dev/null 2>&1 &
        logger "myscript.sh: Plasma reset command executed."
        ;;
esac

didnt work

Tried making a service

[Unit]
Description=Run a user command after suspend/resume
After=suspend.target

[Service]
Type=oneshot
User=greg
ExecStart=/bin/bash -c "sleep 5 && DISPLAY=:0 XAUTHORITY=/home/greg/.Xauthority plasmashell --replace"

[Install]
WantedBy=suspend.target

guess what

❱sudo systemctl status post-wake.service
× post-wake.service - Run a user command after suspend/resume
     Loaded: loaded (/etc/systemd/system/post-wake.service; enabled; preset: disabl>
     Active: failed (Result: core-dump) since Fri 2024-12-06 20:15:14 GMT; 28s ago
 Invocation: 9c642038777d4fc4ac1fb8de0bf4bcf5
    Process: 41045 ExecStart=/bin/bash -c sleep 5 && DISPLAY=:0 XAUTHORITY=/home/gr>
   Main PID: 41045 (code=dumped, signal=ABRT)
   Mem peak: 5.8M
        CPU: 75ms

Dec 06 20:15:08 greg-venusseries systemd[1]: Starting Run a user command after susp>
Dec 06 20:15:13 greg-venusseries bash[41045]: Authorization required, but no author>
Dec 06 20:15:13 greg-venusseries plasmashell[41045]: qt.qpa.xcb: could not connect >
Dec 06 20:15:13 greg-venusseries plasmashell[41045]: qt.qpa.plugin: From 6.5.0, xcb>
Dec 06 20:15:13 greg-venusseries plasmashell[41045]: qt.qpa.plugin: Could not load >
Dec 06 20:15:13 greg-venusseries plasmashell[41045]: This application failed to sta>
                                                     
                                                     Available platform plugins are>
Dec 06 20:15:14 greg-venusseries systemd[1]: post-wake.service: Main process exited>
Dec 06 20:15:14 greg-venusseries systemd[1]: post-wake.service: Failed with result >
Dec 06 20:15:14 greg-venusseries systemd[1]: Failed to start Run a user command aft>
lines 1-20/20 (END)

If anyone can help before i throw myself out of the window would be appreciated.

bug report out, thank god :slight_smile:

https://bugs.kde.org/show_bug.cgi?id=497204

I’m not professional in Manjaro, but maybe I can give some insight to that problem since I met it as well. After trying it appears that it is not sleeping nor freezing that leads to this problem. Just switch off the monitor and reopen it(If the PC is only connected to one monitor), something wrong seems to occur to plasma shell. But if manjaro sleeps and wakes within a short period of time (and the monitor is still on), everything goes on smoothly.
Below are my journal (with a few Chinese words, but I guess it doesn’t affect reading). It seems that plasmashell can’t find a monitor and goes wrong.

12月 13 01:12:20 plasmashell[30238]: kde.plasmashell: requesting unexisting screen available rect -1
12月 13 01:12:20 plasmashell[30238]: kde.plasmashell: requesting unexisting screen available rect -1
12月 13 01:12:20 plasmashell[30238]: kde.plasmashell: requesting unexisting screen available rect -1
12月 13 01:12:20 plasmashell[30238]: kde.plasmashell: requesting unexisting screen available rect -1
12月 13 01:12:31 plasmashell[30238]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
12月 13 01:12:39 plasmashell[30238]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml:136: TypeError: Cannot read property 'screenGeometry' of null
12月 13 01:12:39 plasmashell[30238]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml:250: TypeError: Cannot read property 'plasmoid' of undefined
12月 13 01:12:40 plasmashell[35439]: file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:178:25: QML FolderViewDropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth":
                                      file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:201:9
12月 13 01:12:40 plasmashell[35439]: Toolbox not loading, toolbox package is either invalid or disabled.
12月 13 01:12:40 plasmashell[35439]: org.kde.plasma.kicker: Entry is not valid "org.kde.kontact.desktop" 0x592d93417040
12月 13 01:12:40 plasmashell[35439]: org.kde.plasma.kicker: Entry is not valid "org.kde.discover.desktop" 0x592d93417040
12月 13 01:12:40 plasmashell[35439]: org.kde.plasma.kicker: Entry is not valid "org.kde.kontact.desktop" 0x592d93417040
12月 13 01:12:40 plasmashell[35439]: org.kde.plasma.kicker: Entry is not valid "org.kde.discover.desktop" 0x592d93417040
12月 13 01:12:40 plasmashell[35439]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml:50:9: QML KSortFilterProxyModel: Binding loop detected for property "sourceModel"
12月 13 01:12:40 plasmashell[35439]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml:50:9: QML KSortFilterProxyModel: Binding loop detected for property "sourceModel"
12月 13 01:12:40 plasmashell[35439]: qt.dbus.integration: Could not connect "org.cups.cupsd.Notifier" to PrinterFinishingsChanged(QString, QString, QString, uint, QString, bool) :
12月 13 01:12:40 plasmashell[35439]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
12月 13 01:13:40 systemd[800]: dbus-:1.2-org.kde.KSplash@3.service: Failed with result 'exit-code'.
12月 13 01:15:18 plasmashell[35439]: Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
12月 13 01:16:31 thunderbird[35704]: g_strv_length: assertion 'str_array != NULL' failed

and this is the result of inxi -b:

System:
  Host: xiaoh-minipcpn65 Kernel: 6.12.1-4-MANJARO arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.2.4 Distro: Manjaro Linux
Machine:
  Type: Mini-pc System: ASUSTeK product: MINIPC PN65 v: N/A
    serial: S5MSCG0030235VK
  Mobo: ASUSTeK model: PN65 serial: N/A UEFI: ASUSTeK v: 10600
    date: 01/24/2024
CPU:
  Info: 16-core (6-mt/10-st) Intel Core Ultra 7 155H [MST AMCP] speed (MHz):
    avg: 1526 min/max: 400/4800:4600:3800:2500
Graphics:
  Device-1: Intel Meteor Lake-P [Intel Graphics] driver: i915 v: kernel
  Display: unspecified server: X.Org v: 21.1.14 with: Xwayland v: 24.1.4
    driver: X: loaded: modesetting unloaded: fbdev dri: iris gpu: i915
    s-res: 1920x1080 resolution: 2560x1440
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.2.8-arch1.1
    renderer: Mesa Intel Graphics (MTL)
Network:
  Device-1: Intel Ethernet I226-V driver: igc
  Device-2: Intel Wi-Fi 7 AX1775 /AX1790 /BE20 /BE401/BE1750 2x2
    driver: iwlwifi
Drives:
  Local Storage: total: 476.94 GiB used: 77.38 GiB (16.2%)
Info:
  Memory: total: 16 GiB available: 15.37 GiB used: 5.66 GiB (36.8%)
  Processes: 406 Uptime: 1h 52m Shell: Sudo inxi: 3.3.36

I hope this may be of some help.

Yea, it seems that everyone in the bug report that i linked above is showing this particular log entry.

13 01:12:20 plasmashell[30238]: kde.plasmashell: requesting unexisting screen available rect -1

So if I was a betting man, I would put money on this line having some connection, if not directly pointing to the problem.

This likely resolves to a KDE bug:

or some variation.

Though, it could be something else entirely.

I just upgraded to Kernel 6.13 and it appears to be fixed

1 Like

The last stable update 2025-02-03T23:00:00Z

See → [Stable Update] 2025-02-04 - Kernels, KDE, XFCE, Mesa, Cosmic, Systemd