[Solved] Newbie Problems Installing Xorg

I was really hoping I could get past the basic FreeBSD install with out having to ask for help on this forum - but I seem to have hit the wall.

I'm installing 14.3 on an older Dell Inspiron w/8g of ram and ~950g HDD with an Intel graphics card. The basic GUI installation went so well I'm on my 3rd install attempt thinking maybe this time I can get past this tricky Xorg bit.

Here's some info that may provide you FreeBSD experts with some clues that could help me:
My freebsd-version is 14.3RELEASE-p2
This morning I ran freebsd-update fetch, then install, (before spending the rest of the day trying a variety of things, some of which I will cover later)
When I run /var/log/Xorg.0.log I get a 'Permission denied' message whether as root or user.
To the /etc/rc.conf file I added the line dbus_enable="YES"
To the /boot/loader.conf file I added the line i915kms_load="YES"
When I enter (as a user, not as root) startx I get a many lines of error messages. The first one is :xauth: file /home/uname/.serverauth1***, where *** = a 3 digit number that changes every time I try to startx.
Other info in the error message:
X.Org X Server 1.21.1.18
X Protocol Version 11 Revision 0
Current version of pixman: 0.46.2
There are 6 lines in the error message section that start with (EE) Don't know if that's Easy Editor, but I am using Nano.
The last 3 messages all begin with xinit: 1 giving up, 2 Unable to Connect to X server: Connection refused, and last 3 server error

I'm interested in using Fluxbox as my WM/DE and installed it earlier. I prefer not to install XFCE or KDE DE if possible. When I enter fluxbox at the $prompt I get 'Warning: Failed to open file(fluxbox.cat) for translation using default messages.' and 'Error: Couldn't connect to passing null display'

I tried to follow the Handbook Ch 5 instructions as well as I could, and looked at as many forum posts as I could find. I don't know if any of my attempts have made things worse, but I am more than willing to start with a fresh install if that would be advisable.

Thank you in advance for any help or suggestions you can provide.
 
First get X running, then install your DE/WM.

The only tricky thing about X.org installation always was and is to really know what your GPU actually is, and which kernel module ("driver") is the right one for it. Which since DRM for ~99% of all today's GPUs (younger than ~fifteen years(?)) is simply radeon (AMD), nvivia, or intel, and done automatically - while FreeBSD's package installation often fails correct autodetection, but the installation from ports mostly get it right.
Other issue could be, if you had a very brandnew bleeding edge GPU for which there is no open source module available yet - either wait a couple of months, or chose another GPU. But as you said, this ain't the case here.

So, try this (as root; presupposed your FreeBSD and ports tree versions match):
in /etc/rc.conf write
kld_list=i915kms instead of i915kms_load="YES" (not in /boot/loader.conf!)
back to the shell:
pkg remove drm-knod
cd /usr/ports/graphics/drm-kmod/
make install clean BATCH=yes wait. Depending on your machine's power this may take a while.
If this went through without errors, which it almost certain should if you have the according package not installed. load the kernel module by hand, or reboot and become root again.
Then try if you get your X-server up and running (as root. Your user(s) have to be in the video group):
startx
If everything was right (i915kms is the right kernel module for your GPU) your terminal switches to 9, and you should see some grey screen, and three green windows with a shell in it (for many years X already comes by default with a preinstalled WM. That would be twm. A not to be blamed too quickly, lightweight but pretty power-, useful and customizable WM.)

Tell here, if you had success - or not.
 
