X server called SharePixmapBacking on a pixmap that was not created with the USAGE_SHARED flag
Submitted by Karen Pease
Assigned to Xorg Project Team
Description
Created attachment 110527 Xorg log file.
I was informed by a NVidia developer that the problem I'm experience indicates an Xorg bug, and thus I'm reporting it here. Source thread:
System: MSI Apache Pro G70 with a GeForce GTX 860M (01:00.0) and a Intel 4th-gen integrated graphics controller (00:02.0). Nvidia driver is 346.16. OS is a late beta Fedora 21, kernel 3.17.4-301.fc21.x86_64 stock. Xorg package is xorg-x11-server-Xorg-1.16.2-1.fc21.x86_64, the newest on the FC21 line.
Problem, short summary: new laptop, purchased to do specific graphics work which requires the nvidia driver. This means getting the nvidia driver working for X with optimus. This requires modesetting with xrandr, but this crashes X or makes X otherwise refuse to work, with an error about X failing to share a non-sharable pixmap.
I'm using the following xorg config:
Section "ServerLayout" Identifier "Layout0" Screen 0 "nvidia" Inactive "intel" EndSection
Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" HorizSync 28.0 - 33.0 VertRefresh 43.0 - 72.0 Option "DPMS" EndSection
Section "Device" Identifier "nvidia" Driver "nvidia" VendorName "NVIDIA Corporation" BusID "PCI:1:0:0" EndSection
Section "Device" Identifier "intel" Driver "modesetting" BusID "PCI:0:2:0" EndSection
Section "Screen" Identifier "nvidia" Device "nvidia" Option "UseDisplayDevice" "none" Option "AddARGBGLXVisuals" "True" EndSection
Section "Screen" Identifier "intel" Device "intel" Monitor "Monitor0" EndSection
So, your standard optimus modesetting config. Which of course requires the following xrandr lines at startup:
xrandr --setprovideroutputsource modesetting NVIDIA-0 xrandr --auto
I've taken to issuing them of the form "DISPLAY=:0 xrandr...." so that I can control the timing and see the output.
I've gotten things to the point that X starts up without crashing (but, of course, without the backlight). And now I can even issue the first statement - no error returned. X somewhat randomly either continues, continues for a while then crashes, or crashes immediately. The second line fails with:
DISPLAY=:0 xrandr --auto
X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 139 (RANDR) Minor opcode of failed request: 7 (RRSetScreenSize) Serial number of failed request: 29 Current serial number in output stream: 30
xrandr with no arguments yields:
Screen 0: minimum 8 x 8, current 640 x 480, maximum 16384 x 16384 eDP-1-0 connected (normal left inverted right x axis y axis) 1920x1080 60.01 + 1400x1050 59.98 1280x1024 60.02 1280x960 60.00 1024x768 60.04 60.00 960x720 60.00 928x696 60.05 896x672 60.01 800x600 60.00 60.32 56.25 700x525 59.98 640x512 60.02 640x480 60.00 59.94 512x384 60.00 400x300 60.32 56.34 320x240 60.05 VGA-1-0 disconnected (normal left inverted right x axis y axis) HDMI-1-0 disconnected (normal left inverted right x axis y axis)
Now, for the failure. The relevant parts of the Xorg.0.log:
[ 114.855] reporting 3 3 20 149 [ 114.855] reporting 3 3 20 149 [ 114.855] reporting 3 3 20 149 [ 114.857] reporting 3 3 20 149 [ 116.086] reporting 3 3 20 149 [ 118.157] reporting 3 3 20 149 [ 118.158] have a master to look out for [ 118.158] (EE) NVIDIA(0): The X server tried to share a non-shareable pixmap [ 118.158] need to create shared pixmap 0(EE) [ 133.239] (EE) Backtrace: [ 133.239] (EE) 0: /usr/libexec/Xorg.bin (OsLookupColor+0x119) [0x59bfd9] [ 133.240] (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7f052dbac94f] [ 133.240] (EE) 2: /usr/lib64/xorg/modules/drivers/nvidia_drv.so (nvidiaAddDrawableHandler+0x3dcd0) [0x7f05273e8650] [ 133.240] (EE) 3: /usr/lib64/xorg/modules/libwfb.so (wfbBlt+0x13d) [0x7f0526ca066d] [ 133.240] (EE) 4: /usr/lib64/xorg/modules/libwfb.so (wfbCopyNtoN+0x30b) [0x7f0526ca48bb] [ 133.240] (EE) 5: /usr/libexec/Xorg.bin (miCopyRegion+0x1a7) [0x5773e7] [ 133.240] (EE) 6: /usr/libexec/Xorg.bin (miDoCopy+0x45e) [0x57798e] [ 133.240] (EE) 7: /usr/lib64/xorg/modules/libwfb.so (wfbCopyArea+0x2d) [0x7f0526ca5a5d] [ 133.240] (EE) 8: /usr/lib64/xorg/modules/drivers/nvidia_drv.so (nvidiaAddDrawableHandler+0x514259) [0x7f0527d950a9] [ 133.240] (EE) 9: /usr/libexec/Xorg.bin (DamageRegionAppend+0x33ed) [0x52495d] [ 133.275] (EE) 10: /usr/libexec/Xorg.bin (CompositeRegisterImplicitRedirectionException+0x26d5) [0x4cdd25] [ 133.275] (EE) 11: /usr/libexec/Xorg.bin (CompositeRegisterImplicitRedirectionException+0x34f5) [0x4cfb15] [ 133.275] (EE) 12: /usr/libexec/Xorg.bin (CompositeRegisterImplicitRedirectionException+0x1fcd) [0x4cd0bd] [ 133.275] (EE) 13: /usr/libexec/Xorg.bin (SwapConnClientPrefix+0x1e96) [0x464656] [ 133.275] (EE) 14: /usr/libexec/Xorg.bin (MapWindow+0x117) [0x465697] [ 133.275] (EE) 15: /usr/libexec/Xorg.bin (ProcBadRequest+0x5f5) [0x433d95] [ 133.275] (EE) 16: /usr/libexec/Xorg.bin (SendErrorToClient+0x2f7) [0x439037] [ 133.275] (EE) 17: /usr/libexec/Xorg.bin (remove_fs_handlers+0x416) [0x43d196] [ 133.275] (EE) 18: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7f052db97fe0] [ 133.276] (EE) 19: /usr/libexec/Xorg.bin (_start+0x29) [0x42761e] [ 133.276] (EE) 20: ? (?+0x29) [0x29] [ 133.276] (EE) [ 133.276] (EE) Segmentation fault at address 0x0 [ 133.276] (EE) Fatal server error: [ 133.276] (EE) Caught signal 11 (Segmentation fault). Server aborting [ 133.276] (EE) [ 133.276] (EE) Please consult the Fedora Project support at http://wiki.x.org
for help. [ 133.276] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. [ 133.276] (EE) [ 133.326] (EE) Server terminated with error (1). Closing log file.
When presented with this, an NVidia developer stated:
"For display offload, the X server is expected to create a shareable pixmap by calling the CreatePixmap function with the CREATE_PIXMAP_USAGE_SHARED hint. Then, it actually shares the pixmap by calling SharePixmapBacking. The message
(EE) NVIDIA(0): The X server tried to share a non-shareable pixmap
means that the X server called SharePixmapBacking on a pixmap that was not created with the USAGE_SHARED flag. That indicates an X server bug. "
This problem is a blocker for me. I'll do whatever I need to do to assist with its resolution.
Attachment 110527, "Xorg log file.":
Xorg.0.log
Version: 7.7 (2012.06)