You are not logged in.

#1 2013-07-18 02:10:20

GuloGuloDesu
Member
Registered: 2013-07-18
Posts: 35

nVidia 319.32 (Optimus) Xorg not using nVidia driver

I apologize, I am new to this forum, and I was unsure whether to start my own thread or try and hijack someone else's thread.

I believe this thread most closely resembles my problem:
https://bbs.archlinux.org/viewtopic.php?id=163883
But they are receiving a different error in their Xorg.0.log

My end goal is to configure my laptop to where it can run multiple displays.  Preferably 2 other displays using the HDMI and DisplayPorts (hopefully using native drivers).  I would rather not use Bumblebee, and I am aware that the driver that I am using is still experimental.  So far I have been able to get the mirroring to work, but I have since done a complete reinstall.

I am stuck where it is loading X using the modesetting driver, but not the nVidia drivers.  When I run the glxinfo I just receive

Xlib:  extension "GLX" missing on display ":0.0".

for everything, and nvidia-settings just say that I am not using nVidia drivers for X.

Here are the steps that I have taken:

Fresh install of Arch (2013-07-01)
pacman -S nvidia
reboot
pacman -S xorg-server xorg-xinit xorg-server-utils fluxbox xterm wbar xf86-video-modesetting linux-headers
Xorg -configure
cp /root/xorg.conf.new /etc/X11/xorg.conf
vi ~/.xinitrc
	xrandr --setprovideroutputsource modesetting NVIDIA-0
	xrandr --auto
	exec fluxbox

I changed my xorg.conf to this:

Section "ServerLayout"
	Identifier		"X.org Configured"
	Screen		0	"Screen0" 0 0
	Screen		1	"Screen1" RightOf "Screen0"
	Screen		2	"Screen2" RightOf "Schreen1"
EndSection

Section "Module"
	Load "glx"
EndSection

Section "Device"
	Identifier		"Card0"
	Driver			"modesetting"
	BusID			"PCI:0:2:0"
EndSection

Section "Device"
	Identifier		"Card1"
	Driver			"modesetting"
	BusID			"PCI:0:2:0"
EndSection

Section "Device"
	Identifier		"Card2"
	Driver			"nvidia"
	BusID			"PCI:1:0:0"
EndSection

Section "Screen"
	Identifer		"Screen0"
	Device			"Card0"
	Monitor			"Monitor0"
EndSection

Section "Screen"
	Identifer		"Screen1"
	Device			"Card1"
	Monitor			"Monitor1"
EndSection

Section "Screen"
	Identifer		"Screen2"
	Device			"Card2"
	Monitor			"Monitor2"
EndSection

I'm not sure what else to try.  If I change "Screen0" to "Card2"(nvidia) then I get this in /var/log/Xorg.0.log:

Unable to set master
AddScreen/ScreenInit failed for gpu driver 0 -1

Please note this is on a laptop (Screen, VGA, HDMI, and DisplayPort).
There is one strange thing that I noticed as well.  When digging through the Xorg.0.log I noticed that I have the following outputs:
VGA-0
HDMI-0
DisplayPort-0
HDMI-1
DisplayPort-1

I think that -0's are the modesetting and the -1's are the nVidia.  The problem is when I connect anything to the HDMI it always comes through as HDMI-0, so I don't think I am using the nVidia drivers for anything.  I might be mistaken though.

I'm not too sure where to go from here.

I'll keep playing with it to try and figure it out, but any assistance would be greatly appreciated.

Oh yeah, I almost forgot.  When I run xrandr or glxinfo outside of X (fluxbox) I receive:

Can't open display

When I am in X and I run xrandr --listproviders I get this:

Providers:  number : 1
Provider 0: id: 0x48 cap: 0x2, Sink Output crtcs: 3 outputs: 6 associated providers: 0 name:modesetting

I have referenced these pages to get this far:
https://bbs.archlinux.org/viewtopic.php?pid=1298259
https://bbs.archlinux.org/viewtopic.php?pid=1298376
http://forums.gentoo.org/viewtopic-t-95 … art-0.html

Offline

#2 2013-07-18 03:48:35

GuloGuloDesu
Member
Registered: 2013-07-18
Posts: 35

Re: nVidia 319.32 (Optimus) Xorg not using nVidia driver

After some further digging in the Xorg.0.log I found another error message which is probably the culprit:

NVIDIA(1):  Failed to assign any connected display devices to X screen 1
NVIDIA(1):  Failing initialization of X screen 1
UnloadModule:  "nvidia"
...
Failed to initialize GLX extension (Compatible NVIDIA X driver not found)

Researching that error now to see if I can find a fix for it.

Offline

#3 2013-07-18 16:08:58

GuloGuloDesu
Member
Registered: 2013-07-18
Posts: 35

Re: nVidia 319.32 (Optimus) Xorg not using nVidia driver

Alright, so I figured out what the problem was, I was missing a line in my Xorg.conf.  Here is my new Xorg.conf:

