Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Nvidia / IntelHD Optimus Problems [Solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Faraclas
Tux's lil' helper
Tux's lil' helper


Joined: 08 Dec 2014
Posts: 117

PostPosted: Mon Mar 16, 2015 4:06 pm    Post subject: Nvidia / IntelHD Optimus Problems [Solved] Reply with quote

For complete background see my build notes: https://docs.google.com/document/d/1ceLv8lyxv4660QfIuklbRJb0ozh_zeSfaty2FLKhtr0/edit?usp=sharing

This is very similar to this issue but I think different enough as well: https://forums.gentoo.org/viewtopic-t-1010746.html

In summary, the computer shipped with Ubuntu and before I wiped the drive to start over, I copied the Ubuntu installation over to an external SSD which I can still boot off of. In Ubuntu, all monitors are working well (multiples work, hot-plugging works) and glxgears is showing 6000+ FPS. In Gentoo, all monitors are not working (no externals work, no hotplugging) and glxgears is showing 500 FPS.

I'm using the XRandR commands by adding the following into /etc/gdm/Init/Default

Code:
#Lines added for optimus
exec xrandr --setprovideroutputsource modesetting NVIDIA-0
exec xrandr --auto


and here is my xorg.conf

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

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    BusID          "PCI:2:0:0"
    # Option       "ConstrainCursor" "off"
EndSection

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

Section "Device"
    Identifier     "intel"
    Driver         "modesetting"
    # BusID        "PCI:0:2:0"
    Option         "AccelMethod" "SNA"
    #Option        "AccelMethod" "none"
EndSection

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


The interesting thing to me is that
a) I cannot find any similar XRandR lines anywhere on the Ubuntu system. It doesn't mean it doesn't exist, but I couldn't find it.
b) The Ubuntu xorg.conf section for the intel device looks like this:

Code:
Excerpt from Ubuntu’s xorg.conf
Section "Device"
    Identifier "intel"
    Driver "intel"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "SNA"
EndSection


And it is interesting that Ubuntu is using "intel" and not "modesetting" for the driver. However, if I try that I get a black screen probably becuase of the xrandr line specifying modesetting. To get the modesetting line to work, I added modesetting to my VIDEO_CARDS in make.conf as

Code:
VIDEO_CARDS="intel i965 nvidia modesetting" 


I also tried setting the xrandr line to be

Code:
exec xrandr --setprovideroutputsource intel NVIDIA-0


but got a black screen here.

Here is the Xorg Log from Gentoo (extracted from journalctl): https://bpaste.net/show/01b187d1c458
Here is the Xorg Log from Ubuntu: http://paste.ubuntu.com/10608257/

HOWEVER (from the Ubuntu log)

Code:
[    14.775] (II) intel(G0): SNA initialized with Haswell (gen7.5, gt2) backend
[    14.775] (==) intel(G0): Backing store enabled
[    14.775] (==) intel(G0): Silken mouse enabled
[    14.775] (II) intel(G0): HW Cursor enabled
[    14.775] (II) intel(G0): RandR 1.2 enabled, ignore the following RandR disabled message.
[    14.776] (==) intel(G0): DPMS enabled
[    14.776] (II) intel(G0): [DRI2] Setup complete
[    14.776] (II) intel(G0): [DRI2]   DRI driver: i965
[    14.776] (II) intel(G0): [DRI2]   VDPAU driver: i965
[    14.776] (II) intel(G0): direct rendering: DRI2 enabled
[    14.776] (II) intel(G0): hardware support for Present enabled
[    14.776] (WW) intel(G0): Option "AllowEmptyInitialConfiguration" is not used
[    14.776] (WW) intel(G0): Option "IgnoreDisplayDevices" is not used
[    14.776] (==) intel(G0): display hotplug detection enabled


We can see that RandR is enabled form the intel driver and the intel driver is handling the hotplug.

So basically, how can I make my system do what the Ubuntu system is doing?

Thanks!!!
Back to top
View user's profile Send private message
Faraclas
Tux's lil' helper
Tux's lil' helper


Joined: 08 Dec 2014
Posts: 117

PostPosted: Sat Mar 21, 2015 7:09 am    Post subject: Reply with quote

Basically I was going about it the wrong way. Ubuntu was using Primus / Bumblebee and just not being open about it.

I installed Bumblebee and then primus. It is working GREAT!

Obviously, steam and the games run much better using primusrun. The interesting thing is that I also now use primusrun to launch VirtualBox. My Win8 VM is running at near native speeds. ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum