Solved Xorg crashes system when started in user accounts

I'm trying to install FreeBSD on a system to replace Solaris 10.

The problem I need to address is starting xorg from the command line. I do a startx in the root account, and xorg comes up just fine. I've added xfce, and can start it from the command line. No problems as long as I am in the root account.

When I log into a user account and run startx (no xfce), the screen immediately goes blank, and the system goes into a reboot. There is no new log file generated in /var/log when this happens.

I've checked permissions on startx and Xorg in /usr/local/bin They are:
Code:
# ls -l Xorg
-r-sr-xr-x  1 root  wheel  2146104 Jan  8 18:47 Xorg
# ls -l startx
-r-xr-xr-x  1 root  wheel  5092 Jan  8 18:36 startx
Where do I go from here?

Configuration information: FreeBSD 10.2 stable amd64,1/6/16 cd1 iso image burned to CD.
Hardware: Sun Ultra 27 (Intel Xeon, 12gb RAM, Nvidia Quadro TX 4700 graphics)

I tried to install xorg and xfce4 using pkg, but both installs failed because of download files not found. Used portsnap to populate the /usr/ports directory, and built and installed both packages. On the install and build configurations, I took the defaults in all cases.

My experience (summarized), since this is my first post: hardware/software engineer since 1956, Unix since 1979, previous BSD's worked with include 4.2, 4.3, Ultrix, SunOS 4. I've been strictly Solaris for about 15 years, so going to a BSD is a "remember when."
The install I did 1/7 and portsnap 1/8 are my second stab at getting FreeBSD up and running this past week.
 
Is the normal user in the wheel group? See Xorg Configuration.

No joy. The normal users were already all in the wheel group per the instructions.
Further info: If I log into the user account and su to root, retaining the user environment, I get the same crash.
If I log into the user account and su - to root, switching to the root environment, I can startx to the root installation.

PS: Trying to follow the formatting guidelines, but not sure I've got this right.
 
Hardware: Sun Ultra 27 (Intel Xeon, 12gb RAM, Nvidia Quadro TX 4700 graphics)

If you used the proprietary Nvidia drivers this Thread 52311 may be of help

The thread cautions not to install a traditional xorg.conf with the proprietary Nvidia drivers. If Nvidia is not installed you can get some info by trying to generate an xorg.conf with

# Xorg -configure

Just do not copy the generated configuration over to /usr/local/etc/X11

Sorry for the multiple edits. I don't use Nvidia cards.
 
Did you mean to write Nvidia Quadro FX 4700? I have never heard of a Quadro TX series Nvidia card and don't see any documentation anywhere mentioning a model with that name. It could just be an OEM specific model card I've never heard of as well. If it is indeed a Quadro FX 4700, it needs the x11/nvidia-driver-340 Nvidia driver port. Following the directions in the thread shepper linked to should get you going. :)
 
Correct on my misidentification of the graphics. I have the GUI currently running, and have checked the log.
Code:
[  1090.229] (--) Using syscons driver with X support (version 0.x)
[  1090.229] (--) using VT number 9

[  1090.229] (--) NV: Found NVIDIA Quadro FX 4600 at 03@00:00:0
[  1090.229] (WW) Falling back to old probe method for vesa
[  1090.229] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[  1090.229] (II) Loading sub module "int10"
[  1090.229] (II) LoadModule: "int10"
[  1090.229] (II) Loading /usr/local/lib/xorg/modules/libint10.so
[  1090.238] (II) Module int10: vendor="X.Org Foundation"
[  1090.238]  compiled for 1.17.4, module version = 1.0.0
[  1090.238]  ABI class: X.Org Video Driver, version 19.0

What I have checked is that this has a match in the list of supported devices that is printed out in the log preceding these lines.

It would seem to me that if the driver being used were the wrong one, that I would not be able to bring up the display at all.
As it stands, X and the window manager start properly when I am in the root account. It is when I log out of root and into a user account that the system crashes.

Since posting earlier, I have been attempting to see just what is going on that is crashing the system and forcing a reboot. I am not getting a panic dump, although do not know if a default install will generate one. I'm currently using a remote login from another system to see just what I can see between startx
and the crash. One message that gives me pause, at the very beginning is:

Code:
root@zinc:~ # startx
xauth:  file /root/.serverauth.971 does not exist
xauth: (argv):1:  bad display name "zinc.my.org:0" in "list" command
xauth: (stdin):1:  bad display name "zinc.my.org:0" in "add" command
(actual name munged)

