# Error output after using startx



## llpPc (Apr 22, 2020)

After a fresh install I am unable to get startx to initiate.  I have edited my xinitrc file to launch mate at start x.  I have edited my rc.conf file to include the latest Nvidia drivers and enable dbus.  I have also edited my /boot/loader.conf file to enable the Nvidia drivers.  I am not sure if there is a connection with my Nvidia drivers but I want to give a clear description of what I have done so far.  I have 2 photos showing my error output after executing startx and of the details in my xorg.0.log. This is what I signed up for.  I wasn't expecting it to be an easy transition.  I am done with windows, I was running manjaro Linux for a month or so, but I have no ties or biases.  I am very open to learning a new system.  Freebsd is installed to my hardware and I will commit to it.  

Unable to attach photos of error output. I apologize for this and I will get them in next post.  I thank everyone for their patience with me


----------



## llpPc (Apr 22, 2020)

Here are the photos of my errors


----------



## George (Apr 23, 2020)

It is really hard to read the xorg Log file.
I think it says "Error, failed to load module nv, module does not exist."


----------



## SirDice (Apr 23, 2020)

llpPc said:


> I have edited my rc.conf file to include the latest Nvidia drivers


Looks like you enabled the nv(4) driver (x11-drivers/xf86-video-nv), not the driver from x11/nvidia-driver. Those are two different drivers.


----------



## mickey (Apr 23, 2020)

llpPc said:


> I have edited my rc.conf file to include the latest Nvidia drivers and enable dbus.  I have also edited my /boot/loader.conf file to enable the Nvidia drivers.


Do not use both, /etc/rc.conf and /boot/loader.conf. The now preferred way of loading the nvidia driver is to add _nvidia-modeset_ to the _kld_list_ variable in /etc/rc.conf. Make sure it's there, then remove the _nvidia_*_ lines from your /boot/loader.conf and reboot the machine. Now check that the nvidia driver did get loaded during boot. The output of `dmesg | grep nvidia` should look somewhat like this:

```
nvidia0: <Unknown> on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  440.82  Wed Apr  1 19:39:35 UTC 2020
```
Next thing is to tell Xorg to actually use the nvidia driver. You need to create a configuration file, i.e. /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf:

```
Section "Device"
    Identifier "GTX-nnnn"
    Driver "nvidia"
EndSection
```
Also check /usr/local/etc/X11/xorg.conf as well as other *.conf files in the /usr/local/etc/X11/xorg.conf.d directory for anything that might conflict. If in doubt, move those files out of the way/rename to anything not ending in _.conf_

With everything in place, try `startx` and check /var/log/Xorg.0.log for any potential problems.


----------



## llpPc (Apr 23, 2020)

Wow thank you very much!  I will set everything up with these settings and give it a go then report back.


----------



## llpPc (Apr 23, 2020)

I did a fresh reinstall to orient myself and go step by step.  I did a pkg search for Nvidia drivers.  Should I pick the latest Linux version "linux-nvidia-libs-440.64" or should I install the nvidia-driver-440.64?


----------



## mickey (Apr 23, 2020)

llpPc said:


> I did a fresh reinstall to orient myself and go step by step.  I did a pkg search for Nvidia drivers.  Should I pick the latest Linux version "linux-nvidia-libs-440.64" or should I install the nvidia-driver-440.64?


You did not mention what model of nvidia graphics you are using. Latest driver version is 440.82 available in ports or latest packages. Quarterly packages will probably be somewhat behind that version. You can check https://www.nvidia.com/Download/driverResults.aspx/159361/en-us for models supported by 440.82. If your hardware is supported, all you should need is x11/nvidia-driver.


----------



## llpPc (Apr 23, 2020)

I am using a GeForce gtx Nvidia 1070.  Yes I know the latest drivers are 440.82 but during a pkg search the latest is 440.64. I don't mind pkgs being a little behind the latest and greatest.  For the type of gaming I do I don't need to be on the latest drivers, but if from your experience you feel it is better I install the latest from ports I will do that.


----------



## llpPc (Apr 24, 2020)

thank you thank you thank you to everyone that helped me!!  I was able to initiate startx and boot into a desktop environment.  Shout out to robonuggie who does YouTube videos on everything FreeBSD. He said the FreeBSD community was extremely welcoming and friendly.  You guys did not disappoint!!  So grateful


----------

