Bumblebee-Project / Bumblebee

Bumblebee daemon and client rewritten in C
http://www.bumblebee-project.org/
GNU General Public License v3.0
1.29k stars 142 forks source link

Support for AMD hybrid technology (PowerXpress) #52

Open Lekensteyn opened 12 years ago

Lekensteyn commented 12 years ago

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.

Thulinma commented 12 years ago

Looks like all we really need is victi.... ehh... volunteers, to test stuff on.

Lekensteyn commented 12 years ago

More links: http://www.anandtech.com/show/4839/mobile-gpu-faceoff-amd-dynamic-switchable-graphics-vs-nvidia-optimus-technology/2 https://lists.launchpad.net/hybrid-graphics-linux/msg01481.html

hirakendu commented 12 years ago

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.

Lekensteyn commented 12 years ago

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.

Lekensteyn commented 12 years ago

Driver detection is now broken in optirun, to fix that, fix #31. Power management stuff has not completed yet.

kravemir commented 12 years ago

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.

klausenbusk commented 12 years ago

Any update on this?, could i help in anyway? Have a hp laptop with amd/amd hybrid graphics.

Lekensteyn commented 12 years ago

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.

Lekensteyn commented 11 years ago

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.

klausenbusk commented 11 years ago

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

00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI BeaverCreek [Radeon HD 6520G]
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Whistler [AMD Radeon HD 6600M Series]

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.

uname -a 
Linux arch 3.5.4-1-ARCH #1 SMP PREEMPT Sat Sep 15 08:12:04 CEST 2012 x86_64 GNU/Linux

pacman -Q | grep ati
ati-dri 8.0.4-3
lib32-ati-dri 8.0.4-4
xf86-video-ati 1:6.14.6-1
Lekensteyn commented 11 years ago

Can you rebuild xf86-video-radeon and xorg-server with debugging symbols enabled? use export CFLAGS='-g -O1' (or even -O0 for no optimization and better debugging).

Then run (adjust paths accordingly):

# gdb --args X :8 -config /etc/bumblebee/xorg.conf.radeon -sharevts -nolisten tcp -noreset -isolateDevice PCI:01:00:00
(gdb) r
... crash here ...
(gdb) bt
... or if it is not a segfault, just run ...
(gdb) c

(r = run, bt = backtrace, c = continue).

klausenbusk commented 11 years ago

Here you go: https://gist.github.com/3847935

Lekensteyn commented 11 years ago

@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:

   2362     ret = xf86CollectEnabledOutputs(scrn, config, enabled);
   2363     if (ret == FALSE && canGrow) {
   2364         xf86DrvMsg(i, X_WARNING,
   2365                    "Unable to find connected outputs - setting %dx%d initial framebuffer\n",
   2366                    NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT);
   2367         have_outputs = FALSE;
   2368     }

Then, on the end some function is called that ultimately tries to access config->output (according to your backtrace) which is NULL:

   2503     xf86SetScrnInfoModes(scrn);

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)

klausenbusk commented 11 years ago

Thanks for your time!! Have posted a bug on https://bugs.freedesktop.org/show_bug.cgi?id=55731 but think i have written it under a wrong "Component" :)

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? Because i also have a older laptop with Intel/ATI i could test with, and maybe i could test with Fglrx on this laptop where radeon do not work.

Lekensteyn commented 11 years ago

@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

klausenbusk commented 11 years ago

Have just tested a bit on my Intel/Ati laptop. First switcheroo seems to work (suspend/resume not tested, and resume from suspend don't work for some reason on this laptop (black screen)). Just need to made a "[driver-radeon]" section and add "PMMethod=switcheroo", maybe you could add "[driver-radeon]" and "[driver-fglrx]" section to bumblebee.conf in git. Edit: There seems to be some problem with it, a little hard to explain. (don't have time to write right now)

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. Logs: (say if you need more info) bumblebeed --debug To long to ber here: https://gist.github.com/3854709 optirun --debug oilrush

[kristian@arch ~]$ optirun --debug oilrush
[  285.121137] [DEBUG]optirun version 3.0-51-ga00f533 starting...
[  285.121211] [DEBUG]Active configuration:
[  285.121249] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  285.121277] [DEBUG] X display: :8
[  285.121303] [DEBUG] LD_LIBRARY_PATH: 
[  285.121330] [DEBUG] Socket path: /var/run/bumblebee.socket
[  285.121357] [DEBUG] VGL Compression: proxy
[  297.755905] [INFO]Response: Yes. X is active.

[  297.755930] [INFO]Running application through vglrun.
[  297.756071] [DEBUG]Process vglrun started, PID 8304.
QGtkStyle was unable to detect the current GTK+ theme.
Loading "/home/kristian/.OilRush/oilrush.cfg"...
Loading "libNetwork_x86.so"...
Loading "libGL.so.1"...
Loading "libopenal.so.1"...
Set 1366x768 fullscreen video mode
[VGL] ERROR: glXCreateContextAttribsARB symbol not loaded
AL lib: ALc.c:1879: exit(): closing 1 Device
AL lib: ALc.c:1808: alcCloseDevice(): destroying 1 Context(s)
[  303.904476] [DEBUG]SIGCHILD received, but wait failed with No child processes
[  303.904705] [DEBUG]Socket closed.
[  303.904873] [DEBUG]Killing all remaining processes.

Have looked at https://github.com/Bumblebee-Project/Bumblebee/issues/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?

Lekensteyn commented 11 years ago

-nodl prevents VGL from intercepting libGL library calls, possibly preventing optirun from having any effect.

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 optirun glxgears and optirun glxspheres work? glXCreateContextAttribsARB exists in the Mesa GL library, not sure why it does not work here.

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.

klausenbusk commented 11 years ago

Return back when i have tested with mesa 9.0, where the Intel driver have got OpenGL 3.1 and radeon 3.0 http://www.phoronix.com/scan.php?page=news_item&px=MTIwMjE http://www.phoronix.com/scan.php?page=news_item&px=MTIwMjQ Then it should work with mesa 9.0, because glXCreateContextAttribsARB require OpenGL 3.0 or later. Current intel and radeon driver only have OpenGL 2.1

klausenbusk commented 11 years ago

Mesa 9.0 fix nothing, same error. Don't know if it need kernel 3.6?

BlueCase commented 11 years ago

We had the problem with glXCreateContextAttribsARB already with the first bumblebee version. https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/issues/314

klausenbusk commented 11 years ago

Thanks BlueCase, i believe what you say. Will try with Primus alternative to virtualgl.

BlueCase commented 11 years ago

I will check tomorrow the VirtualGL package. Last time MrMEEE solved it and games how OilRush were playable.

HariSeldon85 commented 11 years ago

Hi, I'm an arch linux user with a dell inspiron 15r se : HD4000 + 7730M. I would like to help in testing and, if I can, in developing. how si the actual state of the project ?

Thanks, HS

Lekensteyn commented 11 years ago

@HariSeldon85 The state is still the same as a month ago. Does switcheroo ON/OFF work for you? Is the system initially booted on the more powerful chip or the power efficient one? Does Bumblebee from the common-amd branch work for you?

HariSeldon85 commented 11 years ago

Hi, Thanks for the answer. I've just cloned the common-amd branch and i'm trying to compile and install. After I've generated the configure file with "autoreconf -fi" how should I "adjust the library and set the module path"?

On the readme is written : "/configure CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia-current \ CONF_LDPATH_NVIDIA=/usr/lib/nvidia-current:/usr/lib32/nvidia-current \ CONF_MODPATH_NVIDIA=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules"

I'm using the radeonhd open driver.

Sorry for askin but these days i've not so much time to investigate myself. Thanks

HS

Lekensteyn commented 11 years ago

For the open-source drivers it is sufficient to use ./configure --sysconfdir /etc CONF_DRIVER=radeon, no special library or module paths are necessary. Then run make && sudo make install. If you prefer, you can use this PKGBUILD. The only changes you need is the ./configure line I mentioned and in addition you need to change _gitbranch=develop to _gitbranch=common-amd.

HariSeldon85 commented 11 years ago

Here we are. I'll try to do a little report as best as I can.

-- ASSUMPTIONS:

I've an Ivy bridge i7 CPU with intel HD4000 integrated GPU and the radeon hd 7730M (Dell inspiron 15R SE - a.k.a. inspiron 7520 ).

After I've installed ArchLinux (or any other distro) the system starts with the HD4000 gpu. This is because my system is a mux-less one, so, Xorg can't do the rendering on the radeon GPU because it is not attached to any display (the same behaviour of Nvidia/Optimus I think).

The reason above, is why switcheroo doesn't work out of the box for me and i cannot activate/use the discrete GPU. The only working feature of switcheroo is the powering off of the radeon card: If I do an "echo OFF > /sys/debug/vgaswitcheroo/switch" on /etc/rc.local, it really power off the radeon GPU. (checked with "lspci -vnnn | grep VGA).

--BUMBLEBEE BEHAVIOUR:

Now comes to bumblebee. I've installed bumblebee common-amd branch with the pkgbuild you linked. Installation was fine. Then I reboot.

The systems boots up correctly with the intel driver (checked with glxinfo). So I tryed to "optirun glxgears" but I've noticed that the bumblebee service was not running and my user wasn't added to "bumblebbe" group.

So I had to manually:

1) start bumblebee damon with systemd service 2) add my user to "bumblebee" group.

After that i've tried again to "optirun glxgears", but i've had this error:

................ [gigi@sirius ~]$ optirun -vv glxgears [ 137.139406] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf [ 137.139838] [INFO]Configured driver: radeon [ 137.140190] [DEBUG]optirun version 3.0-51-ga00f533 starting... [ 137.140216] [DEBUG]Active configuration: [ 137.140224] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf [ 137.140231] [DEBUG] X display: :8 [ 137.140237] [DEBUG] LD_LIBRARY_PATH: [ 137.140244] [DEBUG] Socket path: /var/run/bumblebee.socket [ 137.140250] [DEBUG] VGL Compression: proxy [ 137.157851] [INFO]Response: No - error: XORG Failed to load module "mouse" (module does not exist, 0)

[ 137.157883] [ERROR]Cannot access secondary GPU - error: XORG Failed to load module "mouse" (module does not exist, 0)

[ 137.157893] [DEBUG]Socket closed. [ 137.157923] [ERROR]Aborting because fallback start is disabled. [ 137.157933] [DEBUG]Killing all remaining processes. ................

So, i've googled around, and i've found this your post: https://github.com/Bumblebee-Project/Bumblebee/issues/123#issuecomment-5022385

But in /etc/X11/xorg.conf.d/ folder i've only 3 files : 10-synaptics.conf, 10quirks.conf, 10-evdev.conf and no one of these files forces the intel driver.

now i'm stucked here. I don't know what to do.

Hope this little report could help.

Really thanks for your hard work, and let me know how I could help.

Thanks,

HS

klausenbusk commented 11 years ago

HariSeldon85: Try install xf86-input-mouse to get the "mouse" module, what i do :) and remov the changes you have made to xorg.conf.d files.

HariSeldon85 commented 11 years ago

Ok, Done :)

Now the error is the following:

[gigi@sirius ~]$ optirun -vv glxgears [ 23.653104] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf [ 23.653587] [INFO]Configured driver: radeon [ 23.653900] [DEBUG]optirun version 3.0-51-ga00f533 starting... [ 23.653926] [DEBUG]Active configuration: [ 23.653934] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf [ 23.653941] [DEBUG] X display: :8 [ 23.653947] [DEBUG] LD_LIBRARY_PATH: [ 23.653954] [DEBUG] Socket path: /var/run/bumblebee.socket [ 23.653960] [DEBUG] VGL Compression: proxy [ 23.678535] [INFO]Response: No - error: XORG No devices detected.

[ 23.678554] [ERROR]Cannot access secondary GPU - error: XORG No devices detected.

[ 23.678558] [DEBUG]Socket closed. [ 23.678573] [ERROR]Aborting because fallback start is disabled. [ 23.678578] [DEBUG]Killing all remaining processes.

