# startx restarts computer



## curse (Feb 6, 2010)

Hi. Trying out freebsd for the first time, long time gnu/linux supporter wanted to give freebsd a try. Have it on my toshiba laptop with atheros card. Anyways I did Xorg -configure then copied the new one over. also added the hal and dbus line in rc.conf like the sticky said.  At one point i was able to get into x on the root account but it was just basic x. Since then i been trying to get kde to work and this taken care of.  But now it spits out some errors then goes to a black screen(as in nothing displayed at all, not a grey screen) about 30sec later computer restarts.

Thanks in advance for the help!


----------



## OH (Feb 6, 2010)

Look in /var/log/Xorg.0.log for any [EE] errors and try resolving those


----------



## curse (Feb 7, 2010)

its not showing any. did a search for it in the file too.


----------



## curse (Feb 7, 2010)

Weird thing is whenever i test the config using Xorg -config /etc/X11/xorg.conf -retro
 it works.  So im really confused.


----------



## roddierod (Feb 7, 2010)

startx is going to look in you users $HOME for .xinitrc, if it's not present it should start twm. Do you have this file in your $HOME, if so what is in it.

Also, if you want KDE I believe you have to start in from KDM, which you have to do by setting it up in rc.conf or /etc/ttys, I don't use KDE so you'll have to look to commands up


----------



## adamk (Feb 7, 2010)

You say that it spits out "some errors".  Do you have a chance to look at those errors before the screen goes black?


----------



## tangram (Feb 9, 2010)

Did you copy xorg.conf to /etc/X11/?


```
# Xorg -config xorg.conf.new -retro
# cp xorg.conf.new /etc/X11/xorg.conf
```


----------



## curse (Feb 11, 2010)

yes copied to x11.  Recent development though. I moved my little freebsd project to a gateway desktop instead of the laptop.  However it does the same thing. Except restarting it just doesnt work.  So i know i'm missing something but not sure.  I would like to upload my xorg.conf to see if i missed anything but not sure how to do that.  I appreciate all the help you all have given me so far, thank you.


----------



## curse (Feb 11, 2010)

Also I don't neccessarly need kde I would actually prefar xfce but anything at this point would be a +.


----------



## rhyous (Feb 12, 2010)

Does it reboot or just go black screen?

Did you try running this command as root to build your xorg.conf?

`# Xorg -config /root/xorg.conf.new -retro`

And if it works, copy that xorg.conf to /etc/X11/xorg.conf and try again.


----------



## rhyous (Feb 13, 2010)

Sorry, you obviously tried that already.

Definitely upload your Xorg.conf as well as the output of this command:

pciconf -lv


----------



## Time2IPL (Feb 13, 2010)

For what it's worth, I've had move than one occasion where X has worked with no external xorg.conf file, and "Xorg -configure" worked, but when I put whatever "Xorg -configure" spit out into a file (because I needed to change one setting or another), the X server no longer worked. I would scan through the entire Xorg.0.log file and make sure it all looked good (any warnings (WW)? anything else that doesn't look right?).

I work with a lot of different types of systems; what, exactly, "startx" does can vary a lot from one to the next. You might want to try starting a window manager with "xinit", though - for ex.:

```
xinit twm -- :1
```

Note that "xinit" doesn't set up any of the xauth, etc. "stuff" that most session managers (e.g., KDE, GNOME) expect to find so you're probably going to want to get "startx" working in the long run; that might at least help you figure out where the problem is, though.

- L


----------



## volatilevoid (Feb 13, 2010)

To me a black screen and especially a reboot sounds like a broken driver. It might help to get some hardware specs and your xorg.conf.

You may also try to run X with the vesa driver. I already had problems particularly with older laptops which would freeze/reboot.


----------



## curse (Feb 14, 2010)

rhyous said:
			
		

> Sorry, you obviously tried that already.
> 
> Definitely upload your Xorg.conf as well as the output of this command:
> 
> pciconf -lv



Not sure how to upload this. I could figure out the xorg.conf make a cp to flash drive or something but the other, not sure.



xinit twm -- :1 seemed to work but like you said wont do much for gnome or something. However does that mean its not xorg.conf problems could be xauth(not sure what that is).  I do recall seeing xauth in the xorg.log so I'll do some research on the subject maybe work it out.

Thanks for the help!


----------



## FBSDin20Steps (Feb 14, 2010)

What kind of videocard do you have in your laptop?


----------



## rhyous (Feb 14, 2010)

> Not sure how to upload this. I could figure out the xorg.conf make a cp to flash drive or something but the other, not sure.



Well, since Xorg doesn't work, do you have ssh enabled?  If not, add it to /etc/rc.conf and reboot.

sshd_enable="Yes" 

Now you can ssh into your machine from a machine that works.  If you have another *nix machine, ssh should already exist, othewise if you on Windows, download PuTTY and use it.

Once you ssh into your FreeBSD machine, run the commands and copy and paste the results from you ssh window.


----------



## curse (Feb 14, 2010)

wow ssh is awesome! did a little googling learned how to use scp and walla!

changed xorg to a txt so i can upload.


----------



## FBSDin20Steps (Feb 14, 2010)

Did you try to install the intel video driver from ports?


```
/usr/ports/x11-drivers/xf86-video-intel
```


----------



## curse (Feb 14, 2010)

looks like it was already installed i did reinstall it though and no luck.


----------



## FBSDin20Steps (Feb 14, 2010)

Could you post your dmesg as well?


----------



## curse (Feb 15, 2010)

hope this is right


----------



## volatilevoid (Feb 15, 2010)

Any differences if you enable

```
Option "NoAccel" "true"
```
in your xorg.conf?


----------



## adamk (Feb 15, 2010)

In the Module section of your xorg.conf file, change


```
Load "dri"
Load "dri2"
```

to:


```
Disable "dri"
Disable "dri2"
```

If that lets you start X without rebooting, make sure you followup on the freebsd-x11 mailing list and open up a probem report if one does not already exist.

Adam


----------



## FBSDin20Steps (Feb 15, 2010)

As it was already suggested by volatilevoid... Did you try to start x with the vesa driver? You can change the driver in the driver section of your xorg.conf. 
You say that you don't mind using xfce4. Could you install it?


```
# pkg_add -r xfce4
```

You can start xfce4 by creating a .xinitrc file in your homedir.


```
ee .xinitrc
```

and add the line:


```
startxfce4
```

Then run `# startx` to fire it up.


----------



## curse (Feb 15, 2010)

xfce seems to work with no problem so I dont know what the deal was with kde but o well.. Learned quite a bit so I highly appreciate all the help i recieved!


----------

