# unable to resolve problem with /dev/dri/card0



## Michael Faklis (Aug 19, 2022)

I am attempting to build a FreeBSD 13.1 system with Xorg as a Hyper-V virtual machine on a Windows 10 Pro host. Because of earlier failures I have defined this as a generation 1 VM. I have attached Card0.zip containing all of the files I will reference.

startx will not come up, I am getting a EE level error as shown in Xorg.0.log;

[ 4040.962] (EE) open /dev/dri/card0: No such file or directory

[ 4040.962] (WW) Falling back to old probe method for modesetting

[ 4040.962] (EE) open /dev/dri/card0: No such file or directory

[ 4040.962] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support

[ 4040.962] (EE) Screen 0 deleted because of no matching config section.

[ 4040.962] (II) UnloadModule: "modesetting"

[ 4040.962] (EE) Device(s) detected, but none match those in the config file.

[ 4040.962] (EE)

Fatal server error:

[ 4040.962] (EE) no screens found(EE)

I haven’t declared a card0 (in Screen.conf), instead I use ;

Device "vgapci0"

In my Screen.conf file, as that is the label shown when I queried the OS for PCI devices as shown in PCI Video Adapter.png.



*I been unable to resolve this existing problem with /dev/dri/card0, and request some assistance.*

The Card0.zip contains:

./boot/ loader.conf

./etc/ fstab, group, rc.conf, and sysctl.conf

./logs/ PCI Video Adapter.png (screen shot), Xorg.0.log.png (screen shot), and Xorg.0.log the complete textual log.

./xorg.conf.d/ contains all of the Xorg *.conf files

I have successfully built FreeBSD workstations and servers for over twenty years, and I’m not used to finding a problem I couldn’t resolve. I’ve built on repurposed hardware and Hyper-V. I scoured the FreeBSD Handbook, Man pages, support forums for solutions, but I’ve come up short.


----------



## VladiBG (Aug 19, 2022)

If you are using x11/xorg-minimal you need to remove it and install x11/xorg and then use the VESA driver or let the Xorg to autoconfig itself by removing all your xorg.conf.d config files.


----------



## Michael Faklis (Aug 20, 2022)

I have xorg-7.7.3, the X.org complete distribution metaport from FreeBSD 13.1 adm64.  I have attached a complete list of installed packages.


----------



## VladiBG (Aug 20, 2022)

Let xorg to auto detect your video driver or change your config to VESA.


----------



## Michael Faklis (Aug 21, 2022)

Well, now I have a GUI screen.  Unfortuantely I no longer have a keyboard or mouse upon Xorg starting up.


----------



## VladiBG (Aug 21, 2022)

Read my first post.
Remove Inputdevice.conf and Mouse0-buttons.conf from your xorg.conf.d
I would remove all config files from xorg.conf.d and let Xorg to detect all devices and only after that to start modify/add some my customizations.


----------



## Michael Faklis (Aug 22, 2022)

Thank you for reinforcing your original post.  I removed *.conf files from xorg.conf.d.
*startx didn't bring up Xorg*.  I still have the error:

_(EE) open /dev/dri/card0: No such file or directory_

I've attached the /var/log files.


----------



## VladiBG (Aug 22, 2022)

There's currently no driver for DRI that's why during the video card detection you see this error. The current option is to use VESA driver and ignore this error during the detection as it still will load the Xorg. Keep in mind that using VESA driver will result in low fps performance.
To have working keyboard/mouse you need `sysctl kern.evdev.rcpt_mask=6` or set it under /etc/sysctl.conf and you need to remove from your /etc/rc.conf all mouse related settings.

edit:
also remove kld_list="/boot/modules/i915kms.ko" from rc.conf as there's no support for this driver under Hyper-V

Here's the minimum working config for Xorg under Hyper-v gen1

/etc/rc.conf

```
hostname="g1"
ifconfig_hn0="DHCP"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
```

/etc/sysctl.conf

```
kern.evdev.rcpt_mask=6
```

`pkg install xorg-minimal xterm`
`xinit`





note: to fix the errors for the missing fonts install the full xorg instead of xorg-minimal or add xorg-fonts meta port.


----------

