You are not logged in.

#1 2014-03-29 05:28:56

badosu
Member
Registered: 2013-11-01
Posts: 7

Weird screen rendering using Nvidia 335M with optimus

Hi guys, I am having a problem that is driving me insane!

I have an Alienware M11x and installed  the proprietary nvidia driver with optimus set using this manual: https://wiki.archlinux.org/index.php/NVIDIA_Optimus

I followed all the instructions on the manual strictly, edited the Xorg and .xinitrc files accordingly.

When gnome logs in there are two overlapping screens: VGA-0 and LVDS-0-1. VGA is set as primary and does not appears on the screen where as LVDS which is the correct one appears with the wring resolution, should be 1366x768.

To regain the single screen I can run xrandr --output VGA-0 --off.

The problem is, if I do this on the .xinitrc file the session doesn't starts at all.

Following is the output of some commands:

xrandr --listproviders:

Providers: number : 2
Provider 0: id: 0x282 cap: 0x1, Source Output crtcs: 2 outputs: 1 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x47 cap: 0x2, Sink Output crtcs: 2 outputs: 6 associated providers: 1 name:modesetting

Probably relevant line from Xorg's log (where an additional 1024x768 screen is created):

[   383.559] (II) NVIDIA dlloader X Driver  334.21  Thu Feb 27 13:34:35 PST 2014
[   383.559] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   383.559] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   383.559] (++) using VT number 1

[   383.559] (II) Loading sub module "fb"
[   383.559] (II) LoadModule: "fb"
[   383.559] (II) Loading /usr/lib/xorg/modules/libfb.so
[   383.559] (II) Module fb: vendor="X.Org Foundation"
[   383.559] 	compiled for 1.15.0, module version = 1.0.0
[   383.559] 	ABI class: X.Org ANSI C Emulation, version 0.4
[   383.560] (WW) Unresolved symbol: fbGetGCPrivateKey
[   383.560] (II) Loading sub module "wfb"
[   383.560] (II) LoadModule: "wfb"
[   383.560] (II) Loading /usr/lib/xorg/modules/libwfb.so
[   383.560] (II) Module wfb: vendor="X.Org Foundation"
[   383.560] 	compiled for 1.15.0, module version = 1.0.0
[   383.560] 	ABI class: X.Org ANSI C Emulation, version 0.4
[   383.560] (II) Loading sub module "ramdac"
[   383.560] (II) LoadModule: "ramdac"
[   383.560] (II) Module "ramdac" already built-in
[   383.560] (II) modesetting(1): using drv /dev/dri/card0
[   383.560] (II) modesetting(G0): using drv /dev/dri/card0
[   383.560] (EE) Screen 1 deleted because of no matching config section.
[   383.561] (II) UnloadModule: "modesetting"
[   383.561] (II) NVIDIA(0): Creating default Display subsection in Screen section
	"nvidia" for depth/fbbpp 24/32
