Sudden issues in the past 2 weeks - cannot paste text, cannot log out or suspend

Hi all, I’m trying to resolve issues that came up sometime during the past 2 weeks. Its been a personally hectic time but I vaguely recall doing both kernel and plasma updates. Both issues seem unrelated but they showed up simultaneously so I’m not so sure.

System Specifications
Operating System: Fedora Linux 37
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.14-200.fc37.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 12th Gen Intel® Core™ i3-12XXX
Memory: 16 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 30XX/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B660M DS3H DDR4
NVidia Driver Version: 520.56.06

Cannot Paste
Edit: WORKAROUND FOUND
Bug occurs with combination of “MaxClipItems=1” and “NoEmptyClipboard=false” settings. If I remove either one, the issue stops happening
Source: 417590 – With MaxClipItems=1 NoEmptyClipboard=false, the second time you copy text after emptying the clipboard, you need to invoke "copy" twice
(For KDE Plasma, thats “History Size” under “Configure Clipboard”)

Paste is simply not working. Neither ctrl-v nor pasting from any context menu works.
Cut and Copy works as expected - text is removed as expected and texts show up on the Clipboard. I just somehow cannot paste it.

Somehow copying twice (sometimes thrice) resolves the issue and I can Paste as expected.

This issue has occurred in my browser, text editor and spreadsheets so I don’t think its application specific.

Cannot Log Out or Suspend
My system now hangs every time I log out (screen shows “Fedora” with a spinning circle). No alerts or error messages show on screen.

I’ve actually had issues with Suspend for around 3 months as this point, but logging out then suspending worked, so that was my workaround. Now that logging out is no longer working, and that restarting seemed like the only way to recover, I’m forced to do the full boot sequence each time.

For Suspend, things are more complex. If I suspend when logged in, it works like 25% of the time. If I suspend when logged out, it works all the time.
When I first switched to Fedora about 9 months ago, suspend did not work. I later found out that disabling “IOAPIC 24-119” was a possible solution and that worked for me. Around Dec 22, Suspend starting giving me issues.

I’m quite new to Fedora and Linux in general, especially in the troubleshooting department. Some sort of error log or trace is probably needed, I will need step by step guidance on how to get those. I’m okay with CLI but will prefer GUI options where possible. Thanks in advance for your time.

I believe this to be a interaction between Wayland and Xwayland apps.
You are running Plasma Wayland and the clipboard isn’t working to transfer data between Wayland <—> Xwayland.
If that’s the reason, you can switch to X11.

If that doesn’t fix it, your clipboard got broken for some other reason.

I believe that using clipboard related tools from other Wayland compositors (for example, wlroots-based on non-wlroots) might cause this kind of problem for to technical incompatibility, so please check for that.

Thanks for your reply.

Switching to X11 does seem to resolve the Paste issue. Its good to at least have a workaround, however, using Wayland is important to me and I actually specifically chose Fedora for its Wayland support. Hence switching to X11 is a non starter for me.

Considering Wayland is the default compositor for some time now, surely I can’t be the only one with this bug? I googled before making this topic but did not find anything, perhaps I’m using the wrong terms?

I found this random issue:

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

Can you check on Wayland if that “Prevent Empty Clipboard” option is enabled and disabling it fixes the issue?

Where can I find the “Prevent Empty Clipboard” option? I do not see it in the Clipboard Configuration, searching System Settings does not yield anything either.

Seems it’s in Klipper:

https://help.ubuntu.com/community/Klipper#Prevent_empty_clipboard

If you can’t find it, then no idea how to help with that specific issue since I don’t use KDE. So, the best I could do is point to KDE support channels.

This other issue I found might interest you as well:

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


Also, I have a few ideas about your suspend issue, I will write about it in a few but, quick spoiler, it’s likely due to s0ix.

I might have stumbled upon a workaround.

Previously In Configure Clipboard, my History size was set to 1, with the exact expression of “1Entry”. If changed to anything more than 2, it changes to “2 entries” (notice the space) and pasting works as expected. It might have been as simple as that value is parsed but either way it seems to work, will report back after a few days to see if its a long term workaround.

EDIT: Found this bug report - 417590 – With MaxClipItems=1 NoEmptyClipboard=false, the second time you copy text after emptying the clipboard, you need to invoke "copy" twice

Well, first my hypothesis is that you are having issues due to s0ix or “Modern Standby”.

Problem is, currently it has many problems! See this LTT video for more info:

Basically, usually suspend-to-disk would be S3 (and consume very little energy) and was basically handled by the firmware, but Intel decided to make laptops more like phones, so now we have S0ix, where the OS itself handles all the sleep and the computer is able to wake slightly faster (at the cost at just slightly more energy, assuming every single device was properly put in a low power state).

But, 1. on Windows Modern Standby can wake up at random because even Microsoft has issues debugging it, 2. Some manufacturers apparently removed S3 support in some devices in favor of S0ix, 3. You can bet that s0ix support on Linux will be way worse than on Windows.

So, for the suspend issue I believe you were migrated to s0ix but not everything on your system is working right.

So, first let’s check your sleep mode:

$ cat /sys/power/mem_sleep 
[s2idle] deep

s2idle means s0ix, if deep shows up you can force S3 sleep with a kernel parameter.

You probably have a message like this on logs as well:

kernel: Low-power S0 idle used by default for system suspend

If you are on s0ix, then all you can do is report bugs against the kernel (and pray it gets fixed someday), a BIOS update might not make much difference but you could apply them as well.

If you have deep showed up as supported on the command above, just add mem_sleep_default=deep to your kernel command line to have S3 sleep.

There’s also the chance you are forcing S3 sleep already and a BIOS update removed it to keep only S0ix, or otherwise the S3 sleep is borked, then it’s best to just remove that parameter.

I think that helps with the sleep side itself, I don’t know how to help you with what could possibly be KDE, the display manager or your GPU driver crashing.

Thank you so much for that detailed reply.

$ cat /sys/power/mem_sleep 
[s2idle] deep

Thankfully I have the same output.
I just did some reading up on mem_sleep_default=deep and I do not think that is the root issue.
My system can suspend, but only when I’m logged out. So there’s something that’s interfering or even hanging the system when I’m logged in. Now that I cannot even log out, my old workaround is not an option. FWIW, my system hangs when logging out even under X11.

It might be 2 separate issues, not being able to log out, and not being able to reliably suspend successfully when logged in.

No, no, I think you misunderstood it.

Modern Standby is bad and has lots of issues right now, if you have both S0ix and S3 sleep, S3 is likely to be more reliable.

To be actually able to have proper S0ix, Intel has a blog post: Open Ecosystem

And an accompanying tool: GitHub - intel/S0ixSelftestTool: S0ix Selftest Tool is designed to do the initial debugging for the S2idle path CPU Package C-state and S0ix failures in Linux OS for Intel® Client platforms, it also supports the basic runtime PC10 status check.

Ideally you would use the output of that tool and report to the kernel devs.

I see, I’m on a desktop and have not encountered my system waking up by itself. If anything, prior to disabling “IOAPIC 24-119”, I could not wake my system up from sleep. Furthermore, Sleep continues to work as expected if I’m logged out or have not yet logged in. It works unreliably when I’m logged in (only works about 25% of the time)

Is there a way to verify whether the system is using S0ix or S3 sleep?

Also found this good reference - Power management/Suspend and hibernate - ArchWiki

Yes, I actually had instructions for that on the previous reply.

Notice how there are brackets around s2idle? That’s the selected option. s2idle = S0ix, deep = S3.

Oh, I hadn’t read that page in the Arch Wiki in a while, I didn’t even know they had S0ix info there already.

I see, okay then yes I managed to changed the kernel params and it has survived several reboots. IT WORKS! I did 3 Sleeps in a row and it works, will report back again after several days just to be sure. Thank you again! This darn thing has been bugging me for several months now.

Oddly, Log Out is still not working. So I guess I had 3 separate issues afterall. But with Sleep working, Log Out is not as critical as before.

Now that you know that S3 sleep works better than S0ix, you should make a note of that to readd the parameter if you reinstall.

However, it should be a good idea to run the Intel tool I mentioned previously and make reports so the S0ix support is improved in your machine as well:

Consider taking some time to boot into S0ix version of sleep, run the tool and report to the kernel guys.

That’s probably either a broken session (logind?), broken display manager (ssdm?) or maybe even broken Plasma. I don’t think it’s likely to be GPU driver.

You can try looking at the logs for each of them.

logind should be systemctl status systemd-logind.service and should porbably have some useful info, you can have info for the display manager from systemctl status display-manager.service.

One of those two should at least return useful info.

If it’s the actual plasma binary that crashes, then you could try journalctl -b <binary path>.
I don’t know the binary path for plasma, but I know that for gnome-shell it’s journalctl -b /usr/bin/gnome-shell, so just find the equivalent.

Update: Sleep is still broken.

If I select Sleep from the “Start” menu (clicking the Fedora icon on bottom left), it works 90% (for now).
If selected from the ctrl-alt-del menu, Sleep works around 50% of the time.
If selected from the lock screen (where options are either login with password, or back to sleep), Sleep does not work all the time.

There seems to be 2 failure modes too.

I’ve had only 1 hard freeze so far, screen shows a bloated fedora icon (similar to when its using noveau drivers), no responses from mouse or keyboard lights, but the system is still running and fans are spinning.

Other failures have been recoverable. Monitor goes into power saving mode, system is running with fans spinning. A few seconds later I’m presenting with the lock screen. I’m then able to login normally and try Sleep again.

For context, in a successful sleep, I hear a click sound and fans stop almost immediately, when those are missing I know something is amiss.

I’m willing to post whatever logs that might be useful, just please do guide on what commands to use. I’m trying my best to describe what is happening but its more definitive to post logs.

systemctl status systemd-logind.service

output seems ordinary, no errors/warnings. I note that it only shows logs from the time I booted. The previous boot logs would be more useful in debugging a freeze during log out.

systemctl status display-manager.service

sddm-helper[1317]: gkr-pam: unable to locate daemon control file

is the only error seen.

journalctl -b /usr/bin/plasmashell

shows up many warnings (I presume yellow is warnings) about various things. Nothing obviously related to logout.
After removing plasmoid related warnings, I’m left with these.

plasmashell[1506]: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running.
plasmashell[1506]: If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable.
plasmashell[1506]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
plasmashell[1506]: org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout
plasmashell[1506]: libpng warning: iCCP: known incorrect sRGB profile
plasmashell[1506]: libpng warning: known incorrect sRGB profile
plasmashell[1506]: libpng warning: profile matches sRGB but writing iCCP instead

This message is harmless even when classified as an error.

In that case try journalctl -b -1 -u systemd-logind.service.
Basically you will be seeing the previous bit with -b -1 and -u allows to specify which units to get the logs from.

journalctl -b -1 -u systemd-logind.service did not yield anything interesting.

I however tried journalctl -b -1, posted below are the logs from the point (I think) of when the logout command was called, to the start of a coredump which is really long and hence not included.

Logout hanged journalctl logs
systemd[1322]: Started dbus-:1.2-org.kde.LogoutPrompt@3.service.
ksmserver-logout-greeter[12341]: libpng warning: iCCP: known incorrect sRGB profile
ksmserver-logout-greeter[12341]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
ksmserver-logout-greeter[12341]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
systemd[1322]: Started dbus-:1.2-org.kde.Shutdown@0.service.
systemd[1322]: dbus-:1.2-org.kde.LogoutPrompt@3.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: dbus-:1.2-org.kde.LogoutPrompt@3.service: Failed with result 'exit-code'.
kded5[1543]: X connection to :1 broken (explicit kill or server shutdown).
kaccess[1751]: The X11 connection broke (error 1). Did the X11 server die?
systemd[1322]: app-kaccess@autostart.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: app-kaccess@autostart.service: Failed with result 'exit-code'.
imsettings-daemon[1766]: [        48.508121]: IMSettings-Daemon[1766]: INFO: Stopped main process for IBus with the status 0 [pid: 2001]
kwin_wayland[1385]: QtDBus: cannot relay signals from parent QObject(0x5609200f59e0 "") unless they are emitted in the object's thread QThread(0x560920054438 "libinput-connection"). Current thread is QThread(0x56091>
plasmashell[1506]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_01_00.1.hdmi-stereo"
plasmashell[1506]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1f.3.iec958-stereo.monitor"
plasmashell[1506]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1f.3.iec958-stereo.monitor"
xdg-desktop-por[1430]: Error reading events from display: Broken pipe
kwalletd5[1340]: The Wayland connection broke. Did the Wayland compositor die?
kernel: snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 3
kded5[1481]: The Wayland connection broke. Did the Wayland compositor die?
kwalletd5[1340]: The Wayland connection broke. Did the Wayland compositor die?
systemd[1322]: xdg-desktop-portal-gnome.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: xdg-desktop-portal-gnome.service: Failed with result 'exit-code'.
plasmashell[1506]: The Wayland connection broke. Did the Wayland compositor die?
xdg-desktop-portal-kde[1546]: The Wayland connection broke. Did the Wayland compositor die?
kactivitymanagerd[1538]: The Wayland connection broke. Did the Wayland compositor die?
polkit-kde-authentication-agent-1[1544]: The Wayland connection broke. Did the Wayland compositor die?
polkit-kde-authentication-agent-1[1544]: The Wayland connection broke. Did the Wayland compositor die?
xdg-desktop-por[1617]: Error reading events from display: Broken pipe
org_kde_powerdevil[1545]: The Wayland connection broke. Did the Wayland compositor die?
kdeconnectd[1736]: The Wayland connection broke. Did the Wayland compositor die?
DiscoverNotifier[1757]: The Wayland connection broke. Did the Wayland compositor die?
konsole[12293]: The Wayland connection broke. Did the Wayland compositor die?
systemd[1322]: plasma-kactivitymanagerd.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: plasma-kactivitymanagerd.service: Failed with result 'exit-code'.
systemd[1322]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
systemd[1322]: plasma-powerdevil.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: plasma-powerdevil.service: Failed with result 'exit-code'.
polkitd[861]: Unregistered Authentication Agent for unix-session:2 (system bus name :1.64, object path /org/kde/PolicyKit1/AuthenticationAgent, locale en_SG.UTF-8) (disconnected from bus)
systemd[1322]: plasma-polkit-agent.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: plasma-polkit-agent.service: Failed with result 'exit-code'.
systemd[1322]: plasma-xdg-desktop-portal-kde.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: plasma-xdg-desktop-portal-kde.service: Failed with result 'exit-code'.
systemd[1322]: app-org.kde.kdeconnect.daemon@autostart.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: app-org.kde.kdeconnect.daemon@autostart.service: Failed with result 'exit-code'.
systemd[1322]: plasma-kded.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: plasma-kded.service: Failed with result 'exit-code'.
systemd[1322]: plasma-kded.service: Consumed 1.703s CPU time.
systemd[1322]: app-org.kde.discover.notifier@autostart.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: app-org.kde.discover.notifier@autostart.service: Failed with result 'exit-code'.
systemd[1322]: plasma-plasmashell.service: Main process exited, code=exited, status=1/FAILURE
systemd[1322]: plasma-plasmashell.service: Failed with result 'exit-code'.
systemd[1322]: plasma-plasmashell.service: Consumed 1min 33.851s CPU time.
systemd[1322]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 1.
systemd[1322]: Stopped target plasma-workspace-wayland.target.
systemd[1322]: Stopped plasma-powerdevil.service - Powerdevil.
systemd[1322]: Starting plasma-powerdevil.service - Powerdevil...
systemd[1322]: plasma-kwin_wayland.service: Consumed 42min 22.450s CPU time.
systemd[1322]: Stopped target plasma-workspace.target - KDE Plasma Workspace.
systemd[1322]: Requested transaction contradicts existing jobs: Transaction for graphical-session.target/stop is destructive (plasma-powerdevil.service has 'start' job queued, but 'stop' is included in transaction).
systemd[1322]: graphical-session.target: Failed to enqueue stop job, ignoring: Transaction for graphical-session.target/stop is destructive (plasma-powerdevil.service has 'start' job queued, but 'stop' is included i>
systemd[1322]: Stopped target plasma-core.target - KDE Plasma Workspace Core.
systemd[1322]: Stopped target xdg-desktop-autostart.target - Startup of XDG autostart applications.
systemd[1322]: Stopped target graphical-session-pre.target - Session services which should run early before the graphical session is brought up.
org_kde_powerdevil[12396]: Failed to create wl_display (No such file or directory)
org_kde_powerdevil[12396]: qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
audit[12396]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=12396 comm="org_kde_powerde" exe="/usr/libexec/org_kde_powerdevil" sig=6 res=1
org_kde_powerdevil[12396]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                                               
                                               Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
systemd[1]: Created slice system-systemd\x2dcoredump.slice - Slice /system/systemd-coredump.
audit: BPF prog-id=84 op=LOAD
audit: BPF prog-id=85 op=LOAD
audit: BPF prog-id=86 op=LOAD
systemd[1]: Started systemd-coredump@0-12400-0.service - Process Core Dump (PID 12400/UID 0).
audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@0-12400-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res>
systemd[1322]: plasma-polkit-agent.service: Scheduled restart job, restart counter is at 1.
systemd[1322]: plasma-plasmashell.service: Scheduled restart job, restart counter is at 1.
systemd[1322]: Stopped plasma-plasmashell.service - KDE Plasma Workspace.
systemd[1322]: plasma-plasmashell.service: Consumed 1min 33.851s CPU time.
systemd[1322]: Starting plasma-plasmashell.service - KDE Plasma Workspace...
systemd[1322]: Stopped plasma-polkit-agent.service - KDE PolicyKit Authentication Agent.
systemd[1322]: Starting plasma-polkit-agent.service - KDE PolicyKit Authentication Agent...
polkit-kde-authentication-agent-1[12406]: qt.qpa.xcb: could not connect to display
audit[12406]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=12406 comm="polkit-kde-auth" exe="/usr/libexec/kf5/polkit-kde-authentication-agent-1" sig=6 r>
polkit-kde-authentication-agent-1[12406]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
polkit-kde-authentication-agent-1[12406]: KCrash: Application '<unknown>' crashing...
polkit-kde-authentication-agent-1[12406]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                                                              
                                                              Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
systemd[1322]: plasma-polkit-agent.service: Main process exited, code=killed, status=6/ABRT
systemd[1322]: plasma-polkit-agent.service: Failed with result 'signal'.
systemd[1322]: Failed to start plasma-polkit-agent.service - KDE PolicyKit Authentication Agent.
systemd-coredump[12403]: [🡕] Process 12396 (org_kde_powerde) of user 1000 dumped core.

I believe this coredump to be important, as that is probably what crashed your system.

Could you try with coredumpctl and see if anything interesting pops up?

I believe you can have info for a specific coredump with coredumpctl info <id> and you probably should be able to report that issue with ABRT, but I don’t know how ABRT works on Fedora KDE.