I have an HP Envy 17-3200 with an integrated HD4000 (i915) and an ATI M7850 (radeon). These modules are both included in the kernel via mkinitcpio. I am using systemd but have enabled the rc-local service to run at boot (rc.local is run). This turns off the discrete card via vgaswitcheroo. Given this configuration, the system boots normally into gdm. However, when I attempt to switch graphics cards via:
$ echo DDIS > /sys/kernel/debug/vgaswitcheroo/switch $ sudo systemctl restart gdm.service
The system hangs (I have to force a reset). This happens regardless of whether I echo OFF into vgaswitcheroo. This does not happen if I restart gdm without switching cards.
I know the radeon driver is loaded and associated with my card as:
$ lspci -k ... 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) Subsystem: Hewlett-Packard Company Device 1853 Kernel driver in use: i915 ... 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Device 6827 (rev ff) Kernel driver in use: radeon ...
I'm not even sure of what log to look in to narrow down the problem.
NOTE: This seems to be related to this post. That problem was at boot time and mine was not, though. In addition, no one replied to that post, so I thought I might make a new one.
I am not 100% sure, but I think that is the answer to your question. Not very satisfying, but I have the same problem. It's impossible to get it working.
Maybe Wayland will solve the issue, someday... when we've already bought new laptops... which by that time won't be supported by Wayland. ;-)