Running X11 on KVM

NOOB ALERT: I'm just starting with FreeBSD coming from a Linux/Solaris background.

I am running a Fedora 19 x86_64 bit system with KVM as my virtualization platform. I successfully install 9.1 (64bit) and I am now trying to get KDE4 installed. I installed the following: pkg_add -r xorg kde4. And I added this in my /etc/rc.conf file

Code:
hald_enable="YES"
dbus_enable="YES"
local_startup="${local_startup} /usr/local/kde4/etc/rc.d"
kdm4_enable="YES"

I see this in the logs (it also displays on the console):

Code:
Sep 17 15:45:44 minion kdm[858]: Cannot create/lock pid file /var/run/kdm.pid 
Sep 17 15:45:44 minion kdm[874]: X server died during startup 
Sep 17 15:45:44 minion kdm[874]: X server for display :0 cannot be started, session disabled 
Sep 17 21:14:15 minion kdm[871]: Cannot lock pid file /var/run/kdm.pid, another xdm is running (pid 855) 
Sep 17 21:14:15 minion kdm[855]: X server died during startup 
Sep 17 21:14:15 minion kdm[855]: X server for display :0 cannot be started, session disabled

When I try to start X manually; this is what I get:

Code:
# Xorg -configure

X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 9.1-RELEASE amd64 
Current Operating System: FreeBSD minion 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 09 April 2013  01:53:06AM
 
Current version of pixman: 0.24.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Sep 17 21:20:37 2013
List of video drivers:
        radeon
        radeonhd
        r128
        openchrome
        nv
        mach64
        intel
        ati
        vesa
(++) Using config file: "/root/xorg.conf.new"


Xorg detected your mouse at device /dev/sysmouse.
Please check your config if the mouse is still not
operational, as by default Xorg tries to autodetect
the protocol.

Your xorg.conf file is /root/xorg.conf.new

To test the server, run 'X -config /root/xorg.conf.new'

# X -config /root/xorg.conf.new

X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 9.1-RELEASE amd64 
Current Operating System: FreeBSD minion 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 09 April 2013  01:53:06AM
 
Current version of pixman: 0.24.2
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Sep 17 21:22:12 2013
(++) Using config file: "/root/xorg.conf.new"
Segmentation fault: 11 at address 0x7c31e1084

Fatal server error:
Caught signal 11 (Segmentation fault: 11). Server aborting


Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

Here is the logfile:

Code:
X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 9.1-RELEASE amd64 
Current Operating System: FreeBSD minion 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 09 April 2013  01:53:06AM
 
Current version of pixman: 0.24.2
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Sep 17 21:23:25 2013
(++) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "X.org Configured"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
(==) Automatically adding devices
(==) Automatically enabling devices
(**) FontPath set to:
    /usr/local/lib/X11/fonts/misc/,
    /usr/local/lib/X11/fonts/TTF/,
    /usr/local/lib/X11/fonts/OTF,
    /usr/local/lib/X11/fonts/Type1/,
    /usr/local/lib/X11/fonts/100dpi/,
    /usr/local/lib/X11/fonts/75dpi/,
    /usr/local/lib/X11/fonts/misc/,
    /usr/local/lib/X11/fonts/TTF/,
    /usr/local/lib/X11/fonts/OTF,
    /usr/local/lib/X11/fonts/Type1/,
    /usr/local/lib/X11/fonts/100dpi/,
    /usr/local/lib/X11/fonts/75dpi/
(**) ModulePath set to "/usr/local/lib/xorg/modules"
(WW) AllowEmptyInput is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
(WW) Disabling Mouse0
(WW) Disabling Keyboard0
(II) Loader magic: 0x7bc480
(II) Module ABI versions:
    X.Org ANSI C Emulation: 0.4
    X.Org Video Driver: 6.0
    X.Org XInput driver : 7.0
    X.Org Server Extension : 2.0
(--) Using syscons driver with X support (version 2.0)
(--) using VT number 9

(--) PCI:*(0:0:2:0) 1b36:0100:1af4:1100 Red Hat, Inc. rev 4, Mem @ 0xf4000000/67108864, 0xf8000000/67108864, 0xfc054000/8192, I/O @ 0x0000c060/32, BIOS @ 0x????????/65536
(--) PCI: (0:0:6:0) 1af4:1002:1af4:0005 Red Hat, Inc Virtio memory balloon rev 0, I/O @ 0x0000c0a0/32
(II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
(II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
(II) "record" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri2" will be loaded. This was enabled by default and also specified in the config file.
(II) LoadModule: "dbe"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.0.0
    Module class: X.Org Server Extension
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "dri"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.0.0
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/local/lib/xorg/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.1.0
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "extmod"
(II) Loading /usr/local/lib/xorg/modules/extensions/libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.0.0
    Module class: X.Org Server Extension
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "record"
(II) Loading /usr/local/lib/xorg/modules/extensions/librecord.so
(II) Module record: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.13.0
    Module class: X.Org Server Extension
    ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "glx"
(II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.0.0
    ABI class: X.Org Server Extension, version 2.0
(==) AIGLX disabled
(II) Loading extension GLX
(II) LoadModule: "vesa"
(II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
(II) Module vesa: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 2.3.0
    Module class: X.Org Video Driver
    ABI class: X.Org Video Driver, version 6.0
(II) VESA: driver for VESA chipsets: vesa
(II) Primary Device is: PCI 00@00:02:0
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(II) Loading sub module "vbe"
(II) LoadModule: "vbe"
(II) Loading /usr/local/lib/xorg/modules/libvbe.so
(II) Module vbe: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.1.0
    ABI class: X.Org Video Driver, version 6.0
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Loading /usr/local/lib/xorg/modules/libint10.so
(II) Module int10: vendor="X.Org Foundation"
    compiled for 1.7.7, module version = 1.0.0
    ABI class: X.Org Video Driver, version 6.0
(II) VESA(0): initializing int10
(==) VESA(0): Write-combining range (0xa0000,0x20000) was already clear
(==) VESA(0): Write-combining range (0xc0000,0x40000) was already clear
(II) VESA(0): Primary V_BIOS segment is: 0xc000
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
Segmentation fault: 11 at address 0x7c31e1084

Fatal server error:
Caught signal 11 (Segmentation fault: 11). Server aborting


Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

I'm a FreeBSD noob... so not sure where to start to debug this. I think it has to do with KVM because I didn't have an issue with VirtualBox.

--C
 
Simply put you need to get a program to decompile the PCI headers in those memory sections it thinks are the offsets for the VESA routines. I just read that the utility mmiotrace is capable of following these routines and examining the actual stacks being executed in gdb. It's supposedly how they got the old Radeon cards to work on X11.
 
Would anyone share their xorg.conf for KVM? (I did it a few times, install freebsd FreeBSD (8.x/9.x) on KVM, but can not make the mouse work) I want try freebsd FreeBSD/desktop on KVM too. Thanks.
 
What is your GPU card? Look through lsof or something on linux. Then, check whether you have the correct driver installed and loaded from x11-drivers.
I could not find any info regarding your GPU card, and the xorg log shows that it did not recognize the card; most likely because the driver is missing.
 
Back
Top