Computer reboots at second startx.

Hello.

So, my problem is that when I start Xorg the first time after boot, it goes quite fine. But when I exit Xorg and then try to startx again, the computer reboots. What's the problem?
 
There are a lot of things that could be a problem, but none of them are mentioned in your post. For a start, what version of FreeBSD? What video card? What version of X?
 
FreeBSD is amd64 9.0, because 9.1 didn't boot. I think the gfx card is nvidia gt200 with geforce gtx 260, and the Xorg version is what I installed with pkg_add a few days ago.
 
Scan through /var/log/Xorg.0.log and look for "EE" tagged (on the left of the page, means error) messages in that log. "WW" (warning) lines can also be of use.

Compare the logs of "normal startx" and "crashed startx" - after crash save the log to another name before re-starting desktop. Post the comparison here.
 
I'm afraid the file doesn't get flushed to disk before the system reboots. Currently I'm away from my computer, so I can't post the logs now.

But can I do something like 'startx >stdout 2>stderr' in 'sh' shell to get the same logs?
 
This is what I got at the first run by redirecting stderr to a file:
Code:
xauth:  file /home/user/.serverauth.1675 does not exist
xauth: (argv):1:  bad display name "freebsd-hostname:0" in "list" command
xauth: (stdin):1:  bad display name "freebsd-hostname:0" in "add" command


X.Org X Server 1.7.7
Release Date: 2010-05-04
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 9.0-RC2 amd64 
Current Operating System: FreeBSD freebsd-hostname 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 05 December 2011  07:04:08PM
 
Current version of pixman: 0.24.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Jan 30 15:43:30 2013
(==) Using config file: "/etc/X11/xorg.conf"
failed to set mtrr: Invalid argument
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
(EE) config/hal: NewInputDeviceRequest failed (8)
(EE) config/hal: NewInputDeviceRequest failed (8)
(EE) config/hal: NewInputDeviceRequest failed (8)
xinit: connection to X server lost

waiting for X server to shut down XIO:  fatal IO error 35 (Resource temporarily unavailable) on X server ":0"
      after 548 requests (548 known processed) with 2 events remaining.
xterm:  fatal IO error 35 (Resource temporarily unavailable) or KillClient on X server ":0"
xterm:  fatal IO error 35 (Resource temporarily unavailable) or KillClient on X server ":0"

xauth: (argv):1:  bad display name "freebsd-hostname:0" in "remove" command
 
This is the xorg.conf, note that I've added the Option "Log" "sync" there after I made the log which I posted.
Code:
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
        Option "DontZap" "off"
        Option "AutoAddDevices" "false"
        Option "Log" "sync"
EndSection

Section "Files"
        ModulePath   "/usr/local/lib/xorg/modules"
        FontPath     "/usr/local/lib/X11/fonts/misc/"
        FontPath     "/usr/local/lib/X11/fonts/TTF/"
        FontPath     "/usr/local/lib/X11/fonts/OTF"
        FontPath     "/usr/local/lib/X11/fonts/Type1/"
        FontPath     "/usr/local/lib/X11/fonts/100dpi/"
        FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
        Load  "dbe"
        Load  "dri"
        Load  "dri2"
        Load  "extmod"
        Load  "glx"
        Load  "record"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option "XkbRules" "xorg"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "fi"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "HWcursor"                  # [<bool>]
        #Option     "NoAccel"                   # [<bool>]
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "UseFBDev"                  # [<bool>]
        #Option     "Rotate"                    # [<str>]
        #Option     "VideoKey"                  # <i>
        #Option     "FlatPanel"                 # [<bool>]
        #Option     "FPDither"                  # [<bool>]
        #Option     "CrtcNumber"                # <i>
        #Option     "FPScale"                   # [<bool>]
        #Option     "FPTweak"                   # <i>
        #Option     "DualHead"                  # [<bool>]
        Identifier  "Card0"
        Driver      "nv"
        VendorName  "nVidia Corporation"
        BoardName   "GT200 [GeForce GTX 260]"
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
 
geek said:
Hello.

So, my problem is that when I start Xorg the first time after boot, it goes quite fine. But when I exit Xorg and then try to startx again, the computer reboots. What's the problem?

I too am having the same issue as you. I am running a core 2 quad, with a Radeon hd4870 card. I can startx once, but then the second time the PC reboots. This is a problem, because it is preventing me from using xdm/gdm/kdm, as each of those launch a new xsession when the user logs in. I am running Xorg 7.5.2 and FreeBSD 9.1-RELEASE. I do not get any logs as it is a hard reset. I have tried disabling hardware acceleration, disabling dri, and using VESA drivers. They all have the same issue. The system hard locks and reboots on the second instance of startx. I would be happy to provide any additional information on request.
 
Well, for me disabling the modules and using VESA drivers works. But the screen resolution is worse, and I guess I can't use hardware 3D rendering then.
 
You can't use 3D acceleration with the nv driver either. You might try the proprietary nvidia driver instead.
 
My Radeon 4650 is working well with WITH_NEW_XORG=yes set in /etc/make.conf. Been using that so long I forgot not everyone was. Setting that option and upgrading ports gives a newer version of xorg.
 
Right now:
Code:
xorg-7.5.2
xorg-server-1.10.6_2,1

But the plan is, apparently, to have WITH_NEW_XORG mean "the later of the two versions available", like having xorg and xorg-devel ports. So the version that results in could be different depending on when you read this.
 
I have added the make.conf change and ran "portupgrade -fRr", however the system still reboots on second "startx". However if I boot into the CLI, perform "startx", i can leave the pc logged in for days and it is absolutely rock solid.

I really have no clue what could be causing it.
 
Back
Top