Bug 94811 - ATI radeon driver displays nothing or a client refused to switch message on hybrid graphics
Summary: ATI radeon driver displays nothing or a client refused to switch message on h...
Status: RESOLVED NOTABUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-04 10:12 UTC by Saurav
Modified: 2016-11-30 03:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg output for the radeon driver (2.30 KB, text/plain)
2016-04-04 10:12 UTC, Saurav
no flags Details
Sample XOrg configuration for the radeon driver (715 bytes, text/plain)
2016-04-04 10:13 UTC, Saurav
no flags Details
XOrg log for the radeon driver (20.38 KB, text/plain)
2016-04-04 10:13 UTC, Saurav
no flags Details
Full dmesg log (68.74 KB, text/plain)
2016-04-05 12:01 UTC, Saurav
no flags Details

Description Saurav 2016-04-04 10:12:11 UTC
Created attachment 122692 [details]
dmesg output for the radeon driver

On a Lenovo G50-80 with Intel HD Graphics 5500 (Broadwell GT2) and Advanced Micro Devices [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] using vgaswitcheroo with echo DDIS > /sys/kernel/debug/vgaswitcheroo/switch results in a blank screen on logging out or in a message that client 0 refused to switch and a reversion to the login screen (depending on the display manager in use) on logging out and trying to log back in. The computer can be powered off normally using the power button or the options in the login screen if visible or by switching to a different VT. Trying to use the radeon driver with an XOrg configuration file like the one attached results in the display manager not starting (other VTs remain operational). The XOrg log (attached) shows that the radeon driver fails to find a screen to its liking, 
> (EE) RADEON(0): No modes.
> (EE) Screen(s) found, but none have a usable configuration.
and then gives up altogether:-
> (EE) no screens found(EE)

The message "radeon 0000:04:00.0: VCE init error (-22)." appears during boot; the dmesg output for radeon is attached.

The problem occurs irrespective of whether the module parameter radeon.runpm = 0 or not.

