Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Latest commit

 

History

History
127 lines (86 loc) · 3.11 KB

File metadata and controls

127 lines (86 loc) · 3.11 KB

Configurations for NVIDIA Optimus and Intel

  1. Enable linux
# kldload linux

# sysrc linux_enable="YES"
  1. Install Nvidia and Intel Drivers
  • Make sure that any linux-c6-/c7- not installed. For example:
    /usr/ports/x11/linux-c6-pixman/
    /usr/ports/x11/linux-c7-pixman/
    /usr/ports/x11/linux-c7-xorg-libs/
    /usr/ports/x11/linux-c6-xorg-libs/
    /usr/ports/x11/linux-c7-libxkbcommon/
    
    Remove any of these if its installed. nvidia-driver-libs-xxx will automatically install its relevant dependency
# cd /usr/ports/x11/nvidia-driver-390 && make install clean && cd ..
# cd /linux-nvidia-libs-390 && make install clean && cd ..
  1. Load Nvidia and Enable Nvidia as Nvidia Modeset
# kldload nvidia-modeset

# sysrc nvidia_load=YES

# sysrc kld_list=nvidia-modeset

  1. Generating Xorg Configurations

Many ways available to auto generate the Xorg Configurations


  • Option No. 1**

With Nvidia Optimus using Xorg -configure If you have chosen Nvidia Optimus in BIOS, then do the following Enable Nvidia Optimus in BIOS and Generate Xorg Configurations as follows

# Xorg -configure
# cp /root/xorg.conf.new /etc/X11/xorg.conf

With Discrete Graphics using nvidia-xconfig If you have chosen Nvidia Optimus in BIOS, then do the following Enable Discrete Graphics in BIOS and Generate Nvidia-xconfig

```
# nvidia-xconfig
```
  1. In case of Nvidia Optimus, then

Replace or Add 'vesa' with 'intel' and set the correct VGA Devices' BusId values

# pciconf -lv | grep vga
  • P.S. Two VGA devices must be seen, Nvidia and Intel**
    • Open /etc/X11/xorg.conf and make sure the generated devices' BusId values are correct -- fix if not
    • The result of this step, is either two devices configured or one. Depending on what you want
    • Check the provided X11 xorg configurations
  1. Load i915kms

Evalaute the following command

# kldload i915kms
  • In order to persiste the loade after reboot, add the following line to /boot/loader.conf
# echo "i915kms_load=YES" >> /boot/loader.conf
  1. Set kern.vty in /boot/loader.conf

vty could be one of two options, either vt or sc. In my case I am comfortable with sc -


kern.vty=vt
  1. Append the modest of Nvidia to /boot/loader.conf as follows
nvidia-modeset_load="YES"
  1. Append the contents of /etc/rc.conf, /boot/loader.conf and `/etc/X11/xorg.conf' as provided in this repository.
# reboot
  • [Now you boot in full resolution and you can login to xfce in full resolution, too]

    $ startx
    

References


[] (http://tldp.org/HOWTO/Xterm-Title-3.html) [] (https://www.nvidia.com/Download/driverResults.aspx/137612/en-us)