ATI proprietary driver and Linux Mint 18

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
rene
Level 7
Level 7
Posts: 1892
Joined: Sun Mar 27, 2016 6:58 pm

Re: ATI proprietary driver and Linux Mint 18

Post by rene » Wed Oct 04, 2017 1:45 pm

a.bowers wrote: ... I don't have the knowhow to begin to figure out why.
And I myself don't have the knowhow to end such, given the lack of hardware. It's unfortunate that someone who does never seems to interject in these threads; best I can do is throw a bit of generic Linux familiarity at the issue. In which sense...

Try the output of

Code: Select all

xrandr --listproviders
This should show 2 providers (if not, you may need to visit your BIOS settings), one supposedly named "Intel" and the other "radeon", as per https://wiki.archlinux.org/index.php/PRIME. That page mentions that the DRI_PRIME method may start working after doing, using the proper names,

Code: Select all

xrandr --setprovideroffloadsink radeon Intel
Now then? :?

a.bowers
Level 1
Level 1
Posts: 41
Joined: Mon Nov 24, 2014 3:50 pm

Re: ATI proprietary driver and Linux Mint 18

Post by a.bowers » Wed Oct 04, 2017 2:37 pm

Well tell you what, my hardware is at your disposal, if I can make a contribution, even if it's just "try this and tell me what it says," I'll help where I can.

Output of xrandr --listproviders:

Providers: number : 3
Provider 0: id: 0x68 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 3 associated providers: 2 name:Intel
Provider 1: id: 0x41 cap: 0x6, Sink Output, Source Offload crtcs: 2 outputs: 0 associated providers: 2 name:OLAND @ pci:0000:08:00.0
Provider 2: id: 0x41 cap: 0x6, Sink Output, Source Offload crtcs: 2 outputs: 0 associated providers: 2 name:OLAND @ pci:0000:08:00.0

output of xrandr --setprovideroffloadsink radeon Intel:

Could not find provider with name radeon

I'm guessing that's a problem?

rene
Level 7
Level 7
Posts: 1892
Joined: Sun Mar 27, 2016 6:58 pm

Re: ATI proprietary driver and Linux Mint 18

Post by rene » Wed Oct 04, 2017 2:58 pm

Certainly; you need the proper name or, as seems more appropriate in this case, proper id. That is, try

Code: Select all

xrandr --setprovideroffloadsink 1 0
before

Code: Select all

DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
If no dice, howzabout xrandr --setprovideroffloadsink 2 0 instead?

a.bowers
Level 1
Level 1
Posts: 41
Joined: Mon Nov 24, 2014 3:50 pm

Re: ATI proprietary driver and Linux Mint 18

Post by a.bowers » Wed Oct 04, 2017 3:09 pm

Actually I think that's got it. Now when I do: DRI_PRIME=1 glmark2

one of the lines of output is:

GL_RENDERER: Gallium 0.4 on AMD OLAND (DRM 2.49.0 / 4.10.0-35-generic, LLVM 4.0.0)

rene
Level 7
Level 7
Posts: 1892
Joined: Sun Mar 27, 2016 6:58 pm

Re: ATI proprietary driver and Linux Mint 18

Post by rene » Wed Oct 04, 2017 3:40 pm

That seems to work then. You now supposedly would like that offload command to be executed automatically; given that we need to wait for X to in fact be up the desktop startup applications is the easiest opportunity for that. Cinnamon? Menu -> Preferences -> Startup Applications, Add, Custom Command, name "PRIME" and command "/usr/bin/xrandr --setprovideroffloadsink 1 0" (of course, using 2 instead of 1 if you needed to do that) probably works; log out and back in to test.

As to the DRI_PRIME environment variable; you can first of all of course continue starting applications manually "in the glmark2 manner". You could set it for your specific user and all programs by adding export DRI_PRIME=1 to ~/.profile; for all users and all programs by adding same to /etc/profile (in both those cases, log out and back in to test); per program by editing /usr/share/applications/foo.desktop to replace Exec=foo by Exec=env DRI_PRIME=1 foo; per-Steam game by changing the launch command to DRI_PRIME=1 %command% as per https://support.steampowered.com/kb_art ... -JWMT-2947; per ...

Well, and so on, dependent on your wants.

a.bowers
Level 1
Level 1
Posts: 41
Joined: Mon Nov 24, 2014 3:50 pm

Re: ATI proprietary driver and Linux Mint 18

Post by a.bowers » Wed Oct 04, 2017 5:03 pm

One final question: At this point, what would I do to get the machine totally running on the AMD graphics, rather than just one application?

rene
Level 7
Level 7
Posts: 1892
Joined: Sun Mar 27, 2016 6:58 pm

Re: ATI proprietary driver and Linux Mint 18

Post by rene » Wed Oct 04, 2017 5:54 pm

Let me first quickly note that /etc/X11/Xsession.d/ might be better than the desktop startup appications route that I mentioned above for the xrandr command. Am myself on Mint 17.3 and shall refrain from details which might not apply on Mint 18, but a reader may want to look into it.

