# Display problems!



## Jediah (Mar 4, 2015)

Hi beloved FreeBSD users,
I am an old Linux Debian user, and I decided to try freeBSD FreeBSD 10.1.

Thanks to some knowledge of Linux commands I could understand the FreeBSD OS better, so I installed the OS and typed in `pkg install xorg mate-desktop slim`. I configured the .xinitrc and enabled. After rebooting the system, Mate login screen come up, I typed my user name and pass, it fails. The screen turning into a a bunch of color bars and logs back out to the black screen and Mate login screen again.  I login with root without problems, but mouse is moving very slow and and glitch a lot, so I start the command terminal as root I used the command `pkg install nvidia-driver` and restarted the system, no changes at all, I have some issue with the screen. Even the compiz effects are not working, and I got a kernel panic once.

Am I missing something here, what am I doing wrong?

Personal opinion I think freebsd FreeBSD is awesome and thanks god that I knew some commands.  But my big question is why people say that Linux are its own OS and it has nothing to do with Unix or BSD, the biggest question is why Linus Torvalds is so afraid of Ubuntu and Debian, when he him self was approached by NSA agent that wanted him to open backdoors in the Linux kernel for them?

Is there a FreeBSD from scratch project like Linux?


----------



## SirDice (Mar 5, 2015)

Jediah said:


> Am I missing something here, what am I doing wrong?


Please post your /var/log/Xorg.0.log on something like pastebin and provide the URL. That way we can see what's going on.


----------



## Jediah (Mar 5, 2015)

SirDice said:


> Please post your /var/log/Xorg.0.log on something like pastebin and provide the URL. That way we can see what's going on.


I typed the command in terminal : `nano /var/log/xorg.0.log`, the page is empty, there is nothing in there!


----------



## Jediah (Mar 5, 2015)

SirDice said:


> Please post your /var/log/Xorg.0.log on something like pastebin and provide the URL. That way we can see what's going on.


I copy and pasted your /var/log/Xorg.0.log and I got this:

```
[  26.436]
X.Org X Server 1.14.7
Release Date: 2014-06-05
[  26.436] X Protocol Version 11, Revision 0
[  26.436] Build Operating System: FreeBSD 10.0-RELEASE-p9 amd64
[  26.436] Current Operating System: FreeBSD tiberius 10.1-RELEASE FreeBSD 10$
[  26.436] Build Date: 25 February 2015  02:19:25PM
[  26.436]
[  26.436] Current version of pixman: 0.32.6
[  26.436]  Before reporting problems, check [URL]http://wiki.x.org[/URL]
  to make sure that you have the latest version.
[  26.436] Markers: (--) probed, (**) from config file, (==) default setting,
  (++) from command line, (!!) notice, (II) informational,
  (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  26.437] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Mar  5 13:53:57 20$
[  26.513] (II) Loader magic: 0x7eb850
[  26.513] (II) Module ABI versions:
[  26.513]  X.Org ANSI C Emulation: 0.4
[  26.513]  X.Org Video Driver: 14.1
```


----------



## Jediah (Mar 5, 2015)

SirDice said:


> Please post your /var/log/Xorg.0.log on something like pastebin and provide the URL. That way we can see what's going on.


This is from the `nano /etc/rc.conf`

```
hostname="tiberius"
keymap="swedish.iso.kbd"
ifconfig_msk1="DHCP"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dbus_enable="YES"
hald_enable="YES"
slim_enable="YES"
linux_enable="YES"
```


----------



## Jediah (Mar 5, 2015)

SirDice said:


> Please post your /var/log/Xorg.0.log on something like pastebin and provide the URL. That way we can see what's going on.


And this is from the `nano .xinitrc` and `nano home/home/my'user'name/.xinitrc`

```
exec mate-session
```


----------



## SirDice (Mar 6, 2015)

Jediah said:


> I typed the command in terminal : `nano /var/log/xorg.0.log`, the page is empty, there is nothing in there!