Section "ServerLayout"
	Identifier		"X.org Configured"
	Screen		0	"nvidia"
        Inactive             "intel"
EndSection

Section "Module"
	Load "glx"
EndSection

Section "Device"
	Identifier		"intel"
	Driver			"modesetting"
	BusID			"PCI:0:2:0"
EndSection

Section "Device"
	Identifier		"Card1"
	Driver			"modesetting"
	BusID			"PCI:0:2:0"
EndSection

Section "Device"
	Identifier		"nvidia"
	Driver			"nvidia"
	BusID			"PCI:1:0:0"
EndSection

Section "Screen"
	Identifer		"nvidia"
	Device			"nvidia"
	Monitor			"Monitor0"
        Option              "UseDisplayDevice" "none"
EndSection

Section "Screen"
	Identifer		"Screen1"
	Device			"Card1"
	Monitor			"Monitor1"
EndSection

Section "Screen"
	Identifer		"Screen2"
	Device			"Card2"
	Monitor			"Monitor2"
EndSection

I was missing the Option "UseDisplayDevice" "none"

So the good news is it is now using the nVidia drivers and it looks awesome.  Sadly I am a perfectionist, and I still have a problem.
First I still need to figure out how to configure the multiple monitors, and nvidia-settings doesn't quite work with this setup as it only sees one monitor.  I just need to sit down and configure my Xorg.conf

The other problem is that I get an error when I exit fluxbox (X).  This only appears when I exit fluxbox, it is not created when launching.  Here is the error from the Xorg.0.log:

Backtrace:
0:  /usr/bin/X (xorg_backtrace+0x3d) [0x57f71d]
1:  /usr/bin/X (0x400000+0x183489) [0x583489]
2:  /usr/bin/libpthread.so.0 (0x7f214b8b5000+0xf0e0) [0x7f214b8c40e0]
3:  /usr/bin/X (RRCrtcDetachScanoutPixmap+0x44) [0x4ed054]
4:  /usr/bin/X (0x400000+0xed191) [0x4ed191]
5:  /usr/bin/X (0x400000+0x58f62) [0x458f62]
6:  /usr/bin/X (FreeClientResources+0x6c) [0x459f8c]
7:  /usr/bin/X (FreeAllResources+0x47) [0x45a037]
8:  /usr/bin/X (0x400000+0x268e7) [0x4268e7]
9:  /usr/lib/libc.so.6 (__libc_start_main+0xf5) [0x7f214a93ca15]
10  /usr/bin/X (0x400000+0x26bfd) [0x426bfd]
Segmentation fault at address 0x418
Fatal Server Exception
Caught signal 11 (Segmentation fault).  Server aborting

Doing some research I found this page that has an ongoing discussion on this problem:
https://devtalk.nvidia.com/default/topi … ?offset=12

I'll start playing with my Xorg.conf to try and get the multiple monitors setup.  I am vaguely concerned I will run into an issue with the Option "UseDisplayDevice" "none", but we will see.

Offline

#4 2013-07-18 16:31:28

henk
Member
From: Weert, Netherlands
Registered: 2013-01-01
Posts: 334

Re: nVidia 319.32 (Optimus) Xorg not using nVidia driver

If you follow the wiki on this,
you notice that your sequence of installing things is a bit of.
first install the xorg packages.
Then the video driver.
EDIT: for nvidia this should be:

pacman -S nvidia nvidia-libgl

reboot and test it.

In case of Nvidia it is a bit strange that the nvidia-libgl package is not mentioned. The Nvidia page
states

The nvidia-libgl or nvidia-{304xx,173xx,96xx}-utils package is a dependency and will be pulled in automatically

but if you want to install nvidia there is no mentioning of it.

% sudo pacman -S nvidia
[sudo] password for henk: 
warning: nvidia-319.32-2 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Packages (1): nvidia-319.32-2

To cut the story short, try it with installing nvidia-libgl, reboot, and when needed do (as user) nvidia-xconfig.

Last edited by henk (2013-07-18 16:35:12)

Offline

#5 2013-07-18 17:03:35

GuloGuloDesu
Member
Registered: 2013-07-18
Posts: 35

Re: nVidia 319.32 (Optimus) Xorg not using nVidia driver

henk wrote:

If you follow the wiki on this,
you notice that your sequence of installing things is a bit of.
first install the xorg packages.
Then the video driver.
EDIT: for nvidia this should be:

pacman -S nvidia nvidia-libgl

reboot and test it.

