# fresh 11.2 won't boot



## Rita G. (Aug 2, 2018)

fresh install of 11.2 stops booting before login screen.


----------



## k.jacker (Aug 2, 2018)

It didn‘t stop booting and it’s not a fresh install. It‘s just Xorg that didn‘t start.
You should be more precise when asking questions.

If you search the forum you‘ll find several threads on how to set up Nvidia driver and Xorg.


----------



## Rita G. (Aug 2, 2018)

gee thanks for calling me a liar, officer.
i'll drive a little slower next time i pass through here.


----------



## ShelLuser (Aug 3, 2018)

Instead of becoming all defensive (or offended) try thinking about what k.jacker actually said. He shared that for your own benefit, not to talk down on you or any of that nonsense.

Your topic says "11.2 won't boot", yet anyone who looks at your screenshot immediately sees that this is not the case. Your OS boots perfectly (otherwise you wouldn't get a login prompt). Trust me: this _will_ result in plenty of people simply dismissing this thread and not paying it any further attention.

Sharing wrong details only hurts your chances of getting a solid answer to help you get going. And details are important within tech, especially when trying to solve problems. So if someone tells you all that there's really no need to get all offended. In fact; the other outcome would be for them to totally ignore the post.

Not to mention people getting less motivated to lend a helping hand.


----------



## nihr43 (Aug 3, 2018)

OP you probably need to get nvidia-driver from ports instead of pkg, and then pkg lock it it until the issue is actually resolved.  A lot of other people are having this problem on 11.2.


----------



## Rita G. (Aug 3, 2018)

The driver is installed. The problem is it wont boot to the login screen.


----------



## nihr43 (Aug 3, 2018)

nihr43 said:


> OP you probably need to get nvidia-driver from ports instead of pkg



So uninstall it, and reinstall it like this.


----------



## scottro (Aug 3, 2018)

Wow. You were politely told you were in error, which happens. Everyone is a beginner at someone else's craft,  said a character from a medieval mystery series I once read.  

I should make a little page on this, because I keep repeating it.   (Or book mark one of my posts).
1. Currently, (but not CURRENTLY--hehe) Nvidia drivers must be installed from ports.  This has to do with the package
still working with 11.1.
2. Make sure you have the right driver.  Depending upon your NVidia card, you may need nvidia-driver-340, rather than
nvidia-driver. It's not always intuitive to figure out, you can get the model of your card with pciconf -lv then google if that card takes the legacy driver or not.  Here's their list, but the naming of the cards doesn't always match pciconf.
http://www.nvidia.com/page/legacy.html

Assuming you've done that, you then have to add nvidia_load="YES" or nvidia-modeset_load="YES" to /boot/loader.conf, creating the file if it doesn't exist, and reboot. (The pkg-msg gives this information.)  You can, instead, add lines to /etc/rc.conf, but I'm writing this from Linux, and don't remember that entry, as I use /boot/loader.conf.  If using nvidia-driver use the nvidia-modeset, if using nvidia-driver-340, use the nvidia_load

To view the pkg-message, you can, once it's installed, run `pkg info -D nvidia-driver[/code], or nvidia-driver-340 depending which you installed.

In many cases, this isn't enough, so you can installed nvidia-xconfig.  Once installed run [cmd]nvidia-xconfig` and it will create an /etc/X11/xorg.conf file. 

In one case (for me) this still wasn't enough, and after overlooking it for half a day, I saw that the /etc/X11/xorg.conf file was missing BusID.  To get the BusID number, Chris_H pointed out, somewhere on these forums, you can run startx and even if it doesn't start successfully, looking through the /var/log/Xorg.0.log you'll see what the BusID is supposed to be and you can add it, under the device section, in /etc/X11/xorg.conf. However, as that is a rare problem, at least for me, it probably won't become necessary, and if it does, you can ask for help here.

Generally, all I've had to do was install from ports, use the right nvidia-driver, and run nvidia-xconfig, and I then get a working X.[/cmd]


----------



## ldgc (Aug 3, 2018)

scottro said:


> You can, instead, add lines to /etc/rc.conf, but I'm writing this from Linux, and don't remember that entry, as I use /boot/loader.conf.


_kld_list="nvidia"_ or _kld_list="nvidia-modeset" _


----------



## Rita G. (Aug 4, 2018)

I'm stuck again . .
Can someone please help me to the next step?


----------



## jpierri (Aug 4, 2018)

It is saying that you need the kernel source tree in order to proceed with the compilation.

You can download it using this (be sure to type the backticks):

`svnlite checkout https://svn.freebsd.org/base/releng/`uname -r | cut -d '-' -f 1` /usr/src`


----------



## ShelLuser (Aug 4, 2018)

Rita G. said:


> I'm stuck again . .
> Can someone please help me to the next step?


Fair enough.

Read the error message though: you need a source tree available in /usr/src.

The easiest way to do this:

`# mkdir /usr/src` (just in case) 
`svnlite co https://svn.freebsd.org/base/releng/11.2 /usr/src`
<wait for it>
Done.
In case something does go wrong (can happen with slower internet connections):

`cd /usr/src`
`svnlite cleanup`
`svnlite co https://svn.freebsd.org/base/releng/11.2 /usr/src`
That should fix it.


----------



## scottro (Aug 4, 2018)

Yes, and I should have put that in my mini guide above.  The NVidia driver does require source code, installed the  way ShelLuser describes. Apologies.


----------



## scottro (Aug 4, 2018)

Ok, I've put up a little page about this. If anyone wants to check and, Rita G. if you haven't yet gotten this working successfully, try and see if it helps, I'd be grateful for input.

http://srobb.net/freebsdnvidia.html


----------



## nihr43 (Aug 4, 2018)

scottro said:


> I'd be grateful for input.



I had to `pkg lock nvidia-driver` (and virtualbox) to keep pkg from updating it and breaking my desktop again.  Probably a good last step


----------



## Rita G. (Aug 4, 2018)

tried everything in last 5 posts; nothing works.


----------



## scottro (Aug 4, 2018)

I'll be adding nihr43's information to the page, thank you.


----------



## scottro (Aug 4, 2018)

Rita G.  Are you trying to get your system to boot directly into X at startup?  (Because usually, one sees that someone is logged in at a command prompt and you can then type startx.)    
If so, (that you're trying to boot directly to X) would you try booting to text mode and then typing startx?  It may possibly give more informative error messages.


----------



## Rita G. (Aug 4, 2018)

startx


----------



## scottro (Aug 4, 2018)

What showed up in /var/log/Xorg.0.log? Specifically things marked with [EE] for error?


----------



## alexseitsinger (Aug 4, 2018)

It's saying that no screens are found which could mean a few things. If you have a file at /etc/X11/xorg.conf then please share it. Do you have any files located in /etc/X11/xorg.conf.d? If so, what files? Also, please share the output of the /var/log/Xorg.0.log. Those might help us diagnose your issue more accurately.


----------



## Rita G. (Aug 4, 2018)

xorg.0.log


----------



## Rita G. (Aug 4, 2018)

/etc/X11/xorg.conf


----------



## nihr43 (Aug 5, 2018)

*Rita G.*
alright, so now xorg can't find the nvidia driver.

this either means that the kernel module isn't loaded, or the driver is not installed at all any more.

did you `pkg delete nvidia-driver` and then go through scottro's guide to re-install it?

you can also run `kldstat` to see if the nvidia kernel module is present, and load it manually with `kldload nvidia-modeset` if you need to


----------



## alexseitsinger (Aug 5, 2018)

Rita G. said:


> xorg.0.log



As nihr43 said, the error in Xorg.0.log describes how it can't find the nvidia kernel module. In order to verify that this module is loaded you should run `kldstat` and verify that one of the lines says nvidia.ko at the end. If it's not there, then the module isn't being loaded automatically. Therefore, you should run `kldload nvidia`. Once again, check the output of `kldstat` to verify it's there. If you can't load the kernel module using the command, then it might not be installed correctly/at all. In order to install it, you need to know the driver version to install. First, run `pciconf -lv` and find your graphics card in the list. Then, go to nvidia, scroll to the FreeBSD section, and find the driver version that matches your graphics card. That version number will tell you which driver package you will download. It will be either 390, 340, or 304. Once you have the version you need, run `pkg install nvidia-driver-<version>` to install the package onto your system. Once you do this, that error should be fixed, and Xorg should run. Remember, you should also have either: nvidia_load="YES" in /boot/loader.conf or kld_list="nvidia" in /etc/rc.conf. One of those two entries will tell the system to automatically load the driver upon startup. Otherwise, you would have to run `kldload nvidia` everytime you want to use x11/xorg.


----------

