dettus
Bicycle User
Okay guys, since I was once again unable to find an easy howto, I am writing this one here...
Hopefully it helps somebody!
Keywords: FreeBSD, Nvidia, Intel, Optimus, Drivers
So, my problem was, that I wanted to use the HDMI output of my Laptop on FreeBSD. It has a Geforce GTX 1070, and also a core i7, so it uses both graphics outputs. For a while there were drivers like "Optimus" or "Bumblebee" and "Nouveau" to take care of this. I REALLY do not know anything about them.
Anyways, so here's what I did:
First, I installed xorg
Then, I installed the driver for the graphics cards:
I WANTED to install drm-kmod as well, but there was not package. So I compiled it from the ports
Next thing I did was to add a line to the /etc/rc.conf
and the /boot/loader.conf
Then I rebooted
One thing I noticed was that the output has gotten smaller at this point.
Now, I needed a new xorg.conf
I tested it
It worked, so I cheered a bit, and then I danced.
And here is what the /usr/local/etc/X11/xorg.conf looks like:
Hopefully it helps somebody!
Keywords: FreeBSD, Nvidia, Intel, Optimus, Drivers
So, my problem was, that I wanted to use the HDMI output of my Laptop on FreeBSD. It has a Geforce GTX 1070, and also a core i7, so it uses both graphics outputs. For a while there were drivers like "Optimus" or "Bumblebee" and "Nouveau" to take care of this. I REALLY do not know anything about them.
Anyways, so here's what I did:
First, I installed xorg
Code:
pkg install xorg
Then, I installed the driver for the graphics cards:
Code:
pkg install nvidia-driver
I WANTED to install drm-kmod as well, but there was not package. So I compiled it from the ports
Code:
cd /usr/ports/graphics/drm-kmod
make install
Next thing I did was to add a line to the /etc/rc.conf
Code:
vi /etc/rc.conf
kld_list="nvidia nvidia-modeset linux linux64 /boot/modules/i915kms.ko"
Code:
vi /boot/loader.conf
linux_enable="YES"
Then I rebooted
Code:
reboot
Now, I needed a new xorg.conf
Code:
X -configure
mv /root/xorg.conf.new /usr/local/etc/X11/xorg.conf
I tested it
Code:
startx
It worked, so I cheered a bit, and then I danced.
And here is what the /usr/local/etc/X11/xorg.conf looks like:
Code:
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/share/fonts/misc/"
FontPath "/usr/local/share/fonts/TTF/"
FontPath "/usr/local/share/fonts/OTF/"
FontPath "/usr/local/share/fonts/Type1/"
FontPath "/usr/local/share/fonts/100dpi/"
FontPath "/usr/local/share/fonts/75dpi/"
FontPath "catalogue:/usr/local/etc/X11/fontpath.d"
EndSection
Section "Module"
Load "glx"
Load "glxserver_nvidia"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
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 "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
Identifier "Card0"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "SWcursor" # [<bool>]
#Option "kmsdev" # <str>
#Option "ShadowFB" # [<bool>]
#Option "AccelMethod" # <str>
#Option "PageFlip" # [<bool>]
#Option "ZaphodHeads" # <str>
#Option "DoubleShadow" # [<bool>]
#Option "Atomic" # [<bool>]
#Option "VariableRefresh" # [<bool>]
#Option "UseGammaLUT" # [<bool>]
#Option "AsyncFlipSecondaries" # [<bool>]
Identifier "Card1"
Driver "modesetting"
BusID "PCI:0:2: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
Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
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