2
# uname -a
Linux kali 4.0.0-kali1-amd64 #1 SMP Debian 4.0.4-1+kali2
                                              (2015-06-03) x86_64 GNU/Linux

# uptime
 19:31:04 up 40 days,  4:38, 56 users,  load average: 6,52, 5,55, 6,08

Two days ago I've lost my internet connection. Two hours I've spent for solution and found that atop, which was started 40 days ago, had filled up /run, that is why xl2tpd ( My VPN client ) simply could not create pid-file. I've flushed atop's data and now:

# mount | grep run
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=3284232k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=1642116k,mode=700)

# df -h | grep -i run
tmpfs              3,2G         323M  2,9G           11% /run
tmpfs              5,0M            0  5,0M            0% /run/lock
tmpfs              1,6G          44K  1,6G            1% /run/user/0

I can not switch with Ctrl + Alt + F1 ( or F2, or F3, etc... ) to any /dev/ttyX. But I could switch before and F2, F3 was opened by me.

Furthermore, nor chvt 2 nor chvt 3, etc.... works...

Means, terminal shows vt7 with X-server and nothing changes, even no blinking or black-screen.

Seems, system goes unstable.

How to solve this trouble without reboot?

Update:

# ps -ef|grep tty
root       581     1 92 20:32 pts/3    01:33:03 /sbin/agetty tty3
root      1042  1012  6 Aug14 tty7     2-15:21:33 /usr/bin/Xorg :0 -novtswitch -background none -noreset -verbose 3 -auth /var/run/gdm3/auth-for-Debian-gdm-ZmbLAV/database -seat seat0 -nolisten tcp vt7
root      1690     1  0 20:33 tty4     00:00:00 /sbin/agetty --noclear tty4 linux
root      2842     1  0 19:22 tty6     00:00:00 /sbin/agetty --noclear tty6 linux
root      5245     1  0 20:37 tty2     00:00:00 /bin/login --           
root      8508  7895  0 Aug14 pts/34   00:00:00 /sbin/getty -8 38400 tty4
root      8511  7895  0 Aug14 pts/32   00:00:00 /sbin/getty -8 38400 tty2
root      8512  7895  0 Aug14 pts/33   00:00:00 /sbin/getty -8 38400 tty3
root     10127  7895  0 Aug14 pts/31   00:00:00 /sbin/getty -8 38400 tty1
root     11362     1  0 21:21 tty5     00:00:00 /sbin/agetty --noclear tty5 linux
root     17314     1  0 22:06 tty1     00:00:00 /bin/login --    
root     23282     1  0 22:13 pts/81   00:00:00 /sbin/getty 38400 tty2
root     23614     1  0 22:13 tty3     00:00:00 /bin/login --   
root     23620 22995  0 22:13 pts/81   00:00:00 grep tty
root     29744 29319  0 Sep17 pts/61   00:00:00 /sbin/getty -8 38400 tty4
root     29747 29319  0 Sep17 pts/58   00:00:00 /sbin/getty -8 38400 tty2
root     29748 29319  0 Sep17 pts/60   00:00:00 /sbin/getty -8 38400 tty3
root     31344 28620  0 Sep17 pts/53   00:00:00 /sbin/getty -8 38400 tty4
root     31347 28620  0 Sep17 pts/51   00:00:00 /sbin/getty -8 38400 tty2
root     31348 28620  0 Sep17 pts/52   00:00:00 /sbin/getty -8 38400 tty3
5
  • Does ps -ef|grep tty show anything? if it doesn't try running /sbin/getty 38400 tty1 and see if ctrl+alt+F1 works.
    – YoMismo
    Sep 23 '15 at 15:54
  • Have tried, no emotions. Silent. Sep 23 '15 at 16:14
  • I've repeated it with qemu: # qemu-system-x86_64 -boot d -enable-kvm -m 5G -cdrom kali-linux-2.0-amd64.iso -vga vmware, thereafter dd if=/dev/zero of=/run/test.zero. Thereafter tried to sendkey ctrl+alt+f1 or f2. everything works. May be filled-up /run - is not a cause.... Sep 23 '15 at 16:26
  • @YoMismo, is there way to send ctrl+alt+f1 directly to keyboard from shell? May be it is X or gnome locks sending... Sep 23 '15 at 18:24
  • I can see you're machine is virtualized, check this out blog.gnu-designs.com/….
    – YoMismo
    Sep 24 '15 at 6:21
1

When switching in or out of a console where an X server is running, the X server gets to run code. This is necessary to reset the video mode on the graphics card. If the X server is buggy, it's possible that the switch will never happen because X never responds to the request.

It looks like your X server is in a buggy state, possibly due to /run having been full at some point (maybe all memory was full and the X server ran out of memory and didn't cope well?).

What can sometimes work is to start another X server (by logging in over the network). This has a chance of restoring the graphics card to a known state and unblocking the already-running server. No guarantees though. If that doesn't work, try killing the X server and then starting a new one; you'll lose your desktop session but you won't have to reboot. Again, this is not guaranteed to work.

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.