Void Linux discussion
 help / color / mirror / Atom feed
* Setting Up Nvidia Optimus Render Offloading Via Randr
@ 2015-02-04 23:52 Antonio Malcolm
  2015-02-05  5:44 ` Antonio Malcolm
  2015-02-05  6:19 ` Antonio Malcolm
  0 siblings, 2 replies; 5+ messages in thread
From: Antonio Malcolm @ 2015-02-04 23:52 UTC (permalink / raw)
  To: voidlinux


[-- Attachment #1.1: Type: text/plain, Size: 4998 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 5471 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting Up Nvidia Optimus Render Offloading Via Randr
  2015-02-04 23:52 Setting Up Nvidia Optimus Render Offloading Via Randr Antonio Malcolm
@ 2015-02-05  5:44 ` Antonio Malcolm
  2015-02-05  6:19 ` Antonio Malcolm
  1 sibling, 0 replies; 5+ messages in thread
From: Antonio Malcolm @ 2015-02-05  5:44 UTC (permalink / raw)
  To: voidlinux


[-- Attachment #1.1: Type: text/plain, Size: 185 bytes --]

OK, I think I found the crux of the issue...
Something I overlooked, my first time through the Xorg logs

/dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

[-- Attachment #1.2: Type: text/html, Size: 214 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting Up Nvidia Optimus Render Offloading Via Randr
  2015-02-04 23:52 Setting Up Nvidia Optimus Render Offloading Via Randr Antonio Malcolm
  2015-02-05  5:44 ` Antonio Malcolm
@ 2015-02-05  6:19 ` Antonio Malcolm
  2015-02-05  6:42   ` Juan RP
  1 sibling, 1 reply; 5+ messages in thread
From: Antonio Malcolm @ 2015-02-05  6:19 UTC (permalink / raw)
  To: voidlinux


[-- Attachment #1.1: Type: text/plain, Size: 121 bytes --]

Additionally , in Xorg.1.log, I'm seeing a segfault message:

Caught signal 11 (Segmentation fault). Server aborting.

[-- Attachment #1.2: Type: text/html, Size: 148 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting Up Nvidia Optimus Render Offloading Via Randr
  2015-02-05  6:19 ` Antonio Malcolm
@ 2015-02-05  6:42   ` Juan RP
  2015-02-05  7:33     ` Antonio Malcolm
  0 siblings, 1 reply; 5+ messages in thread
From: Juan RP @ 2015-02-05  6:42 UTC (permalink / raw)
  To: voidlinux


[-- Attachment #1.1: Type: text/plain, Size: 109 bytes --]


Did you read: 
https://github.com/voidlinux/documentation/wiki/propietary-video-drivers#optimus 
?
 


[-- Attachment #1.2: Type: text/html, Size: 139 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Setting Up Nvidia Optimus Render Offloading Via Randr
  2015-02-05  6:42   ` Juan RP
@ 2015-02-05  7:33     ` Antonio Malcolm
  0 siblings, 0 replies; 5+ messages in thread
From: Antonio Malcolm @ 2015-02-05  7:33 UTC (permalink / raw)
  To: voidlinux


[-- Attachment #1.1: Type: text/plain, Size: 3221 bytes --]

Not necessary, as it's nearly verbatim what's in the Nvidia README, and I 
managed to get this working by fixing my config file, which, admittedly, 
was a bit backwards.
(I had mistakenly thought that the intel chipset would be managing the 
screen resolution, as it's the output device- also, this is my first time 
configuring an Optimus-equipped machine).

Also, I might still want both sets of OpenGL drivers, per the askubuntu 
link, in case I want to run the intel chipset alone, on occasion.
(I'll need to see just how power and temperature-efficient this setup is, 
to determine how often I should opt for one over the other, but having the 
option, in and of itself, is a good thing, methinks.)

ANYHOW, here is the working config- I'll update the wiki this evening, as 
someone else may find this useful (should probably do the same with the 
synaptics config for my Elantech trackpad). It's working quite well, so far.


Section "ServerLayout"
  Identifier "Displays"
  Screen 0 "Internal Screen Nvidia"
  Inactive "Intel Corporation Crystal Well Integrated Graphics Controller"

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 "NVIDIA Corporation GK104M [GeForce GTX 870M]"
  Driver "nvidia"
  BusId "PCI:1:0:0"
  Option "monitor-eDP1" "Internal Display"
#  Option "monitor-DP1" ""
#  Option "monitor-HDMI1" ""
EndSection

Section "Screen"

  Identifier "Internal Screen Nvidia"
  Device "NVIDIA Corporation GK104M [GeForce GTX 870M]"
  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 "Intel Corporation Crystal Well Integrated Graphics Controller"
  BusId "PCI:0:2:0"
  Driver "modesetting"
EndSection

Section "Screen"
  Identifier "Internal Screen Intel"
  Device "Intel Corporation Crystal Well Integrated Graphics Controller"
EndSection


[-- Attachment #1.2: Type: text/html, Size: 3667 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-05  7:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 23:52 Setting Up Nvidia Optimus Render Offloading Via Randr Antonio Malcolm
2015-02-05  5:44 ` Antonio Malcolm
2015-02-05  6:19 ` Antonio Malcolm
2015-02-05  6:42   ` Juan RP
2015-02-05  7:33     ` Antonio Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).