# x11vnc server randomly kills xorg server, no console

## Oo.et.oO

i've been running x11vnc server in my xorg install for years.

recently (sometime after my latest emerge world) when i'm logged in from a windows client (tightvnc), after some unknown and unpredictable amount of time the Xserver dies.  I don't get returned to the console at the physical machine, but i don't see any Xorg binaries in ps.  i can't get the console back, but i can ssh in just fine.  only way i know to get the xserver or physical console back is to reboot.

here is how i'm starting vnc server:

```
  x11vnc -display :0 -verbose -passwdfile /home/erict/.vnc/passwdfile -o /var/log/x11vnc.log -forever -xkb -nobell -bg -ncache 10
```

ideas?

ncache or not, it behaves the same.  

i see nothing at all helpful in the everything log nor the x11vnc log

----------

## Tatsh

I ran x11vnc for a long time (years) also. Since recent versions of X and use of KDE 4 I have given up on it. It also does not work with RealVNC Viewer on iPhone at all (and strangely, KRDC does not work with iPhone Veency (server) at all) either. At the moment that would be my only usage for it.

Hope you find a solution, but you should consider using SSH if you rely upon VNC to open a new console anyway.

Also, if x11vnc dies, you can restart it via SSH:

$ DISPLAY=:0 x11vnc &

----------

## Rexilion

These days I use vino which is the best VNC server I have ever used. I know, it's gnome (I use XFCE) but it's working very reliably for some reason. Will that help?

----------

## trooper_ryan

I've been getting this same problem for a couple of months now, drives me nuts and is almost the last straw for me before I leave gentoo.  (Maybe same issue on other distros, but who knows).

I've been using GNU screen to figure out the errors as I dont use a display manager to auto start at boot.

1.  After boot, login

2. Execute 'screen'

3. startx

When xorg crashes on me, I ssh to the box and execute:

4. screen -r

It shows errors like:

```
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1.0"

      after 636 requests (636 known processed) with 0 events remaining.

XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1.0"

      after 169 requests (169 known processed) with 0 events remaining. 

```

I've rebuilt all x11 related packages, and x11vnc, but still have nfi what the problem is.

You can restart X remotely via your ssh session: export DISPLAY=:0; startx & x11vnc

----------

## Rexilion

The :1.0 indicates that there are maybe two X-servers active when you login. That is weird, it should be :0.0 if I'm not mistaken. Maybe that's an indication of your problem.

Furthermore, some drivers (e.g. earlier versions of nouveau) are having 'a difficult time' with VNC-servers. Perhaps you could try switching to the mesa driver and see if that helps? Might not be perfect, but this is just to narrow down the problem. I think it's related to the kernel since you are unable to switch back to any of the other TTY's that should still work.

Also, after the 'crash': Do you see anything in dmesg?

----------

## trooper_ryan

Nice catch, but no there is only one X server running.  I wasn't running screen at the time of my post so just copied and pasted the error from someone else's post  :Smile: 

I'll look into drivers as I noticed xorg isnt loading my dri or dri2 drivers - but my experience is a little different than the OP.  If I walk to my console (tty) it is still active with the XIO error messages displayed and bash functioning.

There are never any errors in output from dmesg.Last edited by trooper_ryan on Mon Apr 04, 2011 12:02 pm; edited 1 time in total

----------

## Rexilion

Lawl ok...

If your kernel didn't die a horrible death. Perhaps you could also check /var/log/Xorg.0.log *after* it crashes. Might contain a pointer (or a backtrace) to the problem.

----------

