# Xorg configuration for Nvidia Geforce gtx 1050 ti



## BlueKenny (May 30, 2018)

Hallo everyone,

I have some trouble with my Tuxedo DX1707, on Fedora and Ubuntu I needed to install it in CLI, then install Nvidia driver and start the GUI, otherwise it freeze.
With the upgrade from Fedora 26 to 27, NVidia driver stop working and I changed it to nv(4) driver, it worked like a charm.

Now I would like to return to FreeBSD, I installed: xorg, slim and lumina, how can I get xorg to work on with this configuration?
All my tests failed, with nv or nvidia, is it possible?
(I'm not a gamer and I prefer nv if it is possible  )


----------



## SirDice (May 30, 2018)

The nv(4) driver has some acceleration. But I would still recommend using the x11/nvidia-driver. Even for plain desktop work it will perform a lot better (moving windows for example).


----------



## BlueKenny (May 30, 2018)

Thank you for your answer, can you explain me how to configure it ? The default, linux and nvidia Kernel module in /boot/loader.conf isn't enougt


----------



## rigoletto@ (May 30, 2018)

/boot/loader.conf
`nvidia-modeset_load="YES"`

You *may* need this too to be able to switch from X to console:
`hw.vga.textmode="1"`


----------



## tobik@ (May 31, 2018)

BlueKenny said:


> Thank you for your answer, can you explain me how to configure it ? The default, linux and nvidia Kernel module in /boot/loader.conf isn't enougt


See https://forums.freebsd.org/threads/howto-setup-xorg-with-nvidias-driver.52311/


----------



## SirDice (May 31, 2018)

Note that the Linux option of the NVidia driver is just for the driver to support the Linux compatibility. It's not required for the driver to function for "native" FreeBSD applications.


----------



## BlueKenny (Jun 1, 2018)

Thank you everyone for your help,
This are my files:

/boot/loader.conf:

```
kern.vty=vt
```

/etc/rc.conf:

```
hald_enable="YES"
dbus_enable="YES"
slim_enable="YES"
kld_list="nvidia-modeset"
```

/usr/local/etc/X11/xorg.conf.d/driver-nvidia,conf:

```
Section "Device"
  Identifier "NVIDIA Card"
  VendorName "NVIDIA Corporation"
  Driver "nvidia"
  BusID "PCI:1:0:0"
EndSection
```

/usr/local/etc/X11/xorg.conf.d/screen-resolution.conf:

```
Section "Screen"
  Identifier "Screen0"
  Device "Card0"
  SubSection "Display"
    Modes "1024x768"
  EndSubSection
EndSection
```
Slim doesn t start, "start-lumina-desktop" failed, the log from Xorg say "Screen(s) found, but none have a usable configuration"
(Thats why i added the screen-resolution file)

PS i never had a problem to configure FreeBSD with a cheap PC 

How can I test my screen? "xrandr" say no screen found


----------



## SirDice (Jun 1, 2018)

Please post your Xorg.0.log on Pastebin (or a similar service) so we can have a look. You may find misc/pastebinit useful for this.


----------



## BlueKenny (Jun 1, 2018)

This is my Xorg.0.log
https://pastebin.com/c5294QKv

It detect 2 displays (but it has only 1) but none can be configure, how to know which configuration is needed ?


----------



## SirDice (Jun 1, 2018)

BlueKenny said:


> It detect 2 displays (but it has only 1) but none can be configure


No, it detects two outputs but doesn't detect a display attached to either one. Did you  perhaps connect your display to an onboard video instead of the NVidia card?

Is this a laptop or a desktop? If it's a laptop does it have Optimus?


----------



## BlueKenny (Jun 1, 2018)

It is a Laptop/Notebook/Portable

I see the CLI output on the screen

"pciconf -lv | grep -B3 display"
https://pastebin.com/6nzzuQSH
I tried to configure it for the Intel only and for Nvidia Only (posted here) but nothing works


----------



## rigoletto@ (Jun 1, 2018)

Slim can be a bit tricky to make work. You should carefully tweak /usr/local/etc/slim.conf.


----------



## BlueKenny (Jun 1, 2018)

lebarondemerde said:


> Slim can be a bit tricky to make work. You should carefully tweak /usr/local/etc/slim.conf.


Do you think the problem is slim ?, i alway configure it in my .xinitrc file and start slim with "slim_enable" in rc.conf but with this Laptop :/ i can't start a basic X11 session...
After searching 1 week it doesn't go forward.. I thoug me 2 days to make fedora Working after buying this PC


----------



## rigoletto@ (Jun 1, 2018)

Try with something very simple like x11-wm/openbox

`echo "exec openbox-session" >> ~/.xinitrc`

Did you copy that or is that comma before conf a typo?

/usr/local/etc/X11/xorg.conf.d/driver-nvidia,conf

EDIT:

Btw, you do not need any of these for Lumina:


```
hald_enable="YES"
dbus_enable="YES"
```

Load it from /boot/loader.conf as I pointed before instead of from /etc/rc.conf:

`nvidia-modeset_load="YES"`

You can also try `nvidia_load="YES"` instead. Or ever both:

`nvidia_load="YES"
nvidia-modeset_load="YES"`

See Thread 57477/#post-327831


----------



## BlueKenny (Jun 1, 2018)

Thanks and yes it was a typo.

/usr/local/etc/X11/xorg.0.d/screen-resolution.conf : https://pastebin.com/MzQxM2Ck

/usr/local/etc/X11/xorg.0.d/driver-nvidia.conf: https://pastebin.com/Nm36b7FL

/boot/loader.conf
https://pastebin.com/riE69AVg

After executing startx  the error is the same...
https://pastebin.com/ZxxgZCAQ


----------



## shkhln (Jun 1, 2018)

You still haven't answered the question whether it's an Optimus equipped laptop.


----------



## BlueKenny (Jun 1, 2018)

shkhln said:


> You still haven't answered the question whether it's an Optimus equipped laptop.


It as an Intel Chip for batterie saving and a Nvidia Grafik for the Performance, so its called Optimus i think

https://pastebin.com/6nzzuQSH


----------



## shkhln (Jun 1, 2018)

In that case you should upgrade to 11.2 beta, install _drm-stable-kmod_ and get basic video output working with Intel. Only after that you might actually attempt to setup 3d accelleration with Nvidia card: https://wiki.freebsd.org/Graphics/OptimusVideoSupport.



BlueKenny said:


> It as an Intel Chip for batterie saving and a Nvidia Grafik for the Performance, so its called Optimus i think



So, no idea. Which laptop model it is?


----------



## BlueKenny (Jun 1, 2018)

shkhln said:


> In that case you should upgrade to 11.2 beta, install _drm-stable-kmod_ and get basic video output working with Intel. Only after that you might actually attempt to setup 3d accelleration with Nvidia card: https://wiki.freebsd.org/Graphics/OptimusVideoSupport.
> 
> 
> 
> So, no idea. Which laptop model it is?


I will try it 

It is a Tuxedo DX1707


----------



## shkhln (Jun 1, 2018)

BlueKenny said:


> It is a Tuxedo DX1707



Ah, sorry. I read the first post at least twice, googled that brand even, and then completely forgot about it. Yeah, they claim Optimus support which usually means Nvidia's card is not physically attached to the display.


----------



## BlueKenny (Jun 3, 2018)

It works with Intel driver  thank you, i will try to get Nvidia working to write the answer here


----------

