How to recover from desktop freeze without losing running windows?

23,115

I don't know what the Cinnamon guys renamed gnome-shell when they forked, so you'll have to find this out. It's probably either cinnamon-shell or cinnamon or something. I'll assume it's called cinnamon.

Now, the GNOME Shell - and by extension, Cinnamon - will respond to SIGHUP by completely reinitializing. It's basically the same as typing r into the AltF2 dialog. So, the solution is easy:

  1. Switch to a virtual console by pressing CtrlAltF21.
  2. Log in.
  3. Type killall -HUP cinnamon.
  4. Switch back to whatever virtual console was running Xorg.

It may take a couple seconds for Cinnamon to reinitialize.

1: This is a good choice as some distributions run display managers on tty1, some on tty7/tty8 (depending on the DM). No one uses tty2.

Share:
23,115

Related videos on Youtube

Adam Ryczkowski
Author by

Adam Ryczkowski

Updated on September 18, 2022

Comments

  • Adam Ryczkowski
    Adam Ryczkowski almost 2 years

    Sometimes VirtualBox causes random freeze of my Mint 16 Cinnamon Desktop 64bit. I am not able to pinpoint what is actually wrong and even where to fill the bug report.

    But the life goes on and I need some means of re-initializing the windowing subsystem without losing the work I've done with existing applications.

    • When I run sudo service mdm restart all the already running applications got killed brutally.

    • The cinnamon --replace -d :0 spell doesn't do anything; it just hangs. I guess it is because it need some form of co-operation with the already running cinnamon, which I guess doesn't respond to that.

    • Commands entered with Alt+F2 are ignored, as well as the "r" command used to restart the Cinnamon. The screen is not updated, and it seems that the very keystrokes are ignored.

    What are my other options?


    Symptoms of the freeze:

    The bug manifests by just freezing the screen update of the graphic terminal; the mouse moves alright, it even changes the icon when hovering over different parts of the screen. The problem is that I can't do anything with it; besides the screen doesn't update, and the keyboard don't do anything as well. But I can switch to the text console and I can see, that the windows' processes run well. I can event interact with the applications, that supply some form of cli interactions (like VBoxManage).

    To reproduce:

    1. Install the Linux Mint 16 with Cinnamon 2.0 64 bit
    2. Install a program that changes wallpaper (tested on variety, and wallch) and set it to start changing wallpaper as the background task.
    3. Wait for background to change several times. The bug doesn't kick in on the first background change, you need to wait a moment.
    4. On the .xsession.errors you will see something like that.

    Edit:

    I've updated the symptoms. The time went by and I was able to triage the problem a lot better. It is NOT related to VirtualBox activity in any way.

    • Admin
      Admin over 10 years
      Is Mint the host or the guest? Is the crash of the host system?
    • Admin
      Admin over 10 years
      More information could help here. Do the logs of cinnamon or the login manager (gdm / lightdm) give any hints? When do the freezes happen? What triggers them.
    • Admin
      Admin over 10 years
      Oh thanks for your interest. I did fill the bug with the linux mint, but I got exactly zero attention so far and I lost hope that it ever be solved. The problem is in the boundary between VirtualBox and Linux Mint, which itself consist of a lot of independent components, so I really don't event where to post the bug report.
    • Admin
      Admin over 10 years
      @XZS All logs present in the /var/log are silent about the event. The bug itself: bugs.launchpad.net/linuxmint/+bug/1257709 I try run the VirtualBox again and I will paste the syslog again (which should contain Cinnamon logs as well). To reproduce the bug it is enough to launch Virtual guest and wait for about 1 hour.
    • Admin
      Admin over 10 years
      @terdon Mint is the host. The crash is on the part of the host system.
    • Admin
      Admin over 10 years
      The "freeze" you describe sounds like something is busy looping the processor -- the whole system is slowed down to almost nothing because the CPU is maxed out. Do you have a monitor on your desktop that would indicate this? If not, get one. One which shows the top processes by CPU usage would be good too, because if you kill just that process, the freeze will thaw immediately.
    • Admin
      Admin over 10 years
      @goldilocks CPU is about 0%, and definitely none of its cores is maxed out. I'll add it to the description. (BTW I used sudo htop)
  • Adam Ryczkowski
    Adam Ryczkowski over 10 years
    I think I tried that already, but I'll try it again, to be sure. Anyway, I don't get any visual confirmation, when I press the keys (or Alt+F2 combination)
  • Adam Ryczkowski
    Adam Ryczkowski over 10 years
    Commands entered (blindly) with Alt+F2 combination are ignored; the r doesn't work as well... I have a vague sense, that the only blind interaction that can be done, is only with already present windows on the current display.
  • Adam Ryczkowski
    Adam Ryczkowski over 10 years
    I'll try that. The Ctrl+Alt+T wouldn't work, but I can try to start Muffin from within the text terminal.
  • Adam Ryczkowski
    Adam Ryczkowski over 10 years
    There is no Muffin nor muffin available to run; the last command yelds Muffin: command not found. BTW There is no Muffin on Linux Mint 15 Cinnamon 64 bit as well.
  • Startouf
    Startouf over 10 years
    Oh sorry.. I don't know what windows manager is using Mint.. And I couldn't find it googling.. If you know it try it again with the good one.
  • Adam Ryczkowski
    Adam Ryczkowski over 10 years
    I cannot either. Neither on Mint 15 (Cinnamon 1.8) nor on Mint 16 (Cinnamon 2.0). From what I can read on the Web I understand, that Muffin is indeed part of the cinnamon, but is never exposed as an independent, callable component.
  • Adam Ryczkowski
    Adam Ryczkowski over 10 years
    What is "Cerbere"?
  • Startouf
    Startouf over 10 years
    Cerbere is a tool used by Ubuntu to have apps that in case of crash or closing it, it will turn itself on. I use this for some parts of my system with several bugs, I simply then type : killall _mybugedapp_ and it will turn it on a few seconds then.. You can try to killall cinnamon if Muffin is a part of it, but I don't know what effects it will have as I don't use Mint.
  • Adam Ryczkowski
    Adam Ryczkowski about 10 years
    That sounds like a good idea. I ceased to use Cinnamon since I posted the question, so ATM I cannot verify it. If anyone else confirms your method works, I'll accept your answer.
  • terdon
    terdon about 10 years
    @AdamRyczkowski yes, this works. Cinnamon automatically restarts into fallback mode and you're presented with a dialogue asking whether you want to restart into normal mode. I cannot confirm that it works in the case of your bug though. I'm afraid it might not since it should really be the same as cinnamon --replace
  • RolandiXor
    RolandiXor almost 7 years
    It's not used by Ubuntu, it's used by elementary.