A few things that might be gotchas--still happen to me when I'm setting up a VM or laptop in a rush. (EE by the way, in an Xorg log means there was an error). Do you have an .xinit file in your home directory? Is the last line
Code:
exec startfluxbox
?
Is fluxbox installed? I've sometimes had an exec openbox-session as my last line and forgotten to install openbox. Or used another old xorg that didn't have exec openbox-session. (I tend to use openbox rather than flux these days, but they're both great window managers)

Assuming your answers are yes, go back to everyone else's advice on loading the module. Also, be sure you have the packages installed for xorg-server, xinit, and xf86-input-libinput, but you say you follwed the handbook, so it's most likely you installed xorg or xorg-minimal.
 
First get X running, then install your DE/WM.

The only tricky thing about X.org installation always was and is to really know what your GPU actually is, and which kernel module ("driver") is the right one for it. Which since DRM for ~99% of all today's GPUs (younger than ~fifteen years(?)) is simply radeon (AMD), nvivia, or intel, and done automatically - while FreeBSD's package installation often fails correct autodetection, but the installation from ports mostly get it right.
Other issue could be, if you had a very brandnew bleeding edge GPU for which there is no open source module available yet - either wait a couple of months, or chose another GPU. But as you said, this ain't the case here.

So, try this (as root; presupposed your FreeBSD and ports tree versions match):
in /etc/rc.conf write
kld_list=i915kms instead of i915kms_load="YES" (not in /boot/loader.conf!)
back to the shell:
pkg remove drm-knod
cd /usr/ports/graphics/drm-kmod/
make install clean BATCH=yes wait. Depending on your machine's power this may take a while.
If this went through without errors, which it almost certain should if you have the according package not installed. load the kernel module by hand, or reboot and become root again.
Then try if you get your X-server up and running (as root. Your user(s) have to be in the video group):
startx
If everything was right (i915kms is the right kernel module for your GPU) your terminal switches to 9, and you should see some grey screen, and three green windows with a shell in it (for many years X already comes by default with a preinstalled WM. That would be twm. A not to be blamed too quickly, lightweight but pretty power-, useful and customizable WM.)

Tell here, if you had success - or not.
First of all, thank you very much for the detailed instructions!

Unfortunately, I end up with the very same error messages as before. Then I made a slight variation to your instructions by using the info that was on freshports which includes '&& make install clean' at the end of the cd command. This also produced the same error 'Error 1'. I also tried 'make reinstall' which was suggested in the body of the error message. But when I run startx I get the same result - even after a reboot. I'm going to look at the man page for drm-kmod and see in there is any info on Error 1. I wanted to let you know as soon as I could because you are several hours ahead of me. Let me know if you have some things we could check to troubleshoot. I have had several previous installations of freebsd but never had an issue with x11.

Thanks again.
 
A few things that might be gotchas--still happen to me when I'm setting up a VM or laptop in a rush. (EE by the way, in an Xorg log means there was an error). Do you have an .xinit file in your home directory? Is the last line
Code:
exec startfluxbox
?
Is fluxbox installed? I've sometimes had an exec openbox-session as my last line and forgotten to install openbox. Or used another old xorg that didn't have exec openbox-session. (I tend to use openbox rather than flux these days, but they're both great window managers)

Assuming your answers are yes, go back to everyone else's advice on loading the module. Also, be sure you have the packages installed for xorg-server, xinit, and xf86-input-libinput, but you say you follwed the handbook, so it's most likely you installed xorg or xorg-minimal.
Thanks for this info! I tried the 'exec startfluxbox' but get errors 1) xmodmap unable to open display 2) Warning: Failed to open file(fluxbox.cat) 3) Error: couldn't connect to Xserver passing null display.
When I run fluxbox -version I get 1) same as #2 above and 2) Fluxbox 1.3.7
For me it was a tossup between Openbox and Fluxbox - I chose fluxbox for the (supposedly)slightly flatter learning curve.
I've previously installed freebsd several times following Ch. 5 of the Handbook each time - this is the first problem Ive had with Xorg. But I am a rank newbie and only recently figured out how to edit config files. So it could be something really obvious and stupid. Btw, this is installed on a desktop and not on a VM.
 
Try
Code:
exec dbus-launch --exit-with-x11 ck-launch-session fluxbox-session
When I entered that code it returned: 'Session lifetime based on X11 requested, but X11 initialization failed'
Does that tell you anything? Thanks for the suggestion!
 
Back
Top