https://bugs.freedesktop.org/show_bug.cgi?id=93784
--- Comment #5 from bartos.petr@gmail.com --- (In reply to Nicolas Koch from comment #4)
Forgot to mention, of course I ran glxinfo with DRI_PRIME=1
Same problem here with ThinkPad L450
05:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Jet XT [Radeon R5 M240] (rev ff)
I found than setting both integrated and discrete gpu to DRI3 allows to run glxgears, however it hard-freezes once any gpu intensive application is run for more than few minutes. Using additional vblank_mode=0 causes this hard-freeze to appear faster. Before hard-freeze there is massive fps drop during which it is possible to kill the application and avoid freeze.
Also using
echo "DDIS" > /sys/kernel/debug/vgaswitcheroo/switch
and restarting X causes black screen (with backlight turned of) but that might be another bug