From mboxrd@z Thu Jan 1 00:00:00 1970 X-Received: by 10.70.92.134 with SMTP id cm6mr975939pdb.0.1423093968494; Wed, 04 Feb 2015 15:52:48 -0800 (PST) X-BeenThere: voidlinux@googlegroups.com Received: by 10.107.30.131 with SMTP id e125ls279541ioe.43.gmail; Wed, 04 Feb 2015 15:52:48 -0800 (PST) X-Received: by 10.50.51.67 with SMTP id i3mr108070igo.15.1423093968321; Wed, 04 Feb 2015 15:52:48 -0800 (PST) Date: Wed, 4 Feb 2015 15:52:46 -0800 (PST) From: Antonio Malcolm To: voidlinux@googlegroups.com Message-Id: Subject: Setting Up Nvidia Optimus Render Offloading Via Randr MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_46_220393900.1423093966974" ------=_Part_46_220393900.1423093966974 Content-Type: multipart/alternative; boundary="----=_Part_47_1898469872.1423093966975" ------=_Part_47_1898469872.1423093966975 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Setting Up Nvidia Optimus Render Offloading Via Randr Ok, so I was banging on this for a while last night. I encountered two issues which aren't making sense to me, at the moment. They could be issues with the kernel, a kernel module, Xorg, or just my config (though I beleive, according to documentation and other info from around the web, that at least one of my config iterations should have worked). I started, of course, by following the (VERY) basic directions, which admittedly, are so basic they might be a bit too sparse: http://us.download.nvidia.com/XFree86/Linux-x86/325.15/README/randr14.html Before I go any further, I should mention I have xorg-minimal, xf86-video-intel, xf86-video-modesetting, xrandr and the nvidia package installed, and all five installed with no issues. As well, both the Intel and Modesetting drivers work. Running on the Intel GPU, alone, via either the intel or modesetting driver, works, and with my primary settings in 90-monitor.conf. This makes the first issue I encountered all the more baffling. The error from my Xorg log file: Undefined device "Internal Screen Intel" referenced by ServerLayout "Displays" (...naming conventions not withstanding- I've tried swapping device and layout names, and have tried doing it exactly by the above README, but it makes no difference.) Other than Nvidia's conifg, I've also attempted my own (as I have screen resolutions I'd like to manage, as I'm on QHD 3200x1800, and need things to be readable). I've attemtped the below both with and without the ServerLayout field. With it, I get the above error. Without it, it simply uses the Intel GPU. Section "ServerLayout" Identifier "Displays" Screen 0 "Internal Screen Nvidia" Inactive "Internal Screen Intel" EndSection Section "Monitor" Identifier "Internal Display" Modeline "3200x1800_60.00" 491.57 3200 3448 3800 4400 1800 1801 1804 1862 -HSync +Vsync Modeline "2560x1440_59.90" 311.31 2560 2744 3024 3488 1440 1441 1444 1490 -HSync +Vsync Modeline "2400x1350_60.00" 273.59 2400 2568 2832 3264 1350 1351 1354 1397 -HSync +Vsync Modeline "2240x1260_60.00" 237.85 2240 2400 2640 3040 1260 1261 1264 1304 -HSync +Vsync Modeline "2080x1170_60.00" 203.45 2080 2216 2440 2800 1170 1171 1174 1211 -HSync +Vsync Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync Option "PreferredMode" "1920x1080_60.00" EndSection Section "Device" Identifier "Intel Corporation Crystal Well Integrated Graphics Controller" BusId "PCI:0:2:0" Driver "modesetting" Option "monitor-eDP1" "Internal Display" # Option "monitor-DP1" "" # Option "monitor-HDMI1" "" EndSection Section "Screen" Identifier "Internal Screen Intel" Device "Intel Corporation Crystal Well Integrated Graphics Controller" Monitor "Internal Display" DefaultDepth 24 SubSection "Display" Depth 24 Modes "3200x1800_60.00" "2560x1440_59.90" "2400x1350_60.00" "2240x1260_60.00" "2080x1170_60.00" "1920x1080_60.00" EndSubSection SubSection "Display" Depth 16 Modes "3200x1800_60.00" "2560x1440_59.90" "2400x1350_60.00" "2240x1260_60.00" "2080x1170_60.00" "1920x1080_60.00" EndSubSection SubSection "Display" Depth 8 Modes "3200x1800_60.00" "2560x1440_59.90" "2400x1350_60.00" "2240x1260_60.00" "2080x1170_60.00" "1920x1080_60.00" EndSubSection SubSection "Display" Depth 4 Modes "3200x1800_60.00" "2560x1440_59.90" "2400x1350_60.00" "2240x1260_60.00" "2080x1170_60.00" "1920x1080_60.00" EndSubsection EndSection Section "Device" Identifier "NVIDIA Corporation GK104M [GeForce GTX 870M]" Driver "nvidia" BusId "PCI:1:0:0" EndSection Section "Screen" Identifier "Internal Screen Nvidia" Device "NVIDIA Corporation GK104M [GeForce GTX 870M]" EndSection With or without the ServerLayout block, NVIDIA-0 is not recognized in my /etc/lightdm/display_setup.sh script (also as instructed by the Nvidia README, and used by lightdm): xrandr --setprovideroutputsource modesetting NVIDIA-0 xrandr --auto xrandr --setprovideroutputsource modesetting NVIDIA-0 returns: Could not find provider with name NVIDIA-0 xrandr --listproviders returns only intel, or modesetting, if I'm using the modesetting driver. lspci | grep -i '3D' returns: 01:00.0 3D controller: NVIDIA Corporation GK104M [GeForce GTX 870M] (rev a1) lspci | grep -i 'VGA' returns: 00:02.0 VGA compatible controller: Intel Corporation Crystal Well Integrated Graphics Controller (rev 08) Also worthy of mention, installation of the nvidia package precludes the use of libGl, for the intel integrated GPU, meaning, at such a point, no Nvidia means no OpenGL acceleration, though I may try the solution for that mentioned here: http://askubuntu.com/questions/220271/no-glx-on-intel-card-with-multiseat-with-additional-nvidia-card ------=_Part_47_1898469872.1423093966975 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Setting Up Nvidia Optimus Render Offloading Via Randr
<= br>Ok, so I was banging on this for a while last night. I encountered two i= ssues which aren't making sense to me, at the moment.
They could be issu= es with the kernel, a kernel module, Xorg, or just my config (though I bele= ive, according to documentation and other info from around the web, that at= least one of my config iterations should have worked).

