# I can't start X



## lapagalia (Oct 21, 2021)

I cannot start GUI. When I run 'startx' I get an error message:

```
> Fatal server error:
> (EE) no screens found(EE)
> ...
> xinit: unable to connect to X server: Connection refused
> xinit: unexpected signal 2
```
I have read many messages and texts about this problem, which from what I have seen happens to quite a few people. But I have not been able to solve it.

Here is some additional info:

```
# cat /boot/loader.conf
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
kern.vty=vt
agp_load="YES"
i915kms_load="YES"

# cat /etc/rc.conf
dbus_enable="YES"
hostname="freebsd"
keymap="en.acc.kbd"
ifconfig_bge0="DHCP"
ifconfig_em0="DHCP"
sshd_enable="YES"
dumpdev="AUTO"
zfs_enable="YES"
kld_list="nvidia i915kms"
linux_enable="YES"
```
I look forward to your help.
Thank you.


----------



## dd_ff_bb (Oct 21, 2021)

remove from loader.conf:

agp_load="YES" // i don't even think this is a option
i915kms_load="YES"


Decide if you have nvdia or intel graphics card:
kld_list="nvidia i915kms"

then use the proper one, ie for intel:
kld_list="i915kms.ko"

Edit: in case its not clear put the module in rc.conf not loader.conf


----------



## Alexander88207 (Oct 21, 2021)

Yep as dd_ff_bb have already said.

`i915kms_load="YES"` --> `kld_list="i915kms"`


----------



## George (Oct 21, 2021)

Add your user to the video group.


----------



## astyle (Oct 21, 2021)

Hopefully you have an easy-to-use text editor that can be used in a text console. Some people are gonna recommend EE or VI (both in base, like /bin/cat). I would recommend using editors/nano for the task. However, UNIX is not a religion, so let's not have a debate of which text editor is a better option. The goal here is to help OP edit the .conf files without distractions.


----------



## lapagalia (Oct 29, 2021)

dd_ff_bb said:


> remove from loader.conf:
> 
> agp_load="YES" // i don't even think this is a option
> i915kms_load="YES"
> ...


inxi -b says:

Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] driver: vgapci
Device-2: Apple FaceTime HD Camera
Display: server: X.org 1.20.11 driver: loaded: nvidia tty:240x67

It's a iMac, but I removed Mac and installed FreeBSD.

Which is the right driver?


----------



## astyle (Oct 29, 2021)

lapagalia said:


> inxi -b says:
> 
> Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] driver: vgapci
> Device-2: Apple FaceTime HD Camera
> ...


Why did you load the NVidia driver when your specs show AMD?

Your driver is `amdgpu`.


----------



## grahamperrin@ (Oct 29, 2021)

lapagalia said:


> inxi -b says: …



FreeBSD bug 259544 – sysutils/inxi falsely reports vgapci as the driver



astyle said:


> … `amdgpu`.



_Ellesmere_ is missing from <https://wiki.freebsd.org/Graphics/AMD-GPU-Matrix>, I'll request an update to the page. Update requested: <https://discord.com/channels/727023752348434432/760416197803245591/903924269837320223>


----------