Still stumbling about in the dark here but your providers 1 and 2 (i.e., your R7 265) are listed as supplying 0 outputs, the Intel one as supplying 3. If I'm not misinterpreting "outputs" that might just mean that your R7 does not itself have, well, outputs, but needs to feed the Intel card. That is, I believe we find ourselves in the "Discrete card as primary GPU" situation as described in that same Arch Linux article, https://wiki.archlinux.org/index.php/PRIME.

So, does it work to create the there mentioned /etc/X11/xorg.conf.d/10-gpu.conf file, replacing every occurrence of "nouveau" with "radeon" and plugging in the correct PCI bus addresses? As to that latter part: if your Intel and AMD GPUs are listed as, say, 00:02:00 respectively 01:00:00 in the output of lspci you'd use the in that example used specifiers "PCI:0:2:0" respectively "PCI:1:0:0".

Logging out and back in is probably enough also on Mint 18 (and with LightDM as on 18.2) but if not; rebooting certainly is enough to have the changed X configuration active. Careful. If the above is incorrect you may find yourself with a non-starting X server. If so and if not already there, switch to a virtual console with Ctrl-Alt-F1 or -F2, login as your user, sudo rm /etc/X11/xorg.conf.d/10-gpu.conf and reboot.

Also note the bit about xrandr --setprovideroutputsource from that artile if you find it to be necessary; still use 0 instead of "Intel" and 1 or 2 instead of "nouveau".

Seems promising. But, well, if not, then I do believe you may want to wait for someone with actual hands-on experience here. Full VGA switcheroo, as far as still applicable in the first place, is a bit of a disaster when you don't have it locally to test things.

torchbat11
Level 1
Level 1
Posts: 1
Joined: Sun Dec 31, 2017 1:39 pm

Re: ATI proprietary driver and Linux Mint 18

Post by torchbat11 » Sun Dec 31, 2017 1:50 pm

Rene,

I'm in a very similar situation as a.bowers. Mint 18.3 and Intel integrated graphics combined with an AMD radeon gpu.

$ xrandr --listproviders
Providers: number : 3
Provider 0: id: 0x6c cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 5 associated providers: 2 name:Intel
Provider 1: id: 0x44 cap: 0x6, Sink Output, Source Offload crtcs: 4 outputs: 1 associated providers: 2 name:CAICOS @ pci:0000:01:00.0
Provider 2: id: 0x44 cap: 0x6, Sink Output, Source Offload crtcs: 4 outputs: 1 associated providers: 2 name:CAICOS @ pci:0000:01:00.0


I have set /usr/bin/xrandr --setprovideroffloadsink 1 0 in a startup application with a delay of 0, but cannot am not sure where do add the DRI_PRIME=1 to. I added it to my ~/.profile and the results frazzled my whole screen enough to make it unreadable. Any ideas?

Thanks so much for your posts so far, I think this as close as i've been to turning on my discrete card so far.

EDIT: i think i got it! using xrandr --setprovideroffloadsink 1 0 in a startup application with a delay of 0. Then i run env DRI_PRIME=1 foo in the script that launches the programs i want to use the discrete GPU in. Found that gem here: https://forums.fedoraforum.org/showthre ... rid-system

Is there a way to tell for sure if it's working? It sure seems like it as the program i was running without it barely would start and now runs smooth but that's circumstantial evidence.

gsagostinho
Level 1
Level 1
Posts: 46
Joined: Sat Jul 26, 2014 5:24 pm

Re: ATI proprietary driver and Linux Mint 18

Post by gsagostinho » Fri Jan 19, 2018 5:57 am

Just a quick comment as the OP: I have not replied at all to any of the new comments because I have not been following the forum since a long time and I also have since moved to a new laptop, this time with a Nvidia card which seems to work very well. But I just wanted to say I am very grateful to all of you who posted here and for all feedback you guys give in this forum, many, many thanks.

rene
Level 7
Level 7
Posts: 1892
Joined: Sun Mar 27, 2016 6:58 pm

Re: ATI proprietary driver and Linux Mint 18

Post by rene » Fri Jan 19, 2018 11:11 am

Only see this question after the additional reply by gsagostinho; must have missed it earlier; posting day will have something to do with that...
torchbat11 wrote:EDIT: i think i got it! using xrandr --setprovideroffloadsink 1 0 in a startup application with a delay of 0. Then i run env DRI_PRIME=1 foo in the script that launches the programs i want to use the discrete GPU in. Found that gem here: https://forums.fedoraforum.org/showthre ... rid-system
Or look up 5 posts :-)

In ~/.profile, as you say you have tried, you'd add the variable as export DRI_PRIME=1, not through env. After logging out and back in the variable would then be active in the environment of any program without need to add it to further individual scripts or .desktop files.

Of course, you mentioning having "frazzled your screen" means you may have already done that (as the plain env method would not in fact do anything) and that some part of your setup isn't happy with a global DRI_PRIME=1; that you may as well keep it per-application as you are doing currently. The way to check if things are working at all is through DRI_PRIME=1 glxinfo | grep "OpenGL renderer". If this shows your discrete card being used you're setup correctly.

Post Reply

Return to “Graphics Cards & Monitors”