After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734346 - Support GPU hotplug
Support GPU hotplug
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-06 10:56 UTC by Bastien Nocera
Modified: 2021-07-05 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2014-08-06 10:56:02 UTC
Fedora's X.org currently supports that using a patch that shouldn't be upstreamed:
http://pkgs.fedoraproject.org/cgit/xorg-x11-server.git/tree/xserver-autobind-hotplug.patch

We should be able to do that within GNOME instead, with the help of our XRandR-ish API in mutter instead.

On a machine with both an Intel and a Radeon card for example:

$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x
axis y axis) 291mm x 164mm
   1920x1080      59.9*+   40.0
   1400x1050      60.0
   1280x1024      60.0
   1280x960       60.0
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x99 cap: 0xb, Source Output, Sink Output, Sink
Offload crtcs: 3 outputs: 5 associated providers: 0 name:Intel
Provider 1: id: 0x57 cap: 0xf, Source Output, Sink Output, Source
Offload, Sink Offload crtcs: 6 outputs: 2 associated providers: 0
name:radeon

$ xrandr --setprovideroutputsource 0x57 0x99

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x99 cap: 0xb, Source Output, Sink Output, Sink
Offload crtcs: 3 outputs: 5 associated providers: 1 name:Intel
Provider 1: id: 0x57 cap: 0xf, Source Output, Sink Output, Source
Offload, Sink Offload crtcs: 6 outputs: 2 associated providers: 1
name:radeon
$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x
axis y axis) 291mm x 164mm
   1920x1080      59.9*+   40.0
   1400x1050      60.0
   1280x1024      60.0
   1280x960       60.0
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 connected 1920x1080+1920+0 (normal left inverted right x axis
y axis) 640mm x 360mm
   1920x1080      60.0*+   50.0     59.9     30.0     25.0     24.0
 30.0     24.0
   1920x1080i     60.1     50.0     60.0
   1280x1024      60.0
   1360x768       59.8
   1280x720       60.0     50.0     59.9
   1440x576i      50.1
   1024x768       60.0
   1440x480i      60.1     60.1
   800x600        60.3
   720x576        50.0
   720x480        60.0     59.9
   640x480        60.0     59.9
VGA-1-1 disconnected (normal left inverted right x axis y axis)
  1280x1024 (0x63)  108.0MHz
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock   64.0KHz
        v: height 1024 start 1025 end 1028 total 1066           clock   60.0Hz
  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
  640x480 (0x71)   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
Comment 2 drago01 2014-08-08 19:09:13 UTC
What exactly are you asking for?
Comment 3 drago01 2014-08-08 19:13:14 UTC
Also see https://bugzilla.gnome.org/show_bug.cgi?id=704387
Comment 4 Bastien Nocera 2014-08-08 19:18:17 UTC
(In reply to comment #2)
> What exactly are you asking for?

For an API to do the equivalent of --setprovideroutputsource/--listproviders/etc.
Comment 5 Giovanni Campagna 2014-08-21 16:19:35 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > What exactly are you asking for?
> 
> For an API to do the equivalent of
> --setprovideroutputsource/--listproviders/etc.

Do we need API to do so? Isn't it enough for mutter to set provider associations "correctly"?
Comment 6 Bastien Nocera 2014-08-21 19:07:03 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #2)
> > > What exactly are you asking for?
> > 
> > For an API to do the equivalent of
> > --setprovideroutputsource/--listproviders/etc.
> 
> Do we need API to do so? Isn't it enough for mutter to set provider
> associations "correctly"?

Presumably that would be enough, in 99% of cases. At least it's easier to add API if we need it, than remove it if we don't :)
Comment 7 GNOME Infrastructure Team 2021-07-05 13:49:35 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/mutter/-/issues/

Thank you for your understanding and your help.