# Dell Optiplex - Intel GMA 3000 - Xorg-configure = hard stop



## PacketMan (Nov 5, 2014)

I had a look at some of the other discussions, but felt they were not the same as mine and didn't want to confuse any ongoing discussions.

I am trying to get a  GUI/desktop going, but it's a no-go with this box. Here is my setup: http://www.dell.com/downloads/emea/products/optix/optix_745c_en.pdf

4 GB RAM
80 GB disk (I removed the 160 GB disk that has Ubuntu on it currently.)
Video card: Intel GMA 3000 integrated graphics utilising up to 256 MB of system memory
FreeBSD 10.0-RELEASE
When I run `Xorg - configure` I get a bunch of text too fast for me to read. Then my monitor switches to power save mode which tells me my video card stopped outputting. And the box/OS is frozen. There's nothing I can do but power down.

I looked for /root/xorg.conf.new but it's not there. I tried `Xorg - configure` a couple times after rebooting, but it's no go. Hard stop.

I want to troubleshoot this, and try to get past it on my own. It*'*s the best way to learn. I don't see anything related to my scenario in Section 6.8 Troubleshooting . So I am asking for a little help.

What next? Where do I go?


----------



## Oko (Nov 6, 2014)

`Xorg -configure` should not be necessary. In most cases these days on i386 and amd64 you just type `startx` and that is it. Of course you have to configure .xinitrc or .xsession (if you are using xdm).

What happens when you remove the X.Org file you just generated and just type `startx`?


----------



## PacketMan (Nov 6, 2014)

The /root/xorg.conf.new is not generated when I do `Xorg - configure`. I checked /root and it's not there. If I do a `startx` I get the exact same result.

EDIT: I have not begun to configure .xinitrc or .xsession (or xdm). I am following the Handbook step by step.


----------



## wblock@ (Nov 6, 2014)

Oko is correct, do not run `Xorg -configure`.

What version of X is installed?  Did you install it from ports or packages?  Do you have a copy of xorg.conf already in /etc or /usr/local/etc?


----------



## Oko (Nov 6, 2014)

PacketMan said:


> I have not begun to configure .xinitrc or .xsession (or xdm). I am following the Handbook step by step.


Just configure ~/.xinitrc for example as

```
#!/bin/sh
xidle -program "/usr/X11R6/bin/xlock" -timeout 300 &
xclock -geometry -0+0 &
feh --bg-scale /home/oko/.unix.jpg &
exec cwm
```

where CWM  is my Window manager and feh is my favorite image viewer and wallpaper setter. Then softlink .xinitrc to .xsession which is read in the case you are using the X Display Manager. Additionally you might want to do little bit of X configuration by editing .Xresources as for example

```
XTerm*termName: xterm-color
XTerm*loginShell: true
XTerm*faceName: Mono
XTerm*faceSize: 11
XTerm*background: black
XTerm*foreground: gray

Xft.antialias: true

XClock*analog:                          false
XClock*strftime:                        %T %A %e %B
XClock*face:                            ter-d12n
XClock*interval:                        1
XClock*margin:                          0
XClock*foreground:                      gray
XClock*background:                      black
```

Configuring CWM is beyond the scope of this message. There used to be a very good web site called dotfiles.org for all these nifty UNIX dotfiles.


----------



## PacketMan (Nov 6, 2014)

wblock@ said:


> Oko is correct, do not run `Xorg -configure`.
> 
> What version of X is installed?  Did you install it from ports or packages?  Do you have a copy of xorg.conf already in /etc or /usr/local/etc?



X is not installed yet, that is what I am trying to do. This is a fresh OS install.  Those directories, plus /etc/X11/ (as per the handbook) do not contain xorg.conf.


----------



## PacketMan (Nov 6, 2014)

On a side note, on a fresh OS 10.0 installing x11/xorg using ports fails. It says it cannot FTP a MesaLib-7.6.1.tar.bz2 due to file not found.


----------



## wblock@ (Nov 6, 2014)

If X is not installed, `Xorg -configure` will just say "not found".

Please download the latest snapshot of 10.1 and install that.  It will use the later version of X by default, and includes vt(4):
ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.1/


----------



## PacketMan (Nov 6, 2014)

OKay thanks. I will wait for the official 10.1-RELEASE this weekend.

Sorry to be such a newbie, but I thought the whole point of `Xorg -configure` was to generate a file that I would move over to /etc/x11 as a step to complete the X installation. My machine does not say "not found". It freezes solid and about three seconds later I see some screen text. Just to be clear, the port install fails do to an FTP error (see above), but `pkg install` completes. I do the hald and dbus stuff in 6.4 in the handbook, and then hard stop at `Xorg -configure`.

This box is a 64 bit machine so I am gonna going to try the 64-bit version on this one.

Thanks again.


----------



## wblock@ (Nov 7, 2014)

xorg.conf is the configuration file that tells X about hardware.  But for several years, X has been able to autoconfigure correctly most of the time.  Combined with the fact that leaving X on 10.0 gives a black screen, it's better just to use 10.1.


----------



## PacketMan (Nov 9, 2014)

wblock@ said:


