New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for AMD hybrid technology (PowerXpress) #52
Comments
Looks like all we really need is victi.... ehh... volunteers, to test stuff on. |
Following up on the howto I wrote on Gentoo forums, sharing some system logs (Xorg.log and dmesg) at http://hirakendu.mooo.com/powerexpress-stuff/logs/ for various combinations of Intel X.org drivers (2.15 vs 2.17), OpenGL libraries (mesa's vs fglrx's libGL.so), first or second X server (like bumblebee). Currently, the only working combination with fglrx is when using with Intel X.org 2.15 (thanks to the tip in http://forums.gentoo.org/viewtopic-t-881115.html), with fglrx libGL.so and on primary server. |
There seems to be two kinds of AMD hybrid graphics (thanks for making it more confusing AMD...). Relevant documentation:
Marketing: From Radeon 6000M, it'll be called "Radeon" instead of "ATI Radeon". Not sure if this has implications for the PCI Vendor ID. |
Remaining textual changes: init scripts, bugreport
This breaks driver detection for optirun, which will be fixed when the protocol is improved.
Whether this method works for you still depends on switcheroo in kernel!
Driver detection is now broken in optirun, to fix that, fix #31. Power management stuff has not completed yet. |
I'm ArchLinux user with Intel/AMD vga and in Arch is realy hard to install Catalyst, because it's not compatible with new versions xorg. So i'm open to help you with this project and test stuff. |
Any update on this?, could i help in anyway? Have a hp laptop with amd/amd hybrid graphics. |
No update on this, though AMD seems to be working on this. I saw some APTX ACPI patches on the dri-devel ml. For you it means that there may be a way to switch between cards later. |
Remaining textual changes: init scripts, bugreport
The nvidia change is white-space only.
Rebased on the development branch. Todo:
AMD users, please test the common-amd branch! When reporting, please mention whether you have an amd/amd or amd/intel setup. |
Can't get X to start on the discrete graphic card, it crash with a "Segmentation fault". (open-source radeon driver) See Xorg.log https://gist.github.com/3842851
Hardware is a HP Pavilion dv6-6145eo with a Radeon HD 6755G2 (integrated AMD Radeon HD 6520G APU graphic card and discrete AMD Radeon HD 6750M graphic card), where i can't get the X server to start on "AMD Radeon HD 6750M", the setup is Muxless.
|
Can you rebuild xf86-video-radeon and xorg-server with debugging symbols enabled? use Then run (adjust paths accordingly):
(r = run, bt = backtrace, c = continue). |
Here you go: https://gist.github.com/3847935 |
@klausenbusk Please take it to the upstream developers (radeon and/or xorg-server). As far as I can see, it segfaults because no outputs are found in xf86Crtc.c:2362:
Then, on the end some function is called that ultimately tries to access
I think the radeon people cannot do much about it, but I might be wrong. The crash when output is NULL should be fixed by the xorg-server devs though. (if it helps, there is a thread on the AL forums with the same error message, https://bbs.archlinux.org/viewtopic.php?id=141616) |
Thanks for your time!! Do you self have some ATI/AMD hardware to test with? And how can i help with getting Bumblebee to work with Intel/AMD/ATI, just write here if it crash? or how? |
@klausenbusk Unfortunately I have no AMD hw on a laptop, so I need to rely on users like you who want to get their stuff working. Currently this bug is focused on getting optirun to run at least on AMD hw (either intel/amd or amd/amd). Later on, power control should be made available as an extension to bbswitch (works for fglrx too) or fix to vga_switcheroo (will only work for opensource drivers). Please test it with all hybrid Intel/ATI/AMD+ATI/AMD laptops you have available on. In order to help with fixing vga_switcheroo, I request you to answer the questions given in https://bugzilla.kernel.org/show_bug.cgi?id=45061#c3 |
Have just tested a bit on my Intel/Ati laptop. Now the problems begin, can't start oilrush with optirun ([VGL] ERROR: glXCreateContextAttribsARB symbol not loaded), it start fine on the integrated card and fine on the discrete card (laptop have a multiplexer), but can't get it started with optirun.
Have looked at #124 but there seems to be no fix. Minecraft won't start with "optirun java -jar minecraftjar" but work with "optirun --vgl-options -nodl java -jar minecraft.jar", do there need to be fixed something in something? |
switcheroo is supposed to work for ON/OFF until you do a suspend. When you have a black screen, you can try ssh'ing into your machine and look for errors in your dmesg and Xorg.0.log. Do Oh, and can you compare /var/log/Xorg.0.log against Xorg.8.log? The integrated GPU is also listed in Xorg.8.log which looks a bit strange. |
Return back when i have tested with mesa 9.0, where the Intel driver have got OpenGL 3.1 and radeon 3.0 |
Mesa 9.0 fix nothing, same error. Don't know if it need kernel 3.6? |
We had the problem with glXCreateContextAttribsARB already with the first bumblebee version. |
Thanks BlueCase, i believe what you say. Will try with Primus alternative to virtualgl. |
I /think/ i was finally able to get this to work -- I did some very rudimentary benchmarks, and it /appears/ that virtualgl is offloading to my 7970m -- the performance on however, i do notice, when i run
is this normal, that the program would detect the intel card, even though it's getting processed by the radeon via vgl? |
What works? intel+fglrx or intel+radeon? |
Hello, I got the common-amd branch to work with my HP dv7 laptop, which has a quad-core Intel i7-2630QM CPU and a Radeon HD 6400M GPU. I used a combination of fglrx (with PowerXpress support) and i915. With some hacks I got direct rendering working on both cards simultaneously, and I can call the ATI card using optirun/virtualgl. My question is if AMD hybrid support is still in the works - I am interested in using the latest Bumblebee and primus instead of VirtualGL. |
I don't think anybody was recently working on merging common-amd branch. primus should work, it's not nVidia specific |
I have never gotten primus to run. > optirun glxinfo | head name of display: :0 display: :0 screen: 0 direct rendering: Yes server glx vendor string: VirtualGL server glx version string: 1.4 server glx extensions: GLX_ARB_create_context, GLX_ARB_create_context_profile, GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_make_current_read, GLX_SUN_get_transparent_index > primusrun glxinfo | head Xlib: extension "NV-GLX" missing on display ":8". XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":8" after 28 requests (28 known processed) with 0 events remaining. name of display: :0 Presumably I need Bumblebee with primus support, which the amd branch lacks. |
Ok, I can confirm that the fglrx + bumblebee works now. But not out of the box. Let's see if I get everything together I did. This is specific to a certain package in the archlinux aur, modified for amd's beta driver: http://www2.ati.com/drivers/beta/amd-catalyst-13.15.100.1-linux-x86.x86_64.zip So only sort of a checklist of stuff you can watch out for if it doesn't work for you. bumblebee.conf needs this added to the config:
Probably doesn't need /usr/lib/xorg in the XorgModulePath, but whatever. /usr/lib/xorg/modules/updates/extensions/fglrx/ contains fglrx-libglx.so and I symlinked it to libglx.so in the same directory because the linker wouldn't pick it up. You'll find this out if you run /etc/bumblebee/xorg.conf.fglrx is the one from the repository I think:
To make your integrated gpu also work, make sure that LIBGL_DRIVERS_PATH and LD_LIBRARY_PATH are not set to fglrx's paths by any script e.g. in /etc/profile.d Then make sure that in /etc/X11/xorg.conf.d/ there is no ModulePath set to any of fglrx's paths. I found that I had to create
because X would pick fglrx's libglx first for some reason. That's pretty much it. In /usr/lib/xorg/modules/dri I have fglrx_dri.so and the intel stuff. In /usr/lib/xorg/modules/drivers/ I have fglrx_drv.so and the intel stuff. I also have /usr/lib/xorg/modules/linux/libfglrxdrm.so, and lastly like I already mentioned my fglrx's libglx in /usr/lib/xorg/modules/updates/extensions/fglrx/ Edit: Oh yes, in /usr/lib/catalystpxp there is fglrx's libGL.so, (and symlinks libGL.so.1, libGL.so.1.2) I'm not completely sure how everything finds the correct paths with this strange setup, but it seems to work. I have only one little problem: After the X server with fglrx started by optirun exits, my main X server gets all messed up and I have to go to a tty and then back to X for it to render correctly again, but then my second screen only shows black...? Probably more of an intel problem I would guess... Last question: catalyst doesn't seem to power off the card when it's not used. What would be an appropriate method for radeon cards? |
Unload catalyst, load the open-source driver and power down the card via vgaswitcheroo. The relevant ACPI method is ATPX. On nVidia systems, bbswitch can take care of invoking the ACPI method (_DSM), but nobody has worked on adding ATPX handling in bbswitch. I looks like you haven't attempted to test primus? The conversation about it continued here: amonakov/primus#104 |
@ChristophHaag I put together some scripts and config files to get Bumblebee to play nice with fglrx. The X server corruption can be avoided by sending a kill -s 9 to the secondary X server instead of a normal termination (lol). The radeon card can be turned off using a single ACPI call, however I have not found a way to turn it back on without rebooting. |
@amonakov That is a possibility, but I have had severe problems with kernel panics when unloading and loading radeon/fglrx. I think for radeon this has been finally solved in 3.10 or so. But for fglrx I still have it, for example this was just today: @YoRyan Yes, kill -9 does kill the other xserver without affecting my primary one. Took a few seconds to track, so if people want to have that behaviour from bumblebee by default, it is in I just commented out the other stuff:
But it would be better to have it fixed upstream at the Xorg server... this does qualify as a bug, doesn't it? |
Hello everyone. Please, apologize If I'm doing a wrong post in the wrong place. First I tried with radeon xorg drivers. From the first perspective seems everything work ( testing under arch distro and ubuntu 13.10) and under arch at last seems it work. but i'm concerned with the performance when doing some comparison with dri prime.
When I'm trying the same using DRI_PRIME;
so.. why using bumblebee seems load the R600 driver and later i965 driver? i'm missing something? Using catalyst..
Under ubuntu same using intel and unloading/blacklisting fglrx and doing al kind of sorcery with libgl inte/fglrx drivers, well BLACK SCREEN. cant load to test bumblebee then.. So.. I'm glad if someone comment about .... |
The fglrx error means that your laptop has muxed hybrid graphics. But I would suggest you to switch to open source radeon drivers. First, in kernel 3.10 the support of VDPAU through UVD was merged. Dynamic power management (DPM) was included in 3.11. In your case your discrete GPU is supported by r600g driver, which is mature enough. As for DRI_PRIME, did you do
before running application? Also since your system is muxed IIRC you need to restart x server after enabling discrete GPU through vgaswitcheroo. Is there any success story with bumblebbe+fglrx on non Arch systems? |
"The fglrx error means that your laptop has muxed hybrid graphics." NO.. This card/configuration is muxless ( under windows act/work being a muxless and doing some hacks works on demand like last cards, per app) (this is almost the same problem from some 7xx/67xx/69xx cards). http://www.amd.com/us/products/notebook/graphics/amd-radeon-6000m/amd-radeon-6800m/Pages/amd-radeon-6800m.aspx#2 Seems or the FGLRX already have this id:manufaturer configuration blacklisted or is loading the wrong card id since 6850m is a re-branded "5850hd" or the hp bios ( always fucked) setup by default in igpu not dgpu. i'm not speaking about muxed output here) ".. When using aticonfig --px-dgpu the fglrx driver load himself and unload the previous loaded intel module trying to load by himself the intel module and then this message. Because this we CANT load fglrx driver + intel same time. I'm already trying use the r600g driver.. No.. vgaswitcheroo doesnt work in this intel/amd configuration because in fact they are MUXLESS. "... Is there any success story with bumblebbe+fglrx on non Arch systems? ..."
Seems good to bumblebee team take a look in this default offloading in ubuntu, since this will cause a lot of bug requests when ubuntu 13/10 release. |
Can you do something about OpenCL? It sucks a bit on catalyst because you need an X server that was started with the fglrx ddx. hello_world from git://people.freedesktop.org/~tstellar/opencl-example
|
@ChristophHaag, are you asking for an optirun command line flag to reset (it's quite unfortunate fglrx needs that; does it mean you can't run opencl programs without starting an X session?) |
The X session started by bumblebee is fine. But you can only use OpenCL if you set DISPLAY to that X session. That's no problem for command line programs but if you have a gui program that makes use of OpenCL it will get displayed on the invisible X and you have to use VNC or xpra or so to see it. I have no idea how fglrx's OpenCL works so I don't know whether it would be easy with some trickery to make it work with optirun without the need to set DISPLAY to :8. |
@ChristophHaag For OpenCL you do not even need the X server. Support for OpenCL on radeon (using the r600 Gallium driver) is experimental (expect bugs!) and you need the following:
I have not tried fglrx, so perhaps read/write access to /dev/dri/cardN is sufficient to get OpenCL to work for it too. You can also join #radeon on Freenode if you need more help with OpenCL and radeon. |
Good afternoon. I have obtained the link to this project in http://forums.amd.com/game/messageview.cfm?catid=488&threadid=176217&enterthread=y and try to use it for enabling my dedicated card (AMD Radeon HD 8750M) with fglrx driver on Lenovo IdeaPad G500A,
OS openSUSE 13.1 (I want to use it for OpenCL programming). I have downloaded common-amd branch of the project and installed it, adding
into Bumblebee-common-amd/src/pci.h and adding PCI_CLASS_DISPLAY_OTHER into this line of the Bumblebee-common-amd/src/pci.c file:
Also I added lines recommended by @ChristophHaag into bumblebee.conf file (correspondingly to my system):
I start Bumblebee as follows.
It returns first 7 lines of this command run with Intel card. After this machine hangs. Sometimes this command completed execution before computer hanged. There was one error in the output. It was written that display: :8 cannot be opened. Unfortunately, I couldn't reproduce this to take photo. The Xorg.8.log file is empty. Could anybody help get this trick working, please? Thank you in advance, |
It's an interesting question whether it actually does work at all. By now there have been many changes like the "megadrivers" in mesa, that could be a complication. I haven't tried to use this in a looong time. But I remember that it was always a bit tricky to load the right libraries in the right order. Do not use But when starting with optirun you might need to set LD_LIBRARY_PATH and/or LIBGL_DRIVERS_PATH and maybe even LD_PRELOAD to load fglrx's libraries. Sorry, don't know much more right now. I can only say that after a bit of tinkering it gets clearer that
That's an error I have never seen before, maybe it's new. Do you only need OpenCL? You might not need bumblebee at all for it. Just try to start your opencl program with root, with a little bit of luck it "just works". Maybe you need to set LD_LIBRARY_PATH for it to use the fglrx's libraries first. At least I believe that using fglrx's OpenCL support as a normal user required an X session, but as root it would work without an x session like from a tty. |
Thank you for answer! Yes, this card is mainly assumed to be used as a compute device. Graphics capabilities of the Intel card are enough for me. I have tried to execute clinfo as root, but it returns
I have tried to do
but nothing changes. Help me, please. I understand, this is not exactly the topic of this discussion, but I really want to get the AMD GPU working... |
If you just need it for compute purposes, maybe you will have more success with the opensource radeon driver. It can be competive with the fglrx driver. |
I tried radeon driver. The driver by itself works, but GalliumCompute SDK supports cards up to Tahiti only. My GPU is Oland and it is too new for that SDK. |
Hey everyone, |
Maybe a stupid question. Bur how is Bumblebee different than DRI_Prime, if you is using the open source driver?
|
@baudouinroullier It is no use to use bbswitch for radeon hardware, bbswitch is written for nvidia hardware. The main advantage of bumblebee over PRIME is that you can disable the card when you decide not to use it. Since that is not possible using bbswitch, I suggest to try PRIME instead. If you enable runtime power management for the PCI device, then it will disable itself after the last user (an application via PRIME) is gone (after a delay of 5 seconds). |
Thank you for your answers. @klausenbusk Sorry, I didn't really understand your question. I'm quite a begginer in hybrid graphics and drivers and whatnot. If you do need data or anything from my hardware I'd be glad to help. |
DRI_PRIME is a proper implementation of switchable graphics based on kernel mechanisms. And as such it is only supported by free drivers. Also it can automatically power on and shutdown the discrete graphics. At this point this is much better solution for radeon GPUs. In addition, due to AMD's decision to use free kernel driver as a base for future versions of userspace fglrx it will be in even better state. |
How's the current state of this issue? |
It's confirmed that the concept for Bumblebee also works for AMD Hybrid graphics: http://forums.gentoo.org/viewtopic-t-909802.html (via http://phoronix.com/forums/showthread.php?68327-Bumblebee-Has-Tumbleweed-For-NVIDIA-Optimus-On-Linux&p=247659#post247659)
For supporting AMD hybrids, we need to:
I don't have AMD hardware to play with, but it shouldn't be difficult to extend bbswitch for AMD PowerXpress. The other changes are neither difficult.
The text was updated successfully, but these errors were encountered: