GNOME Bugzilla – Bug 785381
Hybrid GPU system support
Last modified: 2019-12-10 16:04:12 UTC
This bug refers to supporting systems with multiple GPUs connected to their own connectors. A common configuration is laptops with an integrated Intel GPU connected to the panel, and a dedicated Nvidia/AMD GPU connected to the HDMI ports. I will not attach individual patches to this bug, but refer to git branches, as the patches are too many to handle in Bugzilla.
Branch available at https://github.com/jadahl/mutter/commits/wip/multi-gpu (starting with "monitor-manager/xrandr: Fix name inconsistencies" on page 2). It has so far been tested on a Dell with a mobile GTX 1060 using nouveau from Linux 4.12. Only works with free drivers (at least the hardware accelerated paths, the CPU fallbacks should work as long as it's possible to mode set/page flip with dumb buffers, but I don't know whether the proprietary nvidia driver supports this). Currently known bugs: - nouveau (linux 4.12, otherwise F26) stops responding to page flips after setting a mode a couple of times, effectively freezing mutter. Can be reproduced both by setting the mode with <https://github.com/jadahl/gnome-monitor-config> twice or VT switching back and forth twice.
Branch summary: * Remove the hold MetaMonitorConfig * Make MetaCrtc and MetaOutput GObjects * Let MetaMonitorManagerKms find and open /dev/dri/card* * Split up MetaMonitorManager into MetaMonitorManager and MetaGpu - MetaMonitorManager handles a collection of GPUs, dealing with configuration (i.e. interacting with MetaMonitorConfigManager etc). - MetaGpu does most of the heavy lifting that MetaMonitorManager did (creating MetaOutput, MetaCrtc etc) * Remove the legacy rendering mode (no stage views) support from Kms parts * Add support for hybrid GPU iGPU -> dGPU blitting (both OpenGL and CPU fallback) * Adapt HW cursor support to deal with multiple GPUs
Hi, What is the current status of this experimental branch ? I wanted to build/try it on my system but unfortunately compilation fails with the following: make[4]: Entering directory '/home/vince/git/mutter/src' /bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -fdebug-prefix-map=/home/vince/git/mutter=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-O1 -Wl,--as-needed -o mutter core/mutter.o -lEGL -lgio-2.0 -ljson-glib-1.0 -lupower-glib -lgnome-desktop-3 -lXcomposite -lXcursor -lXdamage -lXext -lXfixes -lXi -lxkbfile -lxkbcommon-x11 -lxkbcommon -lXrender -lX11-xcb -lX11 -lxcb-randr -lxcb-render -lxcb-res -lxcb -lstartup-notification-1 -lcanberra-gtk3 -lX11 -lcanberra -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lwacom -lgudev-1.0 -lgirepository-1.0 -lgobject-2.0 -lglib-2.0 -lXrandr -lSM -lICE -lX11 -lXext -lXinerama -lm libmutter-1.la libtool: link: gcc -g -O2 -fdebug-prefix-map=/home/vince/git/mutter=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-O1 -o .libs/mutter core/mutter.o -Wl,--as-needed ./.libs/libmutter-1.so -lupower-glib -lgnome-desktop-3 -lXcursor -lxkbfile -lxkbcommon-x11 -lXrender -lX11-xcb -lxcb-randr -lxcb-render -lxcb-res -lxcb -lstartup-notification-1 -lcanberra-gtk3 -lcanberra -lgtk-3 -lgdk-3 -lwacom -lgirepository-1.0 -lSM -lICE -lXinerama -lsystemd -lgudev-1.0 /home/vince/git/mutter/clutter/clutter/.libs/libmutter-clutter-1.so /usr/lib/x86_64-linux-gnu/libfreetype.so -lcairo-gobject -latk-1.0 -ljson-glib-1.0 -lwayland-egl -lwayland-client -lXtst -lXi -lpangoft2-1.0 -lfontconfig -ludev -linput -lxkbcommon -lgio-2.0 -lgthread-2.0 /home/vince/git/mutter/cogl/cogl-pango/.libs/libmutter-cogl-pango-1.so -lpangocairo-1.0 -lpango-1.0 /home/vince/git/mutter/cogl/cogl-path/.libs/libmutter-cogl-path-1.so /home/vince/git/mutter/cogl/cogl/.libs/libmutter-cogl-1.so -lm -lcairo -lgmodule-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lgbm -ldrm -lwayland-server -lEGL -lX11 -lXext -lXdamage -lXfixes -lXcomposite -lXrandr -pthread -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/mutter ./.libs/libmutter-1.so: undefined reference to `glBindFramebuffer' ./.libs/libmutter-1.so: undefined reference to `glGenTextures' ./.libs/libmutter-1.so: undefined reference to `glGetString' ./.libs/libmutter-1.so: undefined reference to `glReadPixels' ./.libs/libmutter-1.so: undefined reference to `glGenFramebuffers' ./.libs/libmutter-1.so: undefined reference to `glActiveTexture' ./.libs/libmutter-1.so: undefined reference to `glFramebufferTexture2D' ./.libs/libmutter-1.so: undefined reference to `glBlitFramebuffer' ./.libs/libmutter-1.so: undefined reference to `glTexParameteri' ./.libs/libmutter-1.so: undefined reference to `glFinish' ./.libs/libmutter-1.so: undefined reference to `glGetError' ./.libs/libmutter-1.so: undefined reference to `glBindTexture' collect2: error: ld returned 1 exit status Makefile:2135: recipe for target 'mutter' failed make[4]: *** [mutter] Error 1 make[4]: Leaving directory '/home/vince/git/mutter/src' Regards, Vincent
The branch in question landed long ago. Closing this bug.