> xorg.conf is the configuration file that tells X about hardware.  But for several years, X has been able to autoconfigure correctly most of the time.  Combined with the fact that leaving X on the 10.0 gives a black screen, it's better just to use 10.1.



I couldn't wait so I downloaded 10.1-RC4. I regret to inform I get the exact same result: BSoD - Black Screen of Death.


----------



## wblock@ (Nov 9, 2014)

Did you run `Xorg -configure`?  Did you add

```
kern.vty=vt
```
to /boot/loader.conf?


----------



## PacketMan (Nov 9, 2014)

Yes when I run `Xorg -configure` I get the BSoD.  I did not add



wblock@ said:


> ```
> kern.vty=vt
> ```
> to /boot/loader.conf?



because I did't see that instruction in the Handbook. Is there another document I am supposed to be referring to?  Guys, I'm sorry to be such a novice, I'm just using the guide like I am supposed to.

I'm going to install KDE just for the heck of it.


----------



## wblock@ (Nov 9, 2014)

vt(4) is not the default in FreeBSD 10, so to use it, that entry in /boot/loader.conf must be added. Without vt(4), the screen remains black after X exits. X exits after running that command we keep saying not to run.

The Handbook needs to be updated.  I have not had time to do so yet, and had also hoped that GNOME and KDE would remove their dependence on sysutils/hal so that could also be removed.


----------



## PacketMan (Nov 9, 2014)

Sorry. I thought there were fixes in 10.1 and thus `Xorg -configure` was the correct way.  I got you now. Stay tuned.  Thanks a bunch for your patience wblock@. I really appreciate it and hope to be able to return in kind someday.


----------



## wblock@ (Nov 9, 2014)

There are fixes, namely vt(4), but it is not enabled by default.  It will be in FreeBSD 11.


----------



## PacketMan (Nov 9, 2014)

I give up for the night. I believe I have followed the instructions right. I still get a BSoD.  Please remember the BSoD is not simply loss of video card output. It freezes the OS instantly and completely. My keyboard freezes, and I can't even do a shutdown by tapping the power button.  There is only one way out of a BSoD. A hard power cycle.


----------



## PacketMan (Nov 9, 2014)

So here is what I am doing now:


Install 64 bit 10.1-RC4
Log in as root, `pkg install xorg`, then 
	
	



```
hald_enable="YES"
```


```
dbus_enable="YES"
```
 then `service hald start`, `service dbus start`.
Then I install KDE: `pkg install x11/kde4`
Then I add 
	
	



```
kern.vty=vt
```
 to /boot/loader.conf. Just so everyone knows when I do a `more` on that file there is nothing in it, until I add the vty line.

Then I mount /proc, then `echo "exec /usr/local/kde4/bin/startkde" > ~/.xinitrc`, although I confess I'm not sure if I got that last part right.
When I then type `startx` I still get BSoD. I have verified that the OS dies. I have a remote SSH session going and continuous ping. Both die about one second after I type `startx`.

I have checked various log files and they are empty, and /etc/X11/xorg.conf is empty too. I can not find any output that shows Xorg trying to drive my video card. At the beginning of this discussion I mentioned the computer has an Intel GMA 3000 integrated card. Does anyone have any knowledge of this card and what may be the exact culprit?

Let's forget I am trying to get Xorg to work with GNOME or KDE.  What should I be doing to get Xorg on 10.1 correct, and what specific commands can I type to confirm that it is working correctly? And am I missing a log file that will be key?

Or is the real issue here is that FreeBSD is weak with supporting video?


----------



## wblock@ (Nov 9, 2014)

Lines in /boot/loader.conf only take effect on boot.  So you must reboot after adding it.

It says that some of the Optiplex 745c systems included Radeon video cards.  Does yours?  I have used FreeBSD with X on Core2 systems, although I do not know the model number of the graphics system.

I would not add the extra complications of GNOME or KDE until you have X working.


----------



## PacketMan (Nov 9, 2014)

The only thing I have been able to determine is that it has a GMA 3000 integrated card. I'm going to have to do more research on that. I always reboot after I install packages, make changes to files that I figure get read during start up.  What should I know about Radeon cards?

I am wondering if maybe I shouldn't be taking up so much time with you folks.  Just for giggles I did a did a XORG and KDE install on a another machine, this one a ASUS, and I am now exploring KDE for the first time. Nice.Maybe this machine should be 'headless' so to say, and tinker around with this ASUS unit as a desktop for the family to try.


----------



## wblock@ (Nov 9, 2014)

It is not normally this difficult.  But I usually build from ports.  Binary packages make assumptions about the target system.


----------



## PacketMan (Nov 9, 2014)

For Xorg, installing from ports has been failing for me.



wblock@ said:


> It is not normally this difficult.  But I usually build from ports.  Binary packages make assumptions about the target system.





PacketMan said:


> On a side note, on a fresh OS 10.0 installing x11/xorg using ports fails. It says it cannot FTP a MesaLib-7.6.1.tar.bz2 due to file not found.



I'll keep tinkering with the Dell machine with the integrated video card, but not at the pace I was trying. I got KDE going easy peasy on the ASUS unit.