klausenbusk commented 11 years ago

What do bumblebbeed say? (try run it in a terminal with debug mode). I you radeon card enable in vgaswitchroo?

HariSeldon85 commented 11 years ago

The debug output is the following:

...................... [gigi@sirius ~]$ optirun --debug glxgears [ 74.372345] [DEBUG]optirun version 3.0-51-ga00f533 starting... [ 74.372388] [DEBUG]Active configuration: [ 74.372397] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf [ 74.372404] [DEBUG] X display: :8 [ 74.372410] [DEBUG] LD_LIBRARY_PATH: [ 74.372417] [DEBUG] Socket path: /var/run/bumblebee.socket [ 74.372424] [DEBUG] VGL Compression: proxy [ 74.396452] [INFO]Response: No - error: XORG No devices detected.

[ 74.396483] [ERROR]Cannot access secondary GPU - error: XORG No devices detected.

[ 74.396493] [DEBUG]Socket closed. [ 74.396524] [ERROR]Aborting because fallback start is disabled. [ 74.396535] [DEBUG]Killing all remaining processes. ........................

The radeon card is powered on as vgaswitcheroo says:

........................ [gigi@sirius ~]$ cat /sys/kernel/debug/vgaswitcheroo/switch 0:DIS: :Pwr:0000:01:00.0 1:IGD:+:Pwr:0000:00:02.0 ........................

and the radeon module is loaded as shown by get_module: ........................ [gigi@sirius ~]$ sudo get_module radeon coresize : 859398 initsize : 0 initstate : live refcnt : 0 taint : uevent : (null) Parameters: agpmode : 0 audio : 0 benchmark : 0 connector_table : 0 disp_priority : 0 dynclks : -1 gartsize : 512 hw_i2c : 0 lockup_timeout : 10000 modeset : 1 msi : -1 no_wb : 0 pcie_gen2 : -1 r4xx_atom : 0 test : 0 tv : 1 vramlimit : 0 Sections: .bss : 0xffffffffa0872be0 .data : 0xffffffffa0869500 .data.unlikely : 0xffffffffa0872810 .devinit.text : 0xffffffffa0842c50 .exit.text : 0xffffffffa0842d09 .fixup : 0xffffffffa0842d27 .gnu.linkonce.this_module : 0xffffffffa0872980 .init.text : 0xffffffffa0961000 .note.gnu.build-id : 0xffffffffa0842f78 .parainstructions : 0xffffffffa08693e0 .rodata : 0xffffffffa0842fa0 .rodata.str1.1 : 0xffffffffa08568c1 .rodata.str1.8 : 0xffffffffa085cda8 .smp_locks : 0xffffffffa0869098 .strtab : 0xffffffffa0974470 .symtab : 0xffffffffa09610f0 .text : 0xffffffffa07b4000 bug_table : 0xffffffffa08692f0 __ex_table : 0xffffffffa0869118 jump_table : 0xffffffffa0872780 mcount_loc : 0xffffffffa0866728 param : 0xffffffffa0866508 tracepoints_ptrs : 0xffffffffa0869420 tracepoints_strings : 0xffffffffa0869450 __tracepoints : 0xffffffffa0872840 _ftrace_events : 0xffffffffa0872818 ...................

This is a clean Arch installation, just for bumblebee testing purpose :). No rc-local script, no radeon blacklisting and modprobing. Just the intel and radeon driver package installed and then bumblebee.

klausenbusk commented 11 years ago

Sorry was asking for, "bumblebeed --debug"

HariSeldon85 commented 11 years ago

Here we are :)