The radeon configuration attached is adapted from the one used by Ubuntu 15.10 for fglrx. fglrx works properly on Ubuntu 15.10.
Comment 1 Saurav 2016-04-04 10:13:10 UTC
Created attachment 122693 [details]
Sample XOrg configuration for the radeon driver
Comment 2 Saurav 2016-04-04 10:13:41 UTC
Created attachment 122694 [details]
XOrg log for the radeon driver
Comment 3 Saurav 2016-04-04 10:35:31 UTC
I have experienced this with version 7.6.1-3.20160215gitd41fccc of xorg-x11-drv-ati on Fedora 23 and version 7.5.0+git20150819-0ubuntu1 of xserver-xorg-video-ati on Ubuntu 15.10. I am unsure which generic version is applicable to this bug.
Comment 4 Michel Dänzer 2016-04-05 06:34:18 UTC
Please attach the full dmesg output.
Comment 5 Saurav 2016-04-05 12:01:38 UTC
Created attachment 122716 [details]
Full dmesg log
Comment 6 Michel Dänzer 2016-04-06 10:07:41 UTC
Looks like the AMD GPU has no physical display connections, so running X on that alone isn't possible, and I'm not sure vgaswitcheroo is useful either.
Comment 7 Saurav 2016-04-06 13:05:33 UTC
(In reply to Michel Dänzer from comment #6)
> Looks like the AMD GPU has no physical display connections, so running X on
> that alone isn't possible, and I'm not sure vgaswitcheroo is useful either.

How does fglrx work on Ubuntu 15.10, then? Booting with fglrx installed (which creates the XOrg configuration file I have posted for radeon but with "fglrx" instead of "radeon" for the driver) works properly and selects the AMD chip. The active GPU is shown as the AMD one in both the GUI (Unity/GNOME system details panel) and by the text-mode tools (glxinfo, inxi, etc.).

Also, with the radeon driver, the system does not select the AMD chip for HDMI either.
Comment 8 Alex Deucher 2016-04-06 13:12:16 UTC
(In reply to Saurav from comment #7)
> (In reply to Michel Dänzer from comment #6)
> > Looks like the AMD GPU has no physical display connections, so running X on
> > that alone isn't possible, and I'm not sure vgaswitcheroo is useful either.
> 
> How does fglrx work on Ubuntu 15.10, then? Booting with fglrx installed
> (which creates the XOrg configuration file I have posted for radeon but with
> "fglrx" instead of "radeon" for the driver) works properly and selects the
> AMD chip. The active GPU is shown as the AMD one in both the GUI
> (Unity/GNOME system details panel) and by the text-mode tools (glxinfo,
> inxi, etc.).

The intel driver still drives the display.  fglrx just copies the rendered content to the intel display buffer.

> 
> Also, with the radeon driver, the system does not select the AMD chip for
> HDMI either.

The AMD chip you have does not even have display hardware.  You have a muxless system which means the dGPU is only used for offscreen rendering.  The dGPU renders to an offscreen buffer and it's copied to the integrated GPU for display.
Comment 9 Saurav 2016-04-06 13:20:48 UTC
(In reply to Alex Deucher from comment #8)
> (In reply to Saurav from comment #7)
> > (In reply to Michel Dänzer from comment #6)
> > > Looks like the AMD GPU has no physical display connections, so running X on
> > > that alone isn't possible, and I'm not sure vgaswitcheroo is useful either.
> > 
> > How does fglrx work on Ubuntu 15.10, then? Booting with fglrx installed
> > (which creates the XOrg configuration file I have posted for radeon but with
> > "fglrx" instead of "radeon" for the driver) works properly and selects the
> > AMD chip. The active GPU is shown as the AMD one in both the GUI
> > (Unity/GNOME system details panel) and by the text-mode tools (glxinfo,
> > inxi, etc.).
> 
> The intel driver still drives the display.  fglrx just copies the rendered
> content to the intel display buffer.
> 
> > 
> > Also, with the radeon driver, the system does not select the AMD chip for
> > HDMI either.
> 
> The AMD chip you have does not even have display hardware.  You have a
> muxless system which means the dGPU is only used for offscreen rendering. 
> The dGPU renders to an offscreen buffer and it's copied to the integrated
> GPU for display.

OK, so is it possible to do something similar (copying to the Intel buffer) with the radeon driver?
Comment 10 Alex Deucher 2016-04-06 13:29:23 UTC
(In reply to Saurav from comment #9)
> 
> OK, so is it possible to do something similar (copying to the Intel buffer)
> with the radeon driver?

Yes.  Remove your xorg config and follow these instructions:
https://wiki.archlinux.org/index.php/PRIME
Comment 11 Saurav 2016-04-06 17:21:58 UTC
(In reply to Alex Deucher from comment #10)
> (In reply to Saurav from comment #9)
> > 
> > OK, so is it possible to do something similar (copying to the Intel buffer)
> > with the radeon driver?
> 
> Yes.  Remove your xorg config and follow these instructions:
> https://wiki.archlinux.org/index.php/PRIME

OK, I have followed these instructions and PRIME is working on both Fedora 23 and Ubuntu 15.10, although it seems that setting DRI_PRIME is as far as it is possible to go with the radeon driver because it does not do the offloading automatically if I use an XOrg configuration file, so I will have to use a start-up script or something if I want to use it, as mentioned in the Arch wiki article. Thanks for the help.
Comment 12 Michel Dänzer 2016-04-11 08:10:06 UTC
(In reply to Saurav from comment #11)
> [...] it seems that setting DRI_PRIME is as far as it is possible to go with
> the radeon driver because it does not do the offloading automatically if I use
> an XOrg configuration file, so I will have to use a start-up script or
> something if I want to use it, as mentioned in the Arch wiki article.

If you enable DRI3 with Option "DRI" "3", DRI_PRIME=1 works automagically.

Can this report be resolved?
Comment 13 Saurav 2016-04-13 14:54:26 UTC
(In reply to Michel Dänzer from comment #12)
> If you enable DRI3 with Option "DRI" "3", DRI_PRIME=1 works automagically.

How? Do you mean that the offloading will be done automatically, without having to explicitly set DRI_PRIME=1? I tried putting Option "DRI" "3" in an XOrg configuration file in the "Device" section for Driver "radeon", which results in the same error as before. Otherwise, at least on my system, DRI_PRIME=1 works without having to do xrandr --setprovideroffloadsink and also without explicitly setting up an XOrg configuration with Option "DRI" "3" on both Fedora 23 and Ubuntu 16.04, but I do have to explicitly set DRI_PRIME=1. What I was looking for would be a way to make the radeon driver do the offloading automatically without having to manually set DRI_PRIME=1.
Comment 14 Michel Dänzer 2016-11-30 03:46:55 UTC
(In reply to Saurav from comment #13)
> What I was looking for would be a way to make the radeon driver
> do the offloading automatically without having to manually set DRI_PRIME=1.

FWIW, with DRI3, you can enable PRIME offloading via ~/.drirc, either for all applications (but note that doing so will likely break the compositing manager, because GLX_EXT_texture_from_pixmap isn't supported with PRIME offloading) or for individual applications.

Also, current versions of GNOME (as available e.g. in Fedora 25) allow enabling PRIME offloading in the launcher application properties.

Anyway, there's no Xorg radeon driver bug here, resolving accordingly.


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.