Yeah, late last night I realized that I made this mistake.  When I first installed this laptop I followed the Wiki as it was a standard build, but since I thought that this nvidia driver was special I only opened the Wiki briefly to see if it mentioned the Optimus stuff outside of Bumblebee.
The issue is that xorg-server installs / overwrites the libglx (I think, I can't find my reference page at the moment).  I had to do a reinstall of the nvidia to get the proper libglx back on there.  I plan on posting my updated steps once I get everything hammered out.  I will also try installing the nvidia-libgl as I haven't tried that one yet.  Although I just killed my xorg.conf playing with it, so I need to get it back working before I start playing with other things (I have a backup somewhere).

Thanks for the info.  I will install the nvidia-libgl and report back how it works.

Offline

#6 2013-07-18 17:16:26

GuloGuloDesu
Member
Registered: 2013-07-18
Posts: 35

Re: nVidia 319.32 (Optimus) Xorg not using nVidia driver

It appears that the nvidia-libgl is a dependency of nvidia as I already have it installed.

Double checking:
https://www.archlinux.org/packages/test … 64/nvidia/
Confirmed it is a dependency.

It was worth a shot.

Offline

#7 2013-07-18 17:40:53

henk
Member
From: Weert, Netherlands
Registered: 2013-01-01
Posts: 334

Re: nVidia 319.32 (Optimus) Xorg not using nVidia driver

did you really check if the package is installed?

pacman -Qe | grep nvidia

Offline

#8 2013-07-18 18:11:07

GuloGuloDesu
Member
Registered: 2013-07-18
Posts: 35

Re: nVidia 319.32 (Optimus) Xorg not using nVidia driver

henk wrote:

did you really check if the package is installed?

pacman -Qe | grep nvidia

Hmm, when I run that I only get
nvidia 319.32-2

If I run pacman -Q | grep nvidia I get:

nvidia 31.932-2
nvidia-libgl 319.32-1
nvidia-utils 319.32-1

Offline

#9 2013-07-18 19:05:20

GuloGuloDesu
Member
Registered: 2013-07-18
Posts: 35

Re: nVidia 319.32 (Optimus) Xorg not using nVidia driver

Alright, so I am stuck with Xorg, so far I haven't been able to get anything to work for the dual displays.  If I plug a monitor into the HDMI or the VGA and startx all it does it mirror the display.  Also if I run nvidia-settings it does not detect any monitors.

Here is my current working xorg.conf:

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
#	Screen      2  "Screen2" RightOf "Screen1"
	Inactive       "Card0"
	Inactive       "Card1"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc/"
	FontPath     "/usr/share/fonts/TTF/"
	FontPath     "/usr/share/fonts/OTF/"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/100dpi/"
	FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier   "Monitor2"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "modesetting"
	BusID       "PCI:0:2:0"
EndSection

Section "Device"
	Identifier  "Card1"
	Driver      "modesetting"
	BusID       "PCI:0:2:0"
EndSection

Section "Device"
	Identifier  "Card2"
	Driver      "nvidia"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card2"
	Monitor    "Monitor0"
	Option     "UseDisplayDevice" "none"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card2"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen2"
	Device     "Card2"
	Monitor    "Monitor2"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

This is my output from xrandr -q:

Screen 0: minimum 8 x 8, current 1680 x 1050, maximum 16384 x 16384
LVDS-0 connected 1600x900+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1600x900       60.0*+   40.0  
   1024x768       60.0     60.0  
   960x720        60.0  
   928x696        60.1  
   896x672        60.0  
   800x600        60.0     60.3     56.2  
   700x525        60.0  
   640x512        60.0  
   640x480        60.0     59.9  
   512x384        60.0  
   400x300        60.3     56.3  
   320x240        60.1  
VGA-0 connected (normal left inverted right x axis y axis)
   1280x1024      60.0 +   75.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
HDMI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm
   1680x1050      60.0*+
   1600x1200      60.0  
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x800       59.9  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)

So it appears that all of my outputs are falling under screen0 and that is why I can't get anything else to work.

I should also mention when I run nvidia-settings I receive the following error:

ERROR: libXv setup error : libXv.so.1: cannot open shared object file: No such
       file or directory

I'm so very very close to getting this up and running.  I am able to now post from this laptop, so I can finally copy and paste rather than type everything out manually.
I'm pretty sure it is going to be something simple that I am missing, but I just can't see it right now.

Any suggestions?

Offline

#10 2013-07-19 20:27:34

GuloGuloDesu
Member
Registered: 2013-07-18
Posts: 35

Re: nVidia 319.32 (Optimus) Xorg not using nVidia driver

I was able to resolve the libXv error with nvidia-settings by running pacman -S libxv
nvidia-settings still does not detect any of the screens.

I attempted to run:

xrandr --output HDM-0 --left-of LVDS-0

All this did though was turn off my laptop screen (LVDS-0).  I tried it the other way around as well:

xrandr --output LVDS-0 --right-of HDMI-0

Same problem.

I then tried it with the HDMI and the VGA:

xrandr --output VGA-0 --right-of HDMI-0

Once again, still the same problem.

I'll keep doing some more reading, just thought I would give an update.  Everything else appears to be running great though, I have most of my apps installed and working.  I love the resolution that I am able to get through the HDMI.

Offline

Board footer

Powered by FluxBB