I started, o= f course, by following the (VERY) basic directions, which admittedly, are s= o basic they might be a bit too sparse:

http://us.download.nvidia.co= m/XFree86/Linux-x86/325.15/README/randr14.html

Before I go any furth= er, I should mention I have xorg-minimal, xf86-video-intel, xf86-video-mode= setting, xrandr and the nvidia package installed, and all five installed wi= th no issues. As well, both the Intel and Modesetting drivers work.
Runn= ing on the Intel GPU, alone, via either the intel or modesetting driver, wo= rks, and with my primary settings in 90-monitor.conf. This makes the first = issue I encountered all the more baffling.

The error from my Xorg lo= g file:

Undefined device "Internal Screen Intel" referenced by Serve= rLayout "Displays"

(...naming conventions not withstanding- I've tri= ed swapping device and layout names, and have tried doing it exactly by the= above README, but it makes no difference.)

Other than Nvidia's coni= fg, I've also attempted my own (as I have screen resolutions I'd like to ma= nage, as I'm on QHD 3200x1800, and need things to be readable).
I've att= emtped the below both with and without the ServerLayout field. With it, I g= et the above error. Without it, it simply uses the Intel GPU.   <= br>
Section "ServerLayout"
  Identifier "Displays"
  Scr= een 0 "Internal Screen Nvidia"
  Inactive "Internal Screen Intel"EndSection

Section "Monitor"
  Identifier "Internal Displa= y"
  Modeline "3200x1800_60.00" 491.57 3200 3448 3800 4400 1800 180= 1 1804 1862 -HSync +Vsync
  Modeline "2560x1440_59.90" 311.31 2560 = 2744 3024 3488 1440 1441 1444 1490 -HSync +Vsync
  Modeline "2400x1= 350_60.00" 273.59 2400 2568 2832 3264 1350 1351 1354 1397 -HSync +Vsync
=   Modeline "2240x1260_60.00" 237.85 2240 2400 2640 3040 1260 1261 1264= 1304 -HSync +Vsync
  Modeline "2080x1170_60.00" 203.45 2080 2216 2= 440 2800 1170 1171 1174 1211 -HSync +Vsync
  Modeline "1920x1080_60= .00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
 = Option "PreferredMode" "1920x1080_60.00"
EndSection

Section "Dev= ice"
  Identifier "Intel Corporation Crystal Well Integrated Graphi= cs Controller"
  BusId "PCI:0:2:0"
  Driver "modesetting"  Option "monitor-eDP1" "Internal Display"
#  Option "monito= r-DP1" ""
#  Option "monitor-HDMI1" ""
EndSection

Section= "Screen"

  Identifier "Internal Screen Intel"
  Device= "Intel Corporation Crystal Well Integrated Graphics Controller"
  = Monitor "Internal Display"
  DefaultDepth 24

  SubSecti= on "Display"
    Depth 24
    Modes "32= 00x1800_60.00" "2560x1440_59.90" "2400x1350_60.00" "2240x1260_60.00" "2080x= 1170_60.00" "1920x1080_60.00"
  EndSubSection

  SubSect= ion "Display"
    Depth 16
    Modes "3= 200x1800_60.00" "2560x1440_59.90" "2400x1350_60.00" "2240x1260_60.00" "2080= x1170_60.00" "1920x1080_60.00"
  EndSubSection

  SubSec= tion "Display"
    Depth 8
    Modes "3= 200x1800_60.00" "2560x1440_59.90" "2400x1350_60.00" "2240x1260_60.00" "2080= x1170_60.00" "1920x1080_60.00"
  EndSubSection

  SubSec= tion "Display"
    Depth 4
    Modes "3= 200x1800_60.00" "2560x1440_59.90" "2400x1350_60.00" "2240x1260_60.00" "2080= x1170_60.00" "1920x1080_60.00"
  EndSubsection

EndSection
Section "Device"
  Identifier "NVIDIA Corporation GK104M [GeFo= rce GTX 870M]"
  Driver "nvidia"
  BusId "PCI:1:0:0"
End= Section

Section "Screen"
  Identifier "Internal Screen Nvidi= a"
  Device "NVIDIA Corporation GK104M [GeForce GTX 870M]"
EndSe= ction

With or without the ServerLayout block, NVIDIA-0 is not recogn= ized in my /etc/lightdm/display_setup.sh script (also as instructed by the = Nvidia README, and used by lightdm):

xrandr --setprovideroutputsourc= e modesetting NVIDIA-0
xrandr --auto

xrandr --setprovideroutputso= urce modesetting NVIDIA-0 returns:

Could not find provider with name= NVIDIA-0

xrandr --listproviders returns only intel, or modesetting,= if I'm using the modesetting driver.

lspci | grep -i '3D' returns:<= br>
01:00.0 3D controller: NVIDIA Corporation GK104M [GeForce GTX 870M] = (rev a1)

lspci | grep -i 'VGA' returns:

00:02.0 VGA compatibl= e controller: Intel Corporation Crystal Well Integrated Graphics Controller= (rev 08)

Also worthy of mention, installation of the nvidia package= precludes the use of libGl, for the intel integrated GPU, meaning, at such= a point, no Nvidia means no OpenGL acceleration, though I may try the solu= tion for that mentioned here:

http://askubuntu.com/questions/220271/= no-glx-on-intel-card-with-multiseat-with-additional-nvidia-card
------=_Part_47_1898469872.1423093966975-- ------=_Part_46_220393900.1423093966974--