UNIX and UNIX-like systems are case-sensitive. So xorg.0.log is not the same as Xorg.0.log.



Jediah said:


> I copy and pasted your /var/log/Xorg.0.log and I got this:


That's only a small part of it, we need to see the whole thing.


----------



## Jediah (Mar 6, 2015)

SirDice said:


> UNIX and UNIX-like systems are case-sensitive. So xorg.0.log is not the same as Xorg.0.log.
> 
> 
> That's only a small part of it, we need to see the whole thing.


That's is all I had, that was the whole thing.


----------



## tobik@ (Mar 6, 2015)

Really? What does `wc -l < /var/log/Xorg.0.log` say?


----------



## Jediah (Mar 6, 2015)

As root in terminal with the command ~ # `wc -l < /var/log/Xorg.0.log`
it says
927
that is it, only.


----------



## Jediah (Mar 6, 2015)

I have tried to reinstall the FreeBSD OS again, and I get the same result again, i reinstalled the OS 3 times and I don't know what I am doing wrong.  After install I install the packages through ttyv0, nano, Xorg, slim, and Mate-Desktop and I configure the text files with `nano .xinitrc` and `nano home/home/my'user'name/.xinitrc` as i mentioned above!


----------



## tobik@ (Mar 6, 2015)

Then you did not post the whole file 

`wc -l` counts lines. You posted ~14 lines of /var/log/Xorg.0.log, where it really has 927 lines.

To upload that file somewhere install e.g. misc/pastebinit (`pkg install misc/pastebinit`) and upload it with `pastebinit -b cxg.de < /var/log/Xorg.0.log`. Post the URL so we can take a look.


----------



## wblock@ (Mar 6, 2015)

Reinstalling the operating system is a Windows trick, usually not necessary and just a waste of time with FreeBSD.  X is not part of the operating system, so starting from scratch does not help find the problem.

Please identify the video card being used.  As a test, I suggest removing .xinitrc and trying just `startx` to make sure X will work.  On a stock system, that will start X and show three terminal windows.  Once that works, then configure the fancier and more complicated desktop environment.


----------



## Jediah (Mar 6, 2015)

tobik said:


> Then you did not post the whole file
> 
> `wc -l` counts lines. You posted ~14 lines of /var/log/Xorg.0.log, where it really has 927 lines.
> 
> To upload that file somewhere install e.g. misc/pastebinit (`pkg install misc/pastebinit`) and upload it with `pastebinit -b cxg.de < /var/log/Xorg.0.log`. Post the URL so we can take a look.


I assume that this is what your are looking for, and I believe that this is the same from the [?]. I don't understand much of this, do you?
Here are the 927 lines.


----------



## Jediah (Mar 6, 2015)

It says that it's too long to post. And I tried to upload the text file that I was pasting the 927 lines in it. It won't allow me.
The uploaded file does not have an allowed extension.


----------



## Jediah (Mar 6, 2015)

tobik said:


> Then you did not post the whole file
> 
> `wc -l` counts lines. You posted ~14 lines of /var/log/Xorg.0.log, where it really has 927 lines.
> 
> To upload that file somewhere install e.g. misc/pastebinit (`pkg install misc/pastebinit`) and upload it with `pastebinit -b cxg.de < /var/log/Xorg.0.log`. Post the URL so we can take a look.


http://cxg.de/_545914.htm


----------



## tobik@ (Mar 6, 2015)

Great, so Xorg uses the wrong driver. It should use nvidia but currently uses nv. Make sure you still have x11/nvidia-driver installed and have loaded the NVIDIA kernel module. It should appear in `kldstat`'s output, if not add nvidia_load="YES" to /boot/loader.conf and reboot.

Remove any pre-existing /etc/X11/xorg.conf or /usr/local/etc/X11/xorg.conf for now.
Then create /usr/local/etc/X11/xorg.conf.d/10-nvidia.conf with

```
Section "Device"
        Identifier "NVIDIA Card"
        VendorName "NVIDIA Corporation"
        Driver "nvidia"
EndSection
```