[gigi@sirius ~]$ bumblebeed --debug [ 633.409007] [INFO]Loading driver bbswitch (module bbswitch) [ 633.409169] [DEBUG]Process modprobe started, PID 1148. FATAL: Module bbswitch not found. [ 633.410705] [DEBUG]Process with PID 1148 returned code 1 [ 633.411000] [ERROR]Module bbswitch could not be loaded (timeout?) [ 633.411034] [DEBUG]bbswitch is not available, perhaps you need to insmod it? [ 633.411079] [INFO]Skipping switcheroo PM method because it is not explicitly selected in the configuration. [ 633.411103] [WARN]No switching method available. The dedicated card will always be on. [ 633.411127] [DEBUG]Active configuration: [ 633.411149] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf [ 633.411172] [DEBUG] X display: :8 [ 633.411195] [DEBUG] LD_LIBRARY_PATH: [ 633.411219] [DEBUG] Socket path: /var/run/bumblebee.socket [ 633.411242] [DEBUG] pidfile: /var/run/bumblebeed.pid [ 633.411264] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.DRIVER [ 633.411305] [DEBUG] ModulePath: [ 633.411328] [DEBUG] GID name: bumblebee [ 633.411350] [DEBUG] Power method: auto [ 633.411379] [DEBUG] Stop X on exit: 1 [ 633.411403] [DEBUG] Driver: radeon [ 633.411426] [DEBUG] Driver module: radeon [ 633.411456] [DEBUG] Card shutdown state: 1 [ 633.411622] [DEBUG]Process modinfo started, PID 1149. [ 633.411699] [DEBUG]Hiding stderr for execution of modinfo [ 633.428622] [DEBUG]SIGCHILD received, but wait failed with No child processes [ 633.428696] [DEBUG]Configuration test passed. [ 633.428748] [ERROR]Cannot open or write pidfile /var/run/bumblebeed.pid.

HariSeldon85 commented 11 years ago

And running it with sudo :

[gigi@sirius ~]$ sudo bumblebeed --debug [ 754.463352] [INFO]Loading driver bbswitch (module bbswitch) [ 754.463536] [DEBUG]Process modprobe started, PID 1175. FATAL: Module bbswitch not found. [ 754.465101] [DEBUG]Process with PID 1175 returned code 1 [ 754.465407] [ERROR]Module bbswitch could not be loaded (timeout?) [ 754.465440] [DEBUG]bbswitch is not available, perhaps you need to insmod it? [ 754.465480] [INFO]Skipping switcheroo PM method because it is not explicitly selected in the configuration. [ 754.465504] [WARN]No switching method available. The dedicated card will always be on. [ 754.465527] [DEBUG]Active configuration: [ 754.465550] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf [ 754.465573] [DEBUG] X display: :8 [ 754.465595] [DEBUG] LD_LIBRARY_PATH: [ 754.465618] [DEBUG] Socket path: /var/run/bumblebee.socket [ 754.465640] [DEBUG] pidfile: /var/run/bumblebeed.pid [ 754.465662] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.DRIVER [ 754.465685] [DEBUG] ModulePath: [ 754.465709] [DEBUG] GID name: bumblebee [ 754.465731] [DEBUG] Power method: auto [ 754.465764] [DEBUG] Stop X on exit: 1 [ 754.465787] [DEBUG] Driver: radeon [ 754.465809] [DEBUG] Driver module: radeon [ 754.465832] [DEBUG] Card shutdown state: 1 [ 754.465992] [DEBUG]Process modinfo started, PID 1176. [ 754.466074] [DEBUG]Hiding stderr for execution of modinfo [ 754.480704] [DEBUG]SIGCHILD received, but wait failed with No child processes [ 754.480769] [DEBUG]Configuration test passed. [ 754.480879] [ERROR]Daemon already running, pid 351

Lekensteyn commented 11 years ago

You should look in /var/log/Xorg.8.log for more useful messages.

HariSeldon85 commented 11 years ago

Here's my Xorg.8.log :

http://pastebin.com/Unwiw2nz

Lekensteyn commented 11 years ago

Ok, that log did not help. You mentioned vgaswitcheroo before, but mind that the card needs to be on for X to pickup the card. You can use vgaswitcheroo by setting PMMethod=switcheroo in bumblebee.conf.

Can you paste your kernel log somewhere (not in this issue please).

HariSeldon85 commented 11 years ago

Know I have to leave. But the radeon card is powered on as you can see 2-3 post above.

In late evening i'll post kernel log and I try with that setting in vgaswitcheroo.