Thanks everyone, for all your contributions.


----------



## PacketMan (Nov 14, 2014)

Guys back to this Dell box. I'm thinking of buying a video card to try and get xorg working. Can you recommend a brand of card that should be 99% certain to work? I don't need a high-fidelity first class traveling set, and I don't need a Learjet, , just a decent 'FreeBSD friendly' brand of video card. Tell me the brand, and I'll figure out the flavor of card to get, unless there is a tech/flavour of card I should avoid.

Thanks again, as always,
PacketMan


----------



## wblock@ (Nov 14, 2014)

If it is the tower model, it should have a full-height PCIe slot.  I use Radeon cards because they are supported by open-source drivers.  Others like the Nvidia cards, which have binary vendor-supplied drivers.

Be warned that the newest Radeon cards are not supported yet.  Anything up to the Radeon HD6000 series will likely work.  Older cards should be cheap.  The HD4650 is decent, about the same performance as the Intel graphics.

I would not give up on the built-in Intel video.  Intel HD 3000 is relatively faster than the Radeon HD5450, a cheap, low-end card.  FreeBSD 10.1 is out now, and it will default to using vt(4).  Installing either ports or packages should get the latest FreeBSD X version.


----------



## PacketMan (Nov 15, 2014)

I have already installed 10.1-RELEASE and no difference. Instant BSoD. The box came with:

http://www.dell.com/downloads/global/products/optix/en/opti_745techspecs.pdf

Integrated Intel Graphics Media Accelerator 965, and a DVI (Digital) Adapter Card. I have tried this with and without the DVI card installed. I can't use the DVI yet anyways because I don't have a cable.


----------



## PacketMan (Nov 15, 2014)

Gosh I hate to ask this, and feel free to pour beer on me if we ever meet. 

Since I got a Ubuntu 14.04 working with video on this box easy peasy, can I find its video configuration file and use that to manually build the file for FreeBSD 10.1? If yes, would someone be able to give me a few pointers?


----------



## wblock@ (Nov 15, 2014)

xorg.conf, you mean?  It should not be needed at all, but it will not do any harm to try it.


----------



## PacketMan (Nov 15, 2014)

Yes. My thinking is the OS is freezing when the card is being probed. If I build my own xorg.conf file using settings from a working Ubuntu configuration file then I just might get lucky. Stay tuned.


----------



## PacketMan (Nov 15, 2014)

Well I can't find a xorg.conf file but I did find the Xorg.o.log on my Ubuntu install. I attached it here if anyone is interested.

This piece seems interesting:

```
[  20.543] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
   i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
   915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
   Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
   GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[  20.544] (II) intel: Driver for Intel(R) HD Graphics: 2000-5000
[  20.544] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100
[  20.544] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200
[  20.544] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  20.544] (II) FBDEV: driver for framebuffer: fbdev
[  20.544] (II) VESA: driver for VESA chipsets: vesa
[  20.544] (++) using VT number 7

[  20.544] (II) intel(0): SNA compiled: xserver-xorg-video-intel 2:2.99.910-0ubuntu1 (Timo Aaltonen <tjaalton@ubuntu.com>)
[  20.544] (WW) Falling back to old probe method for modesetting
[  20.544] (WW) Falling back to old probe method for fbdev
[  20.544] (II) Loading sub module "fbdevhw"
[  20.544] (II) LoadModule: "fbdevhw"
[  20.544] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  20.545] (II) Module fbdevhw: vendor="X.Org Foundation"
[  20.545]    compiled for 1.15.1, module version = 0.0.2
[  20.545]    ABI class: X.Org Video Driver, version 15.0
[  20.545] (WW) Falling back to old probe method for vesa
[  20.545] (--) intel(0): Integrated Graphics Chipset: Intel(R) 965Q
[  20.545] (--) intel(0): CPU: x86, sse2, sse3, ssse3
[  20.545] (II) intel(0): Creating default Display subsection in Screen section
   "Default Screen Section" for depth/fbbpp 24/32
[  20.545] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[  20.545] (==) intel(0): RGB weight 888
[  20.545] (==) intel(0): Default visual is TrueColor
[  20.546] (**) intel(0): Framebuffer tiled
[  20.546] (**) intel(0): Pixmaps tiled
[  20.546] (**) intel(0): "Tear free" disabled
[  20.546] (**) intel(0): Forcing per-crtc-pixmaps? no
[  20.546] (II) intel(0): Output VGA1 has no monitor section
[  20.546] (II) intel(0): Output DVI1 has no monitor section
[  20.546] (II) intel(0): Output VIRTUAL1 has no monitor section
[  20.546] (--) intel(0): Output VGA1 using initial mode 1280x1024 on pipe 0
```
and this piece

```
20.547] (II) intel(0): [XvMC] i965_xvmc driver initialized.
[  20.547] (II) intel(0): [DRI2] Setup complete
[  20.547] (II) intel(0): [DRI2]  DRI driver: i965
[  20.547] (II) intel(0): [DRI2]  VDPAU driver: i965
[  20.547] (II) intel(0): direct rendering: DRI2 Enabled
```


----------

