6

I'm using Ubuntu 10.10 with Gnome on Acer Aspire One netbook. The X11 or just some parts of Gnome like panels and partially windows (details described below) are frozen which doesn't allow to do anything with mouse (although the cursor can move, but clicking anywhere brings no results - panels are frozen (the clock is standing etc) and windows minimized), but generally the system, all processes (obviously except gnome shell) and hardware are working right - all leds (main hard disk, external swap disk, network) are blinking from time to time and there is a power supplied to USB ports so for example a keyboard is working and also some shortcuts like Super+D (minimizing and maximizing all windows but all I can see is only one blank window with plain surface and no contents displayed, the other windows I probably moved to another workspace with a shortcut or they are not showed due to the problem) but Ctrl+Alt+F[1-6] unfortunately not and I don't know the reason but I assume it probably never have been working before (I just had no opportunity to use it in the past and check if it works) even when it's pressed on external USB keyboard.

The things I already used to try are:

  • Firstly just waiting hoping that Gnome will handle it alone because it happened during doing some windows' actions like moving. minimizing and so on.
  • Secondly the shortcut Alt+F2 during the focus was on desktop and then typing certain commands to run (like trying to force playing some sound to ensure that system is reacting, xdotool to emulate shortcut opening tyy or just running sudo chvt) with no seeing what I'm doing and typing in hope that it's working in background but sadly it brings no effects.
  • Then some other Gnome's shortcuts but they are not working in such circumstances or I just can't see their results by now.
  • Finally I used to try to execute a bash script from pendrive with autorun.inf file inside - I'm aware that it couldn't run automatically after plugging in but as I suppose it should probably ask in dialog box what to do after detecting it and then I would try to allow execution trying to choose "run" option not seeing it but acting step by step from memory like I observed on the second machine and executing playing sound as a proof the system is alive and then try it with some more useful commands as I mentioned above but I have another computer with identical OS and configuration on which I verified it and it probably wouldn't ask - I assume that the frozen one would react in the same way - it just opens directory window when there is no autorun there or do nothing when autorun file exists and is detected - however please notice that the pendrive is mounted automatically - maybe it still would be helpful somehow.

The thing which I also tried is obviously Ctrl+Alt+F[1-6] but it's sadly not effective too. I have no idea why it doesn't work but I think there is no chance to fix it right now or maybe I don't know about something.

I'm looking for even extreme solutions - the point is how can I execute even small piece of code in such a case to execute chvt or xdotoll or eventually hibernate processes and copy RAM contents to external disk to secure unsaved data?

Is there a possibility or any even theoretical chance to get an access to the computer/tty through making direct connection via crossover network cable between two computers if I've never installed or configured anything related to it before now? Or is there any other way to make connection with the frozen computer to get a remote access and control it in my situation?

I have an external automatically mounting CD-ROM, maybe that could be used for something helpful? Moreover I can see and hear a reaction after plugging something to USB port because the hard disk start working hard for a moment.

The main aim is to open tty or run script with the same commands that I would typed there like as a first of all refreshing gnome-shell or then some other marked above because system is still working. That's why I believe that there exist more reasonable and less drastic methods than cold boot attack which I've just read about and there is no need to do it.

The computer will be working until I will find some satisfying solution allowing bringing back a stability or although save a RAM state which is just one line of code but I need to know the way to execute it.

-

EDIT: I've got a new idea - the 4GB swap partition is mounted and still working as well as system. The idea is to run something big which would need and use almost all RAM memory during the rest of processes are unused and sleeping, causing moving the rest of contents to the swap partition, then unplug the external USB drive which work as swap and then trying to extract some text strings from it. The computer has only 1GB of RAM so it may be possible. How about it? It's still a necessity to execute some code or commands but maybe is it possible to do it somehow with some shortcuts? I mean executing any active, hard working, RAM consuming processes. How do you rate a reasonableness and generally what do you think about it? How would I do it?

I forgot to mention that the computer is all the time connected to my WLAN and connection is not broken.

