# Can't start X on virtual private server using virtio



## James Harvey (May 10, 2015)

Installed FreeBSD 10.1.
Immediately upgraded to 10-STABLE.

`pkg install xorg`
`pkg install gnome3`

/etc/rc.conf:

```
moused_enable="YES"
hald_enable="YES"
dbus_enable="YES"
gdm_enable="YES"
gnome_enable="YES"
```

`reboot`

/var/log/Xorg.0.log:

```
X.Org X Server 1.14.7
Release Date: 2014-06-05
...
Current version of pixman: 0.32.6
...
X.Org ANSI C Emulation: 0.4
X.Org Video Driver: 14.1
X.Org XInput driver : 19.1
X.Org Server Extension: 7.0
(--)PCI:*(0:0:2:0) 1013:00b8:1af4:1100 rev 0, Mem @ 0xfc000000/33554432, 0xfebf0000/4096, BIOS @ 0x????????/65536
(==) Using default built-in configuration (30 lines)
... Driver "cirrus"
... Device "Builtin Default cirrus Device 0"
... Driver "vesa"
... Device "Builtin Default vesa Device 0"
... Driver "fbdev"
... Device "Builtin Default fbdev Device 0"
... No monitor specified for screen "Builtin Default cirrus Screen 0".
... No monitor specified for screen "Builtin Default vesa Screen 0".
... No monitor specified for screen "Builtin Default fbdev  Screen 0".
Missing output drivers.  Configuration failed.
...
(II) LoadModule: "cirrus"
(WW) Warning, couldn't open module cirrus
...
(EE) Failed to load module "cirrus" (module does not exist, 0)
...
(II) LoadModule: "vesa"
(WW) Warning, couldn't open module vesa
...
(EE) Failed to load module "vesa" (module does not exist, 0)
...
(II) LoadModule: "fbdev"
(WW) Warning, couldn't open module fbdev
...
(EE) Failed to load module "fbdev" (module does not exist, 0)
(EE) No drivers available.
(EE) no screens found(EE)
```

`pciconf -l | grep vga`

```
vgapci0@pci0:0:2:0:     class=0x030000 card=0x11001af4 chip=0x00b81013 rev=0x00 hdr=0x00
```

`dmesg | grep vga`

```
vgapci0: <VGA-compatible display> mem 0xfc000000-0xfdffffff,0xfebf0000-0xfebf0fff at device 2.0 on pci0
vgapci0: Boot video device
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
```

I'm on a virtual private server at vultr.com.  It appears to be a virtio(4) device, which supposedly is supported by the generic FreeBSD 10 kernel.

Upon advice found somewhere, after it wasn't working, tried:

/boot/loader.conf:

```
virtio_load="YES"
virtio_pci_load="YES"
virtio_blk_load="YES"
if_vtnet_load="YES"
```

Same error.  `Tried Xorg -configure`

Now, /var/log/Xorg.0.log:

```
X.Org X Server 1.14.7
Release Date: 2014-06-05
...
Current version of pixman: 0.32.6
...
X.Org ANSI C Emulation: 0.4
X.Org Video Driver: 14.1
X.Org XInput driver : 19.1
X.Org Server Extension: 7.0
(--)PCI:*(0:0:2:0) 1013:00b8:1af4:1100 rev 0, Mem @ 0xfc000000/33554432, 0xfebf0000/4096, BIOS @ 0x????????/65536
Missing output drivers.  Configuration failed.
```

*EDIT:*

`pkg install xf86-video-cirrus`

/var/log/Xorg.0.log:

```
...
(II) CIRRUS(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0
(EE) Illegal instruction at address 0x4a40f0
(EE)
(EE) Caught signal 4 (Illegal instruction).  Server aborting
```

*EDIT 2:*

Decided to try vesa instead of cirrus,

`pkg remove xf86-video-vesa`

```
...
xf86-video-vesa-2.3.3_5
xorg-drivers-7.7_3
xorg-7.7_2
...
pkg: cannot stat /usr/local/lib/xorg/modules/drivers/vesa_drv.so: No such file or directory
...
pkg: cannot stat /usr/local/man/man4/vesa.4x.gz: No such file or directory
```

`pkg install xf86-video-vesa xorg-driverx xorg`
`ll /usr/local/lib/xorg/modules/drivers/vesa`
(exists, 32792 bytes)
`reboot`


```
(--) Chipset CLGD5446 found
automatically using the cirrus drivers, not the vesa drivers
```

`pkg remove xf86-video-cirrus`
`reboot`

It's now using the vesa drivers.  But, still:

```
(EE) Illegal instruction at address 0x4a40f0
(EE)
(EE) Caught signal 4 (Illegal instruction). Server aborting.
```


----------



## SirDice (May 11, 2015)

James Harvey said:


> I'm on a virtual private server at vultr.com.  It appears to be a virtio(4) device, which supposedly is supported by the generic FreeBSD 10 kernel.


Yes, but only Ethernet, Block devices, SCSI and memory.


----------



## James Harvey (May 11, 2015)

Ahh, OK.  Makes sense now.  Can I enable graphical support?  Would that involve custom building a kernel?  If so, how do I enable virtio graphics in my custom kernel?


----------



## ljboiler (May 11, 2015)

SirDice said:


> but only Ethernet, Block devices, SCSI and memory.



Nothing about graphics mentioned there, nor in the virtio() man page either.

It appears there is nothing you could do with a custom kernel to get virtio graphics support, other than writing the necessary virtio driver code yourself.


----------



## James Harvey (May 12, 2015)

In case someone runs into this in the future... One way to go that worked for me is to make sure xauth is installed (if it doesn't work, remove it and reinstall it), edit sshd_config to allow X11 forwarding, and just use x forwarding from a local unix installation with its own x server.)


----------