My understanding when I installed the system was that it wanted the FQDN, not just the nodename. If I need to change this for X11, how do I do this.
I see that the hostname is in /etc/rc.conf, but there is no entry for the IP in /etc/hosts.
 
All supported Intel and AMD based graphics should be detected automatically by Xorg and usually can auto-configure graphics. Nvidia is the exception and needs a configuration file created to load the driver as per the thread linked above. In most cases, which seems to also be the case here looking at your output above, the vesa(4) driver is used as a fallback driver if X can't find a suitable driver to use and/or the card isn't supported. Your card model is actually a dual chip graphics card and it looks to me from the output above vesa(4) is failing to work with it, though you say it works when logged on as root so I'm not sure what's going on.

I would do the following from the console and see if that helps:
  1. Make sure the linux(4) ABI support and the Nvidia driver are set to load from /etc/rc.conf by running # sysrc kldlist="linux nvidia" as root. Loading the drivers from /boot/loader.conf is the canonical way of doing this but there are sometimes problems with the nvidia driver loading that early on and doing it this way sidesteps that potential issue should it pop up again in the future.
  2. Per the thread linked above, create a 10-nvidia.conf file in /usr/local/etc/X11/xorg.conf.d/ if one doesn't exist already and append following to it:
    Code:
    Section "Device"
            Identifier "NVIDIA Card"
            VendorName "NVIDIA Corporation"
            Driver "nvidia"
    EndSection
  3. Install the nvidia driver with # pkg install nvidia-driver-340 as root.
  4. Reboot the computer and hopefully profit, but if not, we can go from there. :)
As a side note, please don't run X as root, it won't fix any problems and if anything, can create more of them.
 
Good news and bad news, protocelt. I followed you instructions to the letter and in the order given, including a reboot.
Logged into a user account and ran startx. No crash; that's the good news.

The bad news is that Xorg did not start, with a "no screens found" message. I have run a quick audit to assure that 10-nvidia.conf is the only conf file in either location for these files, and that the other commands were successful. The only thing in the conf file is what you listed above. One check I did not run was to examine what's loaded in the kernel---is there a command equivalent to Solaris modinfo on Freebsd?

Here is what I think is relevant from Xorg.0.log, which was generated.

Code:
  813.487] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[  813.487] (==) No Layout section.  Using the first Screen section.
[  813.487] (==) No screen section available. Using defaults.
[  813.487] (**) |-->Screen "Default Screen Section" (0)
[  813.487] (**) |  |-->Monitor "<default monitor>"
[  813.487] (==) No device specified for screen "Default Screen Section".
  Using the first device section listed.
[  813.487] (**) |  |-->Device "NVIDIA Card"
[  813.487] (==) No monitor specified for screen "Default Screen Section".
  Using a default monitor configuration
(snip)
[  813.599] (II) Loading sub module "fb"
[  813.599] (II) LoadModule: "fb"
[  813.599] (II) Loading /usr/local/lib/xorg/modules/libfb.so
[  813.599] (II) Module fb: vendor="X.Org Foundation"
[  813.599]  compiled for 1.17.4, module version = 1.0.0
[  813.599]  ABI class: X.Org ANSI C Emulation, version 0.4
[  813.599] (WW) Unresolved symbol: fbGetGCPrivateKey
[  813.599] (II) Loading sub module "wfb"
[  813.599] (II) LoadModule: "wfb"
[  813.599] (II) Loading /usr/local/lib/xorg/modules/libwfb.so
[  813.599] (II) Module wfb: vendor="X.Org Foundation"
[  813.599]  compiled for 1.17.4, module version = 1.0.0
[  813.599]  ABI class: X.Org ANSI C Emulation, version 0.4
[  813.599] (II) Loading sub module "ramdac"
[  813.600] (II) LoadModule: "ramdac"
[  813.600] (II) Module "ramdac" already built-in
[  813.600] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please
see the
[  813.600] (EE) NVIDIA:  system's kernel log for additional error messages
and
[  813.600] (EE) NVIDIA:  consult the NVIDIA README for details.
[  813.600] (EE) No devices detected.
[  813.600] (EE)
Fatal server error:
[  813.600] (EE) no screens found(EE)
[  813.600] (EE)
Please consult the The X.Org Foundation support
  at http://wiki.x.org