17
  • Is it like this no matter what? I.e., if you turn it off and reboot does the problem happen? It sounds kind of like the processor is busy looping.
    – goldilocks
    Jan 2, 2014 at 9:41
  • It's rather a problem related to Gnome. It happened for the first time like this, previously I've noticed some similar cases but everytime I somehow handled it. I don't want to restart it because of some unsaved data that I hope to save but I think it wouldn't occur after restart - now the computer has a very long uptime and it may be a cause of Gnome's problems. Before I have already noticed slow working during for example moving window. Now I would like to refresh/restart it but I see no way for that by now.
    – user277216
    Jan 2, 2014 at 9:54
  • I assume you have data open which needs to be saved? because if not, I would recommend just bringing the system down with SysRq. it'll be faster.
    – strugee
    Jan 2, 2014 at 10:10
  • 1
    For this to work you need a ssh (or telnet) server running on the machine you want to connect to. If you don't know the computer's IP address, I think you could scan then network with a tool such as nmap. I don't know much about networks myself. Anyway, does pressing Alt+SysRq+r and then Ctrl+Alt+F1 not work? Note: SysRq is the Print Screen key.
    – Ernest A
    Jan 2, 2014 at 16:26
  • 1
    @user277216 If I recall correctly you can also connect with a serial cable, but I've never done it myself. All Alt+SysRq+r does is take the control of the keyboard away from X. So when you press Ctrl+Alt+F1 the kernel itself, not the X server, will get the key codes and will switch to TTY1. I don't know if it's reversible. I don't see why it should be different from switching to a TTY from a non-frozen X server.
    – Ernest A
    Jan 2, 2014 at 18:38

3 Answers 3

2

GNOME cannot interfere with Ctrl-Alt-F[N], since this is caught by the kernel, which implements VT switching. I.e., those key events never reach userspace, which is why you/your DE/any DE cannot override them or use them for some other purpose.

So if you can't switch VTs, there is a system level issue. In my first comment I said this sounds like panicing/busy looping, which it does. However, having that last 8 hours is pretty weird -- my next thought is it is I/O failure. Since you are using ubuntu 10.10, I presume this is an older netbook and the problem is new, even though you are still running the same old software. You also mention the problem has happened before but perhaps has been getting more serious, which again points to (disk) I/O failure -- your harddrive is dying. This creates a very nasty, unavoidable snag if the root filesystem is involved.

Unfortunately, you won't be able to tell for sure until you can look at the system logs. Right now, even if you had sshd running, I suspect you would not be able to get in because, again, it's the whole system that's frozen.

You can try shutting down and rebooting (moral of story: save work frequently, and save to some backup medium -- cloud, usb stick, whatever -- often as well). If it really is disk failure, you may be lucky to get anything off the disk. If you can reboot, the first thing you should do is:

cd /var; tar -cjf log

Then save /var/log.tar.bz2 to something so you can look at the logs on another computer, because (once again) if it is disk failure, this one is not going to be much good until you replace it. You may be able to duct-tape the problem by running e2fsck -cc (see man e2fsck) on the partitions, but that requires mounting the disk without the system on it running (e.g., if you can boot a liveCD from the external CD-ROM).

2
  • Thanks for your answer. I'm pretty sure that the system is not frozen because it refused a SSH connection through WLAN, windows can move when I press SUPER + D and there are few other symphtoms which I noticed. Moreover, switching to TTY has never worked before so it can't be treat as a sign of the system's freeze. This is GNOME issue (assumption based on previous cases) so repairing a problem is a matter of finding a way to execute some commands which switch to TTY or directly refresh GNOME. Anywhay, whatever it is, I will try to fix it and inform you all about achived effects.
    – user277216
    Jan 3, 2014 at 11:04
  • 2
    The VT switching may still be broken, that's usually why SysRq + R is used, to turn off raw keyboard mode. Jun 30, 2016 at 10:38
1

As per the comment by Josip Rodin, this is what SysRq + R is used for. It turns off the raw keyboard mode to allow the kernel shortcuts Alt+Fx to work again. This assumes you already have SysRq enabled. The default varies between distributions.

https://www.howtogeek.com/119127/use-the-magic-sysrq-key-on-linux-to-fix-frozen-x-servers-cleanly-reboot-and-run-other-low-level-commands/

0

If you can't access the computer through the net (using telnet or ssh), can't switch to console then you have no way to communicate with the machine. That being said then Alt + F2 should bring up a run command window and you can type in some command there (like xterm and that should get focus right away, depends on your settings though) but not seeing what your typing and not really knowing if it is working kind of limits it's usability like you already found out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.