This should be enough to start Xorg with the correct driver.


----------



## Jediah (Mar 6, 2015)

tobik said:


> Great, so Xorg uses the wrong driver. It should use nvidia but currently uses nv. Make sure you still have x11/nvidia-driver installed and have loaded the NVIDIA kernel module. It should appear in `kldstat`'s output, if not add nvidia_load="YES" to /boot/loader.conf and reboot.
> 
> Remove any pre-existing /etc/X11/xorg.conf or /usr/local/etc/X11/xorg.conf for now.
> Then create /usr/local/etc/X11/xorg.conf.d/10-nvidia.conf with
> ...


Thank you very much for your patience with me, but I need you to slow down. 
OK. How do I do this, step by step please, I am a little bit rusty and I think as a 75 years old man.


----------



## tobik@ (Mar 6, 2015)

I am assuming that your editor is `nano` and that you setup your /etc/rc.conf in the same way as you did above.

As root do the following

`pkg install x11/nvidia-driver` (does nothing if already installed)
`nano /boot/loader.conf`
 Add a line with nvidia_load="YES" at the end
 Save, then quit nano.
 `rm /etc/X11/xorg.conf /usr/local/etc/X11/xorg.conf` (ok if this fails)
 `mkdir -p /usr/local/etc/X11/xorg.conf.d` (to create this directory if it does not yet exist. This is safe to execute even if it exists.)
 `nano /usr/local/etc/X11/xorg.conf.d/10-nvidia.conf`
 Paste the code block from my last post in there
 Save, then quit nano.
 Reboot with `shutdown -r now`
 If everything worked you should be at slim's login prompt.
 If it still does not work post your /var/log/Xorg.0.log again.


----------



## Jediah (Mar 6, 2015)

tobik said:


> I am assuming that your editor is `nano` and that you setup your /etc/rc.conf in the same way as you did above.
> 
> As root do the following
> 
> ...


After that I `shutdown -r now`. The kernel did not start, it was stuck. So I had to reinstall everything from scratch and follow all the steps in the thread!
I don't know if Compiz and Compiz-fusion emerald is the reason behind it, because when I install x11-wm/compiz it looks like the system fetching NVidia 340 something I think I saw.
http://cxg.de/_d1f959.htm


----------



## tobik@ (Mar 6, 2015)

Progress! Xorg now loads the correct driver, however the log says

```
[   626.661] (WW) NVIDIA(0): The NVIDIA Quadro FX 570 GPU installed in this system is
[   626.661] (WW) NVIDIA(0):     supported through the NVIDIA 340.xx Legacy drivers. Please
[   626.661] (WW) NVIDIA(0):     visit http://www.nvidia.com/object/unix.html for more
[   626.661] (WW) NVIDIA(0):     information.  The 346.35 NVIDIA driver will ignore this
[   626.661] (WW) NVIDIA(0):     GPU.  Continuing probe...
```

Your graphics card seems to be only supported by an older version of NVIDIA's driver.


 Remove the newer version with `pkg remove nvidia-driver`
 Install the older version: `pkg install nvidia-driver-340`
 Reboot, there should be no need to change anything else.

Fingers crossed.


----------



## SirDice (Mar 6, 2015)

Don't worry too much about the "special effects" like x11-wm/compiz. Lets get a basic graphical desktop working first. Looking at the last log you posted it looks like you have an older NVidia card. This means you will have to use an older driver. This should fix that:
`pkg delete nvidia-driver`
`pkg install nvidia-driver-340`


----------



## Jediah (Mar 6, 2015)

You guys are freaking awesome! I got the Nvidia log at start!
But the compiz effect is not working at all for some funny reason!


----------



## rmoe (Mar 7, 2015)

Listen to what the professionals here tell you!

FIRST get the beast working. Then and only then you should care about candy and gadgets like compiz.

Also `pkg install x11/nvidia-xconfig` and run it once (`nvidia-xconfig`). While it's not absolutely necessary I've oftentimes seen it to solve nvidia and X related troubles.

If there are still problems with X startup tell us the output of `grep '(EE)' /var/log/Xorg.0.log` and for good measure the output of `grep '(WW)' /var/log/Xorg.0.log`.


----------



## Jediah (Mar 7, 2015)

rmoe said:


> Listen to what the professionals here tell you!
> 
> FIRST get the beast working. Then and only then you should care about candy and gadgets like compiz.
> 
> ...




```
root@system-core:~ # pkg install X11/nvidia-xconfig
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%  944 B  0.9kB/s  00:01
Fetching packagesite.txz: 100%  5 MiB  5.3MB/s  00:01
Processing entries: 100%
FreeBSD repository update completed. 23998 packages processed
The following 1 packages will be affected (of 0 checked):

New packages to be INSTALLED:
   nvidia-xconfig: 310.14

The process will require 187 KiB more space.
71 KiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching nvidia-xconfig-310.14.txz: 100%  71 KiB  72.9kB/s  00:01
Checking integrity... done (0 conflicting)
[1/1] Installing nvidia-xconfig-310.14...
[1/1] Extracting nvidia-xconfig-310.14: 100%
root@system-core:~ # nvidia-xconfig
New WARNING: Unable to locate/open X configuration file.

pkg-config: not found
New X configuration file written to '/etc/X11/xorg.conf'
WARNING: Unable to locate/open X configuration file.

pkg-config: not found
New X configuration file written to '/etc/X11/xorg.conf
root@system-core:~ # grep '(EE)' /var/log/Xorg.0.log
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
root@system-core:~ # grep '(WW)' /var/log/Xorg.0.log
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 43.633] (WW) Unresolved symbol: fbGetGCPrivateKey
[ 43.634] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
root@system-core:~ #
```


----------



## Jediah (Mar 7, 2015)

This is the /etc/X11/xorg.conf:

```
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 310.14  (root@101amd64-default-job-08)  Fri Mar  6 15:02:42 UTC 2015


Section "ServerLayout"
  Identifier  "Layout0"
  Screen  0  "Screen0" 0 0
  InputDevice  "Keyboard0" "CoreKeyboard"
  InputDevice  "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

  # generated from default
  Identifier  "Mouse0"
  Driver  "mouse"
  Option  "Protocol" "auto"
  Option  "Device" "/dev/sysmouse"
  Option  "Emulate3Buttons" "no"
  Option  "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

  # generated from default
  Identifier  "Keyboard0"
  Driver  "keyboard"
EndSection

Section "Monitor"
  Identifier  "Monitor0"
  VendorName  "Unknown"
  ModelName  "Unknown"
  HorizSync  28.0 - 33.0
  VertRefresh  43.0 - 72.0
  Option  "DPMS"
EndSection

Section "Device"
  Identifier  "Device0"
  Driver  "nvidia"
  VendorName  "NVIDIA Corporation"
EndSection

Section "Screen"
  Identifier  "Screen0"
  Device  "Device0"
  Monitor  "Monitor0"
  DefaultDepth  24
EndSubSection
EndSection
```


----------



## rmoe (Mar 7, 2015)

Great, X doesn't spit out errors.

Would you care telling us what you see on your screen?

If you worry about the missing pkg-config you can `pkg install devel/pkgconf`.


----------



## Jediah (Mar 7, 2015)

Before Mate-Session I see the Nvidia Logo. It is the Mate desktop that comes up after ttyv0 Login:, some times when I log in, it log back out to ttyv0, like if it restarting again and back to Mate login screen.


----------



## rmoe (Mar 7, 2015)

Sorry, Jediah,

But for mate stuff my capability to help is limited to, if at all, some detail questions. But maybe some mate users can help you with the rest.

Good luck!


----------



## Jediah (Mar 7, 2015)

Awesome, thank you rmoe!
Is there any awesome video and image editing for FreeBSD, like Corel Aftershot pro2 and other of Corel programs?


----------