[   383.561] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[   383.561] (==) NVIDIA(0): RGB weight 888
[   383.561] (==) NVIDIA(0): Default visual is TrueColor
[   383.561] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[   383.561] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration"
[   383.561] (**) NVIDIA(0): Enabling 2D acceleration
[   383.723] (WW) NVIDIA(0): Unable to read EDID for display device CRT-0
[   383.723] (II) NVIDIA(GPU-0): Found DRM driver nvidia-drm (20130102)
[   383.725] (II) NVIDIA(0): NVIDIA GPU GeForce GT 335M (GT215) at PCI:1:0:0 (GPU-0)
[   383.725] (--) NVIDIA(0): Memory: 1048576 kBytes
[   383.725] (--) NVIDIA(0): VideoBIOS: 70.15.3c.00.0a
[   383.725] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[   383.728] (--) NVIDIA(0): Valid display device(s) on GeForce GT 335M at PCI:1:0:0
[   383.728] (--) NVIDIA(0):     CRT-0 (boot, connected)
[   383.728] (--) NVIDIA(0): CRT-0: 400.0 MHz maximum pixel clock
[   383.728] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[   383.728] (**) NVIDIA(0):     device CRT-0 (Using EDID frequencies has been enabled on
[   383.728] (**) NVIDIA(0):     all display devices.)
[   383.733] (==) NVIDIA(0): 
[   383.733] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[   383.733] (==) NVIDIA(0):     will be used as the requested mode.
[   383.733] (==) NVIDIA(0): 
[   383.733] (II) NVIDIA(0): Validated MetaModes:
[   383.733] (II) NVIDIA(0):     "CRT-0:nvidia-auto-select"
[   383.733] (II) NVIDIA(0): Virtual screen size determined to be 1024 x 768
[   383.737] (WW) NVIDIA(0): Unable to get display device CRT-0's EDID; cannot compute DPI
[   383.737] (WW) NVIDIA(0):     from CRT-0's EDID.
[   383.737] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[   383.737] (==) modesetting(G0): Depth 24, (==) framebuffer bpp 32
[   383.737] (==) modesetting(G0): RGB weight 888
[   383.737] (==) modesetting(G0): Default visual is TrueColor
[   383.737] (II) modesetting(G0): ShadowFB: preferred YES, enabled YES
[   383.738] (II) modesetting(G0): Output LVDS-1-0 has no monitor section
[   383.763] (II) modesetting(G0): Output VGA-1-0 has no monitor section
[   383.763] (II) modesetting(G0): Output HDMI-1-0 has no monitor section
[   383.764] (II) modesetting(G0): Output DisplayPort-1-0 has no monitor section
[   383.764] (II) modesetting(G0): Output HDMI-1-1 has no monitor section
[   383.764] (II) modesetting(G0): Output DisplayPort-1-1 has no monitor section
[   383.764] (II) modesetting(G0): EDID for output LVDS-1-0
[   383.764] (II) modesetting(G0): Manufacturer: SEC  Model: 5441  Serial#: 0
[   383.764] (II) modesetting(G0): Year: 2009  Week: 0
[   383.765] (II) modesetting(G0): EDID Version: 1.3
[   383.765] (II) modesetting(G0): Digital Display Input
[   383.765] (II) modesetting(G0): Max Image Size [cm]: horiz.: 27  vert.: 16
[   383.765] (II) modesetting(G0): Gamma: 2.20
[   383.765] (II) modesetting(G0): No DPMS capabilities specified
[   383.765] (II) modesetting(G0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 
[   383.765] (II) modesetting(G0): First detailed timing is preferred mode
[   383.765] (II) modesetting(G0): redX: 0.574 redY: 0.339   greenX: 0.333 greenY: 0.576
[   383.765] (II) modesetting(G0): blueX: 0.160 blueY: 0.115   whiteX: 0.313 whiteY: 0.329
[   383.765] (II) modesetting(G0): Manufacturer's mask: 0
[   383.765] (II) modesetting(G0): Supported detailed timing:
[   383.765] (II) modesetting(G0): clock: 71.1 MHz   Image Size:  256 x 144 mm
[   383.765] (II) modesetting(G0): h_active: 1366  h_sync: 1414  h_sync_end 1446 h_blank_end 1494 h_border: 0
[   383.765] (II) modesetting(G0): v_active: 768  v_sync: 770  v_sync_end 775 v_blanking: 793 v_border: 0
[   383.765] (II) modesetting(G0): Supported detailed timing:
[   383.765] (II) modesetting(G0): clock: 71.1 MHz   Image Size:  256 x 144 mm
[   383.765] (II) modesetting(G0): h_active: 1366  h_sync: 1414  h_sync_end 1446 h_blank_end 1494 h_border: 0
[   383.765] (II) modesetting(G0): v_active: 768  v_sync: 770  v_sync_end 775 v_blanking: 793 v_border: 0
[   383.765] (II) modesetting(G0):  DWVMD116AT
[   383.765] (II) modesetting(G0): Unknown vendor-specific block 0
[   383.765] (II) modesetting(G0): EDID (in hex):
[   383.765] (II) modesetting(G0): 	00ffffffffffff004ca3415400000000
[   383.765] (II) modesetting(G0): 	00130103901b10780a36259356559329
[   383.765] (II) modesetting(G0): 	1d505400000001010101010101010101
[   383.765] (II) modesetting(G0): 	010101010101c41b5680500019303020
[   383.765] (II) modesetting(G0): 	250000901000001ac41b568050001930
[   383.765] (II) modesetting(G0): 	3020250000901000001a000000fe0044
[   383.765] (II) modesetting(G0): 	57564d448031313641540a2000000000
[   383.765] (II) modesetting(G0): 	000c10171b3669a9ff01010a202000d6
[   383.766] (II) modesetting(G0): Printing probed modes for output LVDS-1-0
[   383.766] (II) modesetting(G0): Modeline "1366x768"x60.0   71.08  1366 1414 1446 1494  768 770 775 793 +hsync -vsync (47.6 kHz eP)
[   383.766] (II) modesetting(G0): Modeline "1024x768"x120.1  133.47  1024 1100 1212 1400  768 768 770 794 doublescan -hsync +vsync (95.3 kHz d)
[   383.766] (II) modesetting(G0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz d)
[   383.766] (II) modesetting(G0): Modeline "960x720"x120.0  117.00  960 1024 1128 1300  720 720 722 750 doublescan -hsync +vsync (90.0 kHz d)
[   383.766] (II) modesetting(G0): Modeline "928x696"x120.1  109.15  928 976 1088 1264  696 696 698 719 doublescan -hsync +vsync (86.4 kHz d)
[   383.766] (II) modesetting(G0): Modeline "896x672"x120.0  102.40  896 960 1060 1224  672 672 674 697 doublescan -hsync +vsync (83.7 kHz d)
[   383.766] (II) modesetting(G0): Modeline "800x600"x120.0   81.00  800 832 928 1080  600 600 602 625 doublescan +hsync +vsync (75.0 kHz d)
[   383.766] (II) modesetting(G0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz d)
[   383.766] (II) modesetting(G0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz d)
[   383.766] (II) modesetting(G0): Modeline "700x525"x120.0   61.00  700 744 820 940  525 526 532 541 doublescan +hsync +vsync (64.9 kHz d)
[   383.766] (II) modesetting(G0): Modeline "640x512"x120.0   54.00  640 664 720 844  512 512 514 533 doublescan +hsync +vsync (64.0 kHz d)
[   383.766] (II) modesetting(G0): Modeline "640x480"x120.0   54.00  640 688 744 900  480 480 482 500 doublescan +hsync +vsync (60.0 kHz d)
[   383.766] (II) modesetting(G0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz d)
[   383.766] (II) modesetting(G0): Modeline "512x384"x120.0   32.50  512 524 592 672  384 385 388 403 doublescan -hsync -vsync (48.4 kHz d)
[   383.766] (II) modesetting(G0): Modeline "400x300"x120.6   20.00  400 420 484 528  300 300 302 314 doublescan +hsync +vsync (37.9 kHz d)
[   383.766] (II) modesetting(G0): Modeline "400x300"x112.7   18.00  400 412 448 512  300 300 301 312 doublescan +hsync +vsync (35.2 kHz d)
[   383.766] (II) modesetting(G0): Modeline "320x240"x120.1   12.59  320 328 376 400  240 245 246 262 doublescan -hsync -vsync (31.5 kHz d)
[   383.793] (II) modesetting(G0): EDID for output VGA-1-0
[   383.793] (II) modesetting(G0): EDID for output HDMI-1-0
[   383.793] (II) modesetting(G0): EDID for output DisplayPort-1-0
[   383.794] (II) modesetting(G0): EDID for output HDMI-1-1
[   383.794] (II) modesetting(G0): EDID for output DisplayPort-1-1
[   383.794] (II) modesetting(G0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
[   383.794] (==) modesetting(G0): DPI set to (96, 96)

xrandr -q after shutting VGA-0 off:

[sshossain@battlestar ~]$ xrandr -q
Screen 0: minimum 8 x 8, current 1366 x 768, maximum 8192 x 8192
VGA-0 connected primary (normal left inverted right x axis y axis)
   1024x768       60.0 +
   800x600        72.2     60.3     56.2  
   640x480        59.9  
   512x384        60.0  
   400x300        72.2  
   320x240        60.1  
LVDS-1-0 connected 1366x768+0+0 (normal left inverted right x axis y axis) 256mm x 144mm
   1366x768       60.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-1-0 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-0 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-1 disconnected (normal left inverted right x axis y axis)
  1024x768 (0x4a)   65.0MHz
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  800x600 (0x4f)   40.0MHz
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  800x600 (0x50)   36.0MHz
        h: width   800 start  824 end  896 total 1024 skew    0 clock   35.2KHz
        v: height  600 start  601 end  603 total  625           clock   56.2Hz
  640x480 (0x54)   25.2MHz
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   59.9Hz
  512x384 (0x55)   32.5MHz
        h: width   512 start  524 end  592 total  672 skew    0 clock   48.4KHz
        v: height  384 start  385 end  388 total  403           clock   60.0Hz
  320x240 (0x58)   12.6MHz
        h: width   320 start  328 end  376 total  400 skew    0 clock   31.5KHz
        v: height  240 start  245 end  246 total  262           clock   60.1Hz

My .xinitrc:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

exec gnome-session

xorg.cond

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

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

Section "Screen"
	Identifier "nvidia"
	Device "nvidia"
	Option "AllowEmptyInitialConfiguration"
	# Option "UseDisplayDevice" "none"
	#SubSection "Display"
	#	Modes "nvidia-auto-select"
	#EndSubSection
EndSection

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

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

Thanks for any help!

Offline

Board footer

Powered by FluxBB