bosim/FedoraPrime

Intel driver or modesetting

mvoropaiev opened this issue · 4 comments

According to http://us.download.nvidia.com/XFree86/Linux-x86/358.16/README/randr14.html, the driver for Intel device should be modesetting, not a "full" intel driver, since the device (if I understand correctly) is only used to display the data processed by nvidia card. What do you think?

euoar commented

It seems that this is what is beeing used by ubuntu nvidia-prime. This is the xorg.conf generated by it in my laptop:

Ubuntu xorg.conf with nvidia-prime

Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection

Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0@0:2:0"
Option "AccelMethod" "None"
EndSection

Section "Screen"
Identifier "intel"
Device "intel"
EndSection

Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1@0:0:0"
Option "ConstrainCursor" "off"
EndSection

Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration" "on"
Option "IgnoreDisplayDevices" "CRT"
EndSection

Indeed they are using modesetting too.
For Fedora with X server 1.17.2 and higher (even for Fedora 22) hovewer, you can use even simpler config as stated here: http://us.download.nvidia.com/XFree86/Linux-x86/358.16/README/randr14.html

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "<BusID for NVIDIA device here>"
    Option "AllowEmptyInitialConfiguration"
EndSection
euoar commented

Nice, thanks for the link!

They are basically using modesetting to get around a mesa bug that showed up in 11.x. The bug was that when booting up with nvidia drivers there would be no display (black screen) unless the the display was put to sleep & then woke up. (default is 300 sec
So rather than fix they went to modesetting. The downside of modesetting is tearfree can't be enabled for the Intel display so no way to eliminate tearing like one could/can with sna.

When the prime sync patches show up in next xorg release tearing should be fixed.