Bug 62773 - X.org segfault with PRIME when attempting to use --setprovideroutputsource support.
Summary: X.org segfault with PRIME when attempting to use --setprovideroutputsource su...
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-26 17:18 UTC by florenzi
Modified: 2018-12-13 22:28 UTC (History)
7 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log (135.74 KB, text/plain)
2013-03-26 17:18 UTC, florenzi
no flags Details
Backtrace from Xorg (1.18 KB, text/plain)
2013-03-26 17:19 UTC, florenzi
no flags Details
full backtrace (3.34 KB, text/plain)
2013-06-05 12:49 UTC, Peter Vollmer
no flags Details
Xorg.0.log - two radeons (83.56 KB, text/plain)
2013-08-13 13:42 UTC, jan matejek
no flags Details
two radeons - gdb backtrace (1.59 KB, text/plain)
2013-08-13 13:42 UTC, jan matejek
no flags Details
Xorg.1.log - rotation segfault (130.29 KB, text/plain)
2013-12-14 01:25 UTC, Matthew Robinson
no flags Details

Description florenzi 2013-03-26 17:18:34 UTC
Created attachment 77068 [details]
Xorg.0.log

I'm not entirely sure if this is supported, but I don't see why not. Following the merging of
https://bugs.freedesktop.org/show_bug.cgi?id=57200 - which gives pixmap
sharing to the SI ATI cards, I'm trying to get a 3 screen desktop going using:

Software:
Xorg Server 1.14
Latest GIT master of xf86-video-nouveau, xf86-video-ati
Kernel 3.8.4

Hardware:
03:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Tahiti XT [Radeon HD 7970]
05:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)

xrandr shows both of the cards, as well as them having the needed capabilities:
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0xa0 cap: 0xd, Source Output, Source Offload, Sink Offload crtcs: 6 outputs: 4 associated providers: 0 name:radeon
Provider 1: id: 0x64 cap: 0x7, Source Output, Sink Output, Source Offload crtcs: 2 outputs: 3 associated providers: 0 name:nouveau

Setting the Nouveau card's output sink to the ATI card works fine:
$ xrandr --setprovideroutputsource 1 0

The connected monitors are now listed in the xrandr output too. Trying to enable one however, results in a segfault:

$ xrandr --output DVI-I-1 --mode 1680x1050
(X segfaults)

The backtrace as well as the Xorg.0.log from the above commands is attached - if any more info is needed, please let me know.
Comment 1 florenzi 2013-03-26 17:19:43 UTC
Created attachment 77069 [details]
Backtrace from Xorg
Comment 2 Damian Nowak 2013-03-29 18:59:58 UTC
AFAIR, xrandr doesn't support multiple GPUs.
I haven't read #57200 though, tl;dr.
Comment 3 Damian Nowak 2013-03-29 19:26:38 UTC
From curiosity, I tried doing it on my 2x nouveau setup. It crashes exactly the same.

My suggestion: try 2x ATI card. Then we will see if it's nouveau problem or xorg/xrandr/whatever.
Comment 4 Damian Nowak 2013-03-29 20:32:02 UTC
This happens directly after trying to enable the screen:

mar 29 21:17:07 nwkr-desktop kernel: nouveau  [     DRM] 0xC585: Parsing digital output script table
mar 29 21:17:07 nwkr-desktop kdm[26677]: X server for display :0 terminated unexpectedly


Interesting fact: a monitor on the second GPU contains some random pixels. So something really happens there. ;-) Things crossed to get xrandr with multiple GPUs!
Comment 5 Peter Vollmer 2013-06-05 12:49:09 UTC
Created attachment 80342 [details]
full backtrace

Thinkpad T420 Reverse Optimus. When I activate the monitor at my digital output, X crashes if Optimus is fully aktivated in the bios/efi. If i have activated only the dedicated graphics card all works fine. I am using X server 1.14.1

$ xrandr                              
Screen 0: minimum 320 x 200, current 1600 x 900, maximum 32767 x 32767
LVDS1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1600x900       60.0*+   40.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
$ xrandr --setprovideroutputsource 1 0     
$ xrandr                              
Screen 0: minimum 320 x 200, current 1600 x 900, maximum 32767 x 32767
LVDS1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1600x900       60.0*+   40.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS-2 disconnected (normal left inverted right x axis y axis)
VGA-2 disconnected (normal left inverted right x axis y axis)
DP-1 connected (normal left inverted right x axis y axis)
   1920x1080      59.9 +   60.0  
   1680x1050      59.9  
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       75.1     60.0  
   832x624        74.6  
   800x600        75.0     60.3     56.2  
   640x480        75.0     60.0  
   720x400        70.1  
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
  1024x768 (0x69)   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 (0x6c)   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 (0x6d)   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
$
Comment 6 jan matejek 2013-08-13 13:42:01 UTC
Created attachment 84010 [details]
Xorg.0.log - two radeons

I see the same crash after the same sequence of commands as the original reporter, with two Radeons driven by open-source radeon driver. Same thing also happens with any combination of AMD/NVidia cards, and with two NVidia cards (all opensource drivers), so my guess would be the bug is in Xorg

lspci output:
dl:/data/obs/openSUSE:Factory # lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Cedar PRO [Radeon HD 5450/6350]
04:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV620 LE [Radeon HD 3450]

Xorg.0.log is attached

this is with Xorg 1.14.2 and xf86-video-ati 7.2.0, kernel 3.9.0 from openSUSE
Comment 7 jan matejek 2013-08-13 13:42:36 UTC
Created attachment 84011 [details]
two radeons - gdb backtrace
Comment 8 jan matejek 2013-08-16 10:46:05 UTC
further debugging reveals that the crash happens because in whatever gets extracted from [Something]PixmapPriv, pScreen is 0. (in my case, this is pScreen attached to the damaged region)

I am now trying to track down whose responsibility it is to set this value. As far as I can guess, this should be created when the X server starts, as part of CreateRootWindow, perhaps?

I could use a little help from someone who understands this stuff ;e) thanks
Comment 9 Dave Airlie 2013-08-16 22:45:08 UTC
can you try with an X server from the X.org 1.14 branch?

I think there are a lot of fixes not in 1.14.2 for reverse optimus. or try a Fedora 19 distro, since upstreaming this stuff is slow.
Comment 10 jan matejek 2013-08-20 14:46:33 UTC
server-1.14-branch code fixes this for me
Comment 11 Matthew Robinson 2013-12-14 01:24:18 UTC
I'm getting a segfault when I try to rotate the display. Enabling it is fine however.
Comment 12 Matthew Robinson 2013-12-14 01:25:48 UTC
Created attachment 90754 [details]
Xorg.1.log - rotation segfault
Comment 13 Matthew Robinson 2013-12-14 01:27:26 UTC
I'm getting a segfault when I try to rotate the display. Enabling it is fine however.
Comment 14 GitLab Migration User 2018-12-13 22:28:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/438.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.