for help.
[  813.600] (EE) Please also check the log file at "/var/log/Xorg.0.log" for ad
ditional information.
[  813.600] (EE)
[  813.601] (EE) Server terminated with error (1). Closing log file.

I assume the system's kernel log is /var/log/messages (same as Solaris). Nothing unusual there except I don't see "nvidia" in the boot messages.

So! Where do we go from here.

On your side note about working in root, I don't think I've got much choice until I can get a usable system, which means with a user account window manager.
The install is on a scratch disk on a "crash-and-burn" development machine. Production will be a fresh install on another disk/machine. Thus far I've put a week [elapsed] into this effort, with two installations, and if I break this one, I'll reinstall again.
 
813.487] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d" [ 813.487] (==) No Layout section. Using the first Screen section. [ 813.487] (==) No screen section available. Using defaults. [ 813.487] (**) |-->Screen "Default Screen Section" (0) [ 813.487] (**) | |-->Monitor "<default monitor>" [ 813.487] (==) No device specified for screen "Default Screen Section". Using the first device section listed. [ 813.487] (**) | |-->Device "NVIDIA Card" [ 813.487] (==) No monitor specified for screen "Default Screen Section".

In days gone by "no screens found" indicated a missing or incorrect screens section in the xorg.conf file. The newer xorg.conf.d directory scheme is supposed to just set the video device and let the system configure the remaining parts (video, mouse, keyboard) around the video device. If your syntax is correct, this is not working.

An easy thing to try is to install x11/nvidia-xconfig and use it to generate an xorg.conf. Remove the xorg.conf.d configuration, test the nvidia generated xorg.conf and if it works, install it as described in the handbook. Otherwise post it and the error messages here.
 
[ 813.600] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the [ 813.600] (EE) NVIDIA: system's kernel log for additional error messages and [ 813.600] (EE) NVIDIA: consult the NVIDIA README for details.

I overlooked this. I would disregard my prior post unless you confirm the NVIDIA kernel module is actually loaded as suggested by tobik/protocelt.
 
I think this is a/the problem.
Code:
root@zinc:~ # kldstat
Id Refs Address  Size  Name
1  4 0xffffffff80200000 17a87a0  kernel
2  1 0xffffffff81a11000 3585  ums.ko

In /etc/rc.conf
Code:
root@zinc:/etc # cat rc.conf
hostname="zinc.my.org"
ifconfig_em0="inet 192.168.1.18 netmask 255.255.255.0"
defaultrouter="192.168.1.98"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
kldlist="linux nvidia"
This as a result of running
# sysrc kldlist="linux nvidia"
as was specified above.

If this is the correct configuration, I need to audit that the linux and nvidia packages are actually in place. Where are these in the filesystem?

In /var/adm/messages
I see
Code:
an 12 00:11:21 zinc pkg: linux_base-c6-6.6_6 installed
Jan 12 00:11:26 zinc pkg: nvidia-driver-340-340.93 installed
Jan 12 00:12:48 zinc reboot: rebooted by root
Jan 12 00:12:48 zinc syslogd: exiting on signal 15

However, there are no other instances of "nvidia" or "linux" in that file following the reboot.
For reference, I use the vi editor, and am comfortable editing control files directly when needed.
 
My apologies. There was a typo when writing my instructions in the post above. It should be kld_list="linux nvidia" in /etc/rc.conf.
 
SUCCESS!
A quick vi fixup on /etc/rc.conf and a reboot loaded the modules. I have run startx in both root and a user account,
and X11 starts properly with Xfce.

For reference, a couple of audit points:
Code:
$ kldstat
Id Refs Address  Size  Name
1  13 0xffffffff80200000 17a87a0  kernel
2  2 0xffffffff81a11000 43831  linux.ko
3  1 0xffffffff81a55000 963a16  nvidia.ko
4  1 0xffffffff823b9000 3585  ums.ko
and in
/var/log/messages
Code:
[/
Jan 13 11:50:21 zinc kernel: Root mount waiting for: usbus5
Jan 13 11:50:21 zinc kernel: Trying to mount root from ufs:/dev/ada0p2 [rw]...
Jan 13 11:50:21 zinc kernel: nvidia0: <Quadro FX 4600> on vgapci0
Jan 13 11:50:21 zinc kernel: vgapci0: child nvidia0 requested pci_enable_io
Jan 13 11:50:21 zinc kernel: vgapci0: child nvidia0 requested pci_enable_io

My thanks to protocelt and others who've gotten me calibrated on the solution to the problem.
 
Back
Top