Solved startx -> screen goes blank and freezes

Hi, all. Glad to be here. Here's my problem:

I type startx to start x11/xorg and run x11/kde5
The screen goes blank except for the mouse cursor and a keyboard cursor in the far upper left. Nothing appears to happen when I move the mouse or click its buttons, or when I type on the keyboard. CTL+ALT+F1 brings me back to tty1 where I can see all that was happening behind the scenes, and CTL+c stops everything and returns to a command prompt.

relevant system specs:
Intel i5-7500
NVIDIA GeForce GTX 1060 6GB (GP106-A)
- I have installed x11/nvidia-driver, but nothing for Intel.

Here are the only lines of /var/log/Xorg.0.log that stood out to me. I saw no (EE), (!!), (NI), or (??):
Code:
...
[    51.716] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[    51.716] (WW) Disabling Keyboard0
[    51.716] (WW) Disabling Mouse0
...
[    51.841] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    52.786] (WW) NVIDIA(0): Unable to get display device for DPI computation.
...

If anyone can tell me how to post more info, just let me know. This is my first time installing FreeBSD. I don't know how to upload files to the internet yet, and I can't access the file system from Windows 10 or Linux (same computer, different drives).

/boot/loader.conf includes:kern.vty=vt and nvidia_load="YES"

/etc/fstab includes: proc /proc procfs rw 0 0

/etc/rc.conf includes: dbus_enable="YES" and hald_enable="YES"

~/.xinitrc includes: exec ck-launch-session startplasma-x11

I initially had a few errors when starting x11/xorg:
Fatal server error: (EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
then
Fatal server error: (EE) no screens found

I tried a few configuration files in /usr/local/etc/X11/xorg.conf.d/ to resolve those errors, but ended up modifying the automatically configured /etc/X11/xorg.conf, shown below:
Code:
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AddARGBGLXVisuals" "True"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Enable"
EndSection

Section "Module"
    Load           "extmod"
    Load           "glx"
EndSection

What should I look at next? Is there anything else I can provide that may help get to the problem? I don't have to use /x11/kde5, but really wanted to give it a shot. Open to other ideas.
 
/boot/loader.conf includes:kern.vty=vt and nvidia_load="YES"
You can remove kern.vty, vt(4) is the default. And for the NVidia driver, did you try nvidia-modeset_enable="YES"?

See the pkg-message: pkg info -D nvidia-driver
 
I tried a few configuration files in /usr/local/etc/X11/xorg.conf.d/ to resolve those errors, but ended up modifying the automatically configured /etc/X11/xorg.conf, shown below:
Which version of x11-servers/xorg-server is installed on your system? You can check by pkg info -E xorg-server.
The automatically generated xorg.conf includes lots of things that can be considered outdated (like InputDevice sections) and should not be used. It's probably best to start with a configuration that only contains a Device section that specifies the correct graphics driver to use and go from there and see if anything else needs additional configuration (keyboard layout, mouse, etc). The configuration should go into /usr/local/etc/X11/xorg.conf if you want to use a single configuration file, or if you prefer to have separate files, into the /usr/local/etc/X11/xorg.conf.d directory.
Code:
Section "Device"
    Identifier "GTX-1060"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "GeForce GTX 1060"
EndSection
I'd also suggest to load the nvidia kernel module via kld_list in /etc/rc.conf rather than using nvidia_load="YES" in /boot/loader.conf. You can use sysrc(8) to add it to your kld_list: sysrc kld_list+="nvidia-modeset". Then remove the nvidia_load="YES" from /boot/loader.conf.
 
SirDice, thanks for clarifying. Here are changes I made to /boot/loader.conf:
I removed kern.ty=vt.
nvidia-modeset_enable="YES" gives me Fatal server error: (EE) no screens found
nvidia_enable="YES" gives me the same error above.

Mickey, thanks for your suggestions. I'll get to the rest of them in a few hours.
For now, I can say my version of x11-servers/xorg-server is 1.18.4_13.1.
 
Please install misc/pastebinit and run cat /var/log/Xorg.0.log | pastebinit, then post the URL here. We need to have a look at your logging.
 
Well, it works now.
I ran sysrc kld_list+="nvidia-modeset", then removed nvidia_load="YES" from /boot/loader.conf.

I am trying to understand the difference. Why did setting nvidia-modeset give me Fatal server error: (EE) no screens found when in /boot/loader.conf, but it works fine in /etc/rc.conf?

Thanks for the reminder. I only did the x11/xorg auto configuration because nothing else was working. Like you say, I will move it to /usr/local/etc/X11/xorg.conf.d/ after chopping it into only the necessary pieces.

Here is the /var/log/Xorg.0.log from before this change:
Here is the /var/log/Xorg.0.log after this change, from a working KDE:

Please take a look to see if there's anything else I need to correct. misc/pastebinit is great for this. Thanks for all the help so far. I'll mark this "Solved" if everything looks okay.
 
Back
Top