(without bumblee installed, obviously, I I try to enable and use with vgaswitcheroo the card "Echo DDIS > etc..." It cannot works and the system hangs because Xorg don't support rendirng on a card that is'nt attached to display).

klausenbusk commented 11 years ago

You have installed xf86-video-ati right? (yeh i don't think you have forgit it :D)

HariSeldon85 commented 11 years ago

So, in order:

1) Yes, i've xf86-video-ati :)

2) Here's my kernel log after the startup : http://pastebin.com/WHrLcByD

3) radeon is powered-on but not enabled by default.

4) this is my bumblebee.conf file. http://pastebin.com/zXpggGks Where I should add the PMMethod=switcheroo ? I don't think I had to modify the one under nvidia or nouveau section... EDIT: I've created a radeon section, inserted the switcheroo mode, and then rebooted. Now if I run bumblebeed --debug it says : "[INFO]Switching method 'switcheroo' is available and will be used." (Here the complete debug output http://pastebin.com/0DHCHq0N )

but when I try to "optirun glxgears" it gives me the same error:

[ 493.949557] [ERROR]Cannot access secondary GPU - error: XORG No devices detected.

[ 493.949621] [ERROR]Aborting because fallback start is disabled.

Maybe the radeon is not attached at X display 8 ?

Lekensteyn commented 11 years ago

2) I only see one radeon device. Can you post lspci -nn | grep '\[030[02]' 4) That was a to-do item. You can add one section yourself, copy the nouveau section and replace nouveau by radeon.

HariSeldon85 commented 11 years ago

2) Here we are:

[gigi@sirius ~]$ lspci -nn | grep '[030[02]' 00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166](rev 09) 01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI Cape Verde [Radeon HD 7700M Series] [1002:682f]

4) Is exactly what I do :) . Same error (reposted in the last post, I've updated it, check it please ). I think I don't have the bbswitch module...it's not installed by default with the aur packagebuild.

Lekensteyn commented 11 years ago

bbswitch only works for Nvidia cards atm, not AMD ones. I start to believe that the radeon xorg driver does not support your card yet... https://bbs.archlinux.org/viewtopic.php?id=144602

HariSeldon85 commented 11 years ago

Oh crap...

But here: http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/tree/src/radeon_pci_chipset_gen.h

seems there's supporto for pci chip cape verde. scrool down all the file...

HariSeldon85 commented 11 years ago

it seems it's a very experimental support again...:/ If you check here: http://www.x.org/wiki/RadeonFeature/ For the souther island family it says "WIP" or "TODO" in all 3D features :/

If you want I can try to install fglrx module and delete the radeon one. Please consider my pc as a your test machine :)

(I've a full image of root partition, so no problem to step back in case of problems :D )

HariSeldon85 commented 11 years ago

Uh-oh.

Catalyst kernel module in arch, requires the catalyst-utils package. Catalyst-utils package conflicts with "libgl" package. But libgl package is required for bumblebee.

Really stucked.

klausenbusk commented 11 years ago

catalyst-utils provide libgl, so that should not be a problem! :) Just sudo pacman -S catalyst-dkms Then you answear Y of the first question, and then Y again. It should work..

HariSeldon85 commented 11 years ago

Unfortunately no :(

catalyst utils ask me also to remove xf86-video-intel because it uses intel-dri that uses libgl....

I can't remove xf86-video-intel...

klausenbusk commented 11 years ago

You need to made this PKGBUILD for fglrx, https://aur.archlinux.org/packages/nvidia-bumblebee/ (fglrx libgl should be other place than mesa libgl) Think you also need to recompile bumblebee (with CONF_PATH)

./configure CONF_DRIVER=nvidia CONF_DRIVER_MODULE_NVIDIA=nvidia-current \ CONF_LDPATH_NVIDIA=/usr/lib/nvidia-current:/usr/lib32/nvidia-current \ CONF_MODPATH_NVIDIA=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules You just need to modifte it to fglrx, after you have made custom PKGBUILD

Lekensteyn commented 11 years ago

You do not need to recompile, that is what the bumblebee.conf file is used for :)