Is there a way to get out of a frozen desktop?

Leap & KDE plasma5.

Yesterday my desktop froze several times (my system has been quite stable for the past week). None of the keystrokes that I am familiar with worked but I was able to go to a virtual terminal. When I went back to KDE with C-A-F7 I had a black screen and moving mouse arrow. The solution I used (did not try C-A-D) was to go to a virtual terminal and execute shutdown.

I did not think to examine some log files from the virtual terminal, I’ll do that if this happens again. Looking back in journalctl this is what I see prior to switching to a virtual terminal to shutdown

Dec 07 23:36:26 linux-shpr dbus[996]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service'
Dec 07 23:36:26 linux-shpr PackageKit[2165]: daemon start
Dec 07 23:36:26 linux-shpr dbus[996]: [system] Successfully activated service 'org.freedesktop.PackageKit'
Dec 07 23:36:27 linux-shpr PackageKit[2165]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
Dec 07 23:36:27 linux-shpr PackageKit[2165]: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh
Dec 07 23:36:27 linux-shpr PackageKit[2165]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
Dec 07 23:36:27 linux-shpr PackageKit[2165]: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh
Dec 07 23:36:58 linux-shpr PackageKit[2165]: refresh-cache transaction /1_eeacbeec from uid 1000 finished with success after 30901ms
Dec 07 23:36:58 linux-shpr PackageKit[2165]: refresh-cache transaction /2_adaaaade from uid 1000 finished with success after 18ms
Dec 07 23:36:59 linux-shpr PackageKit[2165]: get-updates transaction /3_eeedbddb from uid 1000 finished with success after 1051ms
Dec 07 23:37:16 linux-shpr PackageKit[2165]: daemon quit
Dec 07 23:37:16 linux-shpr packagekitd[2165]: (packagekitd:2165): GLib-CRITICAL **: Source ID 6 was not found when attempting to remove it
Dec 07 23:40:04 linux-shpr login[2384]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Dec 07 23:40:04 linux-shpr systemd[2393]: pam_unix(systemd-user:session): session opened for user root by (uid=0)
Dec 07 23:40:04 linux-shpr login[2384]: ROOT LOGIN ON tty2

Ctl-Esc and alt-F2 did not work for me. I did not know about C-A-backspace. I’d like to know if there are some other commands I can try if this happens to me again.

At the time of the crash I had several programs open in different windows, including firefox, dolphin, vBox, and liboffice spreadsheets.

The desktop has not crashed on me yet today and so at this point it is not repeatable.

My desktop crashed again. This is some additional info.
C-A-backspace did not appear to do anything. C-A-D produced some drive light activity but otherwise did not appear to do anything.

This crash occurred when closing a liboffice spreadsheet. I have used this program without problems almost daily since installing Leap, Friday was the last time I used it without a problem. This is tail of .xsession-errors-:0

KActivitiesStats( 0x2d84280 ) ResultModel::Private::onResultAdded  result added: "/home/jon/Documents/Spreadsheets/Fund holdings.ods" score: 0 last: 1449628826 first: 1449628826
QXcbConnection: XCB error: 3 (BadWindow), sequence: 36565, resource id: 18874756, major code: 18 (ChangeProperty), minor code: 0
kdeinit5: PID 5805 terminated.
kdeinit5: PID 5813 terminated.
kdeinit5: PID 5811 terminated.
kdeinit5: PID 5812 terminated.
Is net mobile: false
Is net online: true
Is on battery: false
Checking updates, forced: false
file:///usr/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/ui/BluetoothApplet.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/ui/BluetoothApplet.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/ui/BluetoothApplet.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
file:///usr/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/ui/BluetoothApplet.qml: QML Plasmoid: Cannot anchor to an item that isn't a parent or sibling.
Daemon changed
Is net mobile: false
Is net online: true
Is on battery: false
Checking updates, forced: false
Transaction status changed: "waiting-for-auth" "(101%)"
Transaction status changed: "waiting-for-auth" "(101%)"
Transaction status changed: "wait" "(101%)"
Transaction status changed: "waiting-for-auth" "(101%)"
Transaction status changed: "setup" "(101%)"
Transaction status changed: "setup" "(101%)"
Daemon changed
Transaction status changed: "wait" "(101%)"
Transaction status changed: "refresh-cache" "(0%)"
Transaction status changed: "finished" "(100%)"
Transaction "/1_bdedbaae" finished with status "success" in 29 seconds
Cache transaction finished successfully
Daemon changed
Transaction status changed: "setup" "(101%)"
Transaction status changed: "refresh-cache" "(0%)"
Transaction status changed: "finished" "(100%)"
Transaction "/2_cadbabeb" finished with status "success" in 0 seconds
Cache transaction finished successfully
Updates changed, getting updates!
Transaction status changed: "wait" "(101%)"
Transaction status changed: "setup" "(101%)"
Transaction status changed: "query" "(101%)"
Transaction status changed: "refresh-cache" "(0%)"
Transaction status changed: "finished" "(100%)"
Transaction "/3_eabdceea" finished with status "success" in 0 seconds
Check updates transaction finished successfully
Total number of updates:  0
Is net online: true
QXcbConnection: XCB error: 3 (BadWindow), sequence: 46953, resource id: 73400367, major code: 15 (QueryTree), minor code: 0
kdeinit5: PID 5822 terminated.
settingsFile:  "/home/jon/.recently-used"
settingsFile:  "/home/jon/.recently-used"
powerdevil: ACTIVE SESSION PATH CHANGED: "/"
powerdevil: Switched to inactive session - leaving unchanged
powerdevil: ACTIVE SESSION PATH CHANGED: "/org/freedesktop/login1/session/_310"

The last few lines are apparently when I switched to tty2 in order to execute a shutdown.

Do the entries offer any possibilities of what my problem is?

Frozen Desktop:

If X crashes, you can often recover from the crash, then restart X server without rebooting. You will, though, lose unsaved data in any GUI programs.

First thing to try is Ctrl-Alt-[backspace] twice.

Why twice? This is a failsafe move. Often, some users – particularly newcomers – would hit that key combination by mistake. Several Linux distributions have disabled that key combination for that reason, whereas openSUSE has it set to require confirmation – a second invocation of the key combination within a short period of time – to be certain it is not an accidental move.

Ctrl-Alt-[backspace] (twice in openSUSE) will kill and immediately restart the X server.

But this is an X server shortcut, so if X hangs in certain ways, it may not work.

In that case, try Ctrl-Alt-F1 (or another up to and including F6) to get to another virtual console. Ctrl-Alt-F7 will simply return you to the frozen X.

At the console, log in as root and execute one of the following:For gnome:

killall gdm

For kde:

killall kdm

If that fails in LEAP, try:

killall sddm

If your keyboard is locked up, you may not be able to use the Ctrl-Alt solutions above. If the system does not respond to the key-presses, it can be because the X server has taken control of the keyboard.

To get control of the keyboard back, try:

Alt-SysRq-r

Then try the Ctrl-Alt-F1 solution.

You could also use

Alt-SysRq-k

to kill all programs, including the X server.

Here is how to use the Alt-SysRq combination to cleanly restart your system. While holding Alt-SysRq, type the following key sequence, but pause for several seconds between each key:

reisub

Here is what it does:

  1. r puts the keyboard into raw mode, taking control of it away from the X server;
  2. e sends a signal to all processes to terminate gracefully;
  3. i sends the kill signal to all processes to immediately kill them;
  4. s flushes the data from your cache to the HD;
  5. u remounts all file systems read-only;
  6. and b reboots your computer.

Does any of this help?

ctrl-alt-backspace twice???

Things to try

If using default video driver try the proprietary driver. Which video card??
changing setting in the KDE screen settings
tray a different DM default is sddm maybe try kdm or lightdm

Well, that was what was how it was in use a couple versions back, last time I had to use it, AFAIR. This no longer the openSUSE norm?:wink:

Yep. Just tried, and it is still the same as late as 13.1, so I presume it is the same in 13.2 and LEAP.

However, I did discover that the Alt-SysRq has the r, e, & i options disabled, although the s, u, & b options will still work as outlined.

I imagine those have been disabled for security reasons. If a person wants them back, they can always enable them, but would have to do so consciously.

Gerry: Great info, I’ll be printing out that post for reference.

Gorgalthorp:
My video card is an ATI Radeon HD7570. After initial Leap install I was using fglrx. A few weeks ago I switched to default video driver (nouveau?). It proved more stable on my system. Until this weekend. Not certain, I am guessing the problem is with LibOffice. I am now accessing my spreadsheets via vBox and gnome 13.2 while I continue to search for info and watching for another crash to tell me it is NOT LibOffice.

My screen setting was openGL 2.0, I have just changed that to xrender.

thanks, jon

That worked perfectly. I opened a spreadsheet, made a change, saved it, and closed it. With only the file folder open on the desktop, the desktop was frozen.

Ctrl-Alt-[backspace] twice offered me a login screen and here I am.

Still wondering about libOffice causing this freeze that was not happening before this weekend.

Yes, and that is the real problem here that needs to be solved: What keeps locking you up?

It could be graphics related, as gogalthorp points out, often a prime suspect in such cases. It might even be a graphics card starting to fail (I had that happening on one of my Acer laptops a couple of years ago. First, random freezes, then eventually after several months or maybe even a year or two, no longer booting because of dead graphics module built into the motherboard.)

I have also seen such freezes because of a faulty memory module that developed problems after working fine for a long time, or even a badly seated one.

There are, of course, other things, including overheating (especially in laptops).

Good luck hunting down the problem. (…and, I am saying this with optimistic encouragement, so do not misinterpret this last sentence as suggesting it is hopeless! :))

BTW:

If you want to turn the r, e, & i options back on, just post back here and I will help you with that.

But it would not hurt for you to investigate the reasons why the devs have decided it is best to have those turned off by default.

If you do want that help, it depends on your current settings, so then post the output of

cat /proc/sys/kernel/sysrq

I started using openSUSE 42.1 LEAP with the Beta version and had only a few minor problems. But suddenly, after the final release version was in the repos, i got those desktop freezes: desktop would hang and no keyboard available except for Ctrl-Alt-Backspace (twice) or CTRL-Alt Fx.

The problem occurred on a machine with NVIDIA graphics as well as on a machine with Intel graphics. I tried disabling the compositor, but that did not help. In “.xsession-errors-:0” i found lots of errors which had something like “BadWindow” in it. Finally i found out:

When i use “org.kde.breeze” as window decoration every thing works fine. But when i choose “plastic” as window dekoration i am back to the problems mentioned above.

It might be purely coincidental but to me it helps.

Best regard

susejunky

This might actually be:
https://bugzilla.opensuse.org/show_bug.cgi?id=924764

The question is: Is only the desktop frozen? Can you work normally with other applications that are still open?
Does this also happen when you open LibreOffice normally from the menu, or only when open a document with LO?

Do you get such an error dialog? The desktop should unfreeze if you click on OK in this case.

Because C-A-BS is working for me I don’t think I should play with setting that important folks have deemed not for my use.
That said, the current setting is 184

I’ll need some time to better understand the bug report, thanks.

By frozen desktop I mean that nothing works except that I can move the mouse pointer. With previous desktop problems I could get a response from alt-F2 & ctl-alt. In the current problem those keystrokes do not work. I have not found anywhere on the screen where I could get a response to mouse clicks, I’ve tried the corners. Thankfully C-A-BS works when done 2x quickly.

I do not get an error dialog.

In journalctl I found this:

Dec 07 21:06:26 linux-shpr kernel: dolphin[22894]: segfault at b4 ip 00007efc6728c518 sp 00007ffddef076b8 error 4 in 
libQt5Core.so.5.5.0[7efc67151000+4c8000
Dec 07 21:06:32 linux-shpr kernel: traps: dolphin[22948] general protection ip:7fdd47f90518 sp:7ffc7aff9058 error:0 in 
libQt5Core.so.5.5.0[7fdd47e55000+4c80

Dec 08 22:33:59 linux-shpr kernel: kactivitymanage[1900]: segfault at 7f4a81645d10 ip 00007f4a8188c69a sp 00007ffc17bab7a8 error 4 in libQt5Sql.so.5.5.0[7f4a81877000+3f000]

You previously mentioned somewhere about removing .local\share\kactivitymanagerd and after posting this I will search for that info and see if that fixes my crashes.

I see there is a new fglrx, I’m currently using the xf86-video-ati (is that same as nouveau??) for my Radeon HD7570. I was using an earlier fglrx and removed it. For awhile things were very stable. Is it reasonable to try fglrx again?

Normally I open the spreadsheets by clicking on a Desktop folder view called Documents and accessing the files within. I did try opening the file using ‘LibreOffice Calc’ from the Application Menu and had similar problems. That was earlier and I will check this again to make sure my memory is correct.

That means that your system is not completely frozen. But can you still work with other open applications?

With previous desktop problems I could get a response from alt-F2 & ctl-alt. In the current problem those keystrokes do not work. I have not found anywhere on the screen where I could get a response to mouse clicks, I’ve tried the corners. Thankfully C-A-BS works when done 2x quickly.

Sounds like kwin (the window manager) is crashing then. DrKonqi (the crash reporter) freezes it then by attaching a debugger, which also prevents the screen from being updated.
As a test, try pressing Ctrl+Alt+F1, login in text mode and run:

killall -KILL kwin_x11

Then switch back with Ctrl+Alt+F7.

Is the system useable again then? The window decorations will be missing though, you can get them back by restarting kwin, e.g. press Alt+F2 and enter “kwin_x11”.

In journalctl I found this:

This is definitely unrelated.
The kactivitymanagerd crash is a known problem that might be fixed in 5.17.
But it doesn’t cause your desktop to freeze.

You previously mentioned somewhere about removing .local\share\kactivitymanagerd and after posting this I will search for that info and see if that fixes my crashes.

This might fix kactivitymanager and/or dolphin crashing, but won’t help with your desktop.

I’m currently using the xf86-video-ati (is that same as nouveau??)

No, this is not the same as nouveau.
nouveau is for nvidia cards only.

xf86-video-ati contains the open source radeon driver for ATI/AMD cards.

For awhile things were very stable. Is it reasonable to try fglrx again?

If it is a graphics driver problem, it might be worth a try, yes.
If indeed kwin is crashing, it might very well be a graphics driver problem.

But first try to disable compositing/desktop effects an see if that helps. You can do so either by Shift+Alt+F12 (that’s only temporarily), or in “Configure Desktop”->Display and Monitor->Compositing.

Normally I open the spreadsheets by clicking on a Desktop folder view called Documents and accessing the files within.

This could cause the desktop to freeze like in the mentioned bug report. But you should get an error dialog saying “KDEInit could not launch '/usr/lib64/libexec/kf5/kioexec” when you close LibreOffice, and the desktop should unfreeze when you click on “OK”.

I did try opening the file using ‘LibreOffice Calc’ from the Application Menu and had similar problems.

Then it’s probably a different issue. Although an incorrect menu entry could also cause such a freeze as per the bug report.
But again, you should get some error dialog then, and clicking on “OK” should make everything work normally again.

Additional info: I just tried LibreOffice Calc starting from the KDE Applications menu. I opened an existing spreadsheet, made a single edit, saved, closed the spreadsheet and then I was locked up as before. Below are responses to your last post. I will get back with more results.

Nothing that is open responds to keystrokes or mouse clicks. Nor can I open new apps.

Sounds like kwin (the window manager) is crashing then. DrKonqi (the crash reporter) freezes it then by attaching a debugger, which also prevents the screen from being updated.

OK, here is a short snippet from my most recent crash, don’t know if this is useful or not:

Dec 09 11:44:25 linux-shpr org.kde.kglobalaccel[14893]: The X11 connection broke (error 1). Did the X11 server die?
Dec 09 11:44:25 linux-shpr kernel: kactivitymanage[14959]: segfault at 7f3df5134d10 ip 00007f3df537b69a sp 00007ffce14e6a08 error 4 in libQt5Sql.so.5.5.0[7f
Dec 09 11:44:25 linux-shpr bluetoothd[1020]: Endpoint unregistered: sender=:1.176 path=/MediaEndpoint/A2DPSource
Dec 09 11:44:25 linux-shpr bluetoothd[1020]: Endpoint unregistered: sender=:1.176 path=/MediaEndpoint/A2DPSink
Dec 09 11:44:25 linux-shpr polkitd[1104]: Unregistered Authentication Agent for unix-session:17 (system bus name :1.172, object path /org/kde/PolicyKit1/Aut
Dec 09 11:44:25 linux-shpr sddm[1164]: Running display stop script  "/usr/share/sddm/scripts/Xstop"
Dec 09 11:44:25 linux-shpr sddm[1164]: Socket server stopped.
Dec 09 11:44:25 linux-shpr sddm[1164]: Removing display ":0" ...
Dec 09 11:44:25 linux-shpr sddm[1164]: Adding new display on vt 7 ...
Dec 09 11:44:25 linux-shpr sddm[1164]: Display server starting...
Dec 09 11:44:25 linux-shpr sddm[1164]: Running: /usr/bin/X -nolisten tcp -auth /run/sddm/{24f38c45-6c37-42df-947c-0ae029a88924} -background none -noreset -d
Dec 09 11:44:26 linux-shpr ca.desrt.dconf[14893]: g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on a
Dec 09 11:44:26 linux-shpr org.gtk.Private.MTPVolumeMonitor[14893]: g_dbus_connection_real_closed: Remote peer vanished with error: Error receiving message:
Dec 09 11:44:26 linux-shpr org.gtk.Private.GPhoto2VolumeMonitor[14893]: g_dbus_connection_real_closed: Remote peer vanished with error: Error receiving mess
Dec 09 11:44:26 linux-shpr org.freedesktop.Tracker1[14893]: Received signal:15->'Terminated'

Thank you for the kwin code, I’ll try that next and reply with results.

But first try to disable compositing/desktop effects an see if that helps.

Ok, done and will check the results.

This could cause the desktop to freeze like in the mentioned bug report. But you should get an error dialog

There is no dialog. I have seen that type of dialog in the past but not for this situation.

Thank you for the kwin kill commands.

This worked (disabling compositing had no noticeable effect). So where do I go from here?

This means, that it is indeed kwin crashing.

Have you tried whether you can reproduce this on a fresh user account already? Would rule out a problem with the user settings.

To investigate the crash further, open a konsole, kill kwin_x11, and run it again with “gdb kwin_x11” (type “run” to start it).
Then reproduce the crash, and type “bt” into the gdb “window”.

If you run into the same freeze you might have to disable the crash reporter first though (I’m not sure), by running “export KDE_DEBUG=1” before “gdb kwin_x11”.

Or see here: https://community.kde.org/KWin/Debugging

I find it a bit strange that this would only occur with LibreOffice though.
Is that so?
If yes, you might also try to uninstall LibreOffice’s desktop integration packages (libreoffice-kde4, libreoffice-gnome, libreoffice-gtk3) as a test. Especially the last one is known to cause problems.

And as susejunky indicated, the crashes might be caused by the window decoration. Which one are you using? If it’s Plastik, try to switch to Breeze instead.
Although personally I have no problem with Plastik either…

I never changed the window decoration and in fact had to look for it to understand what you were referring to. Anyway, it’s set to kde.org.breeze.

I have not tried a new user, I’ll check that. And thanks for the debugging instructions, I’ll try them.

I have been focusing my attention on LibreOffice Calc (rarely use the rest of the suite) because that is what I was using when I discovered this. And I have been very careful to have minimum apps open so that I don’t lose data. I’ll have to check to see if I can find other apps that cause this. I don’t seem to have this problem w/ Firefox & Tbird.

I created a new user and that user crashes when using libreOffice Calc. It’s a bit different, crashing more quickly and merely opening and closing the app can cause the crash, whereas with my existing user sometimes I may have to perform a save operation more than once before it crashes.

In the process of killing kwin from tty2, sometimes I cannot get alt-f2 to open krunner, but I can run krunner in kconsole. This is different from what I first reported where I was able to use alt-f2. At this time I have no consistency in whether or not alt-f2 works or not.

I followed your instructions for gdb but the freeze will not allow me to dump the stack. I did the export KDE_DEBUG=1 after killing kwin and before starting gdb. Also, I don’t have any debugging symbols. Should I install those?

I have tried all of your suggestions so far except for installing fglrx. Do you have any other thoughts?