I use a MacbookPro 6,2, with dual graphics, intel and nvidia 330m. Booting in EFI mode make nvidia the default card. In order to switch to intel I use vga_switchero, with the following before launching Xorg: if [ -e /sys/module/i915 ] && \ [ -z "$(grep 'IGD:+:' /sys/kernel/debug/vgaswitcheroo/switch)" ]; then echo IGD > /sys/kernel/debug/vgaswitcheroo/switch echo 0 > /sys/class/vtconsole/vtcon1/bind else return 0 fi [ -e /sys/module/i915 ] && rmmod i915 [ -e /sys/module/i915 ] || modprobe i915 Both nouveau and i915 are compiled as modules. I got this working without any issue, including suspend & resume. Between 3.12.0 and 3.13-rc1 some change break this and i915 cannot be rmmod'ed anymore, as can be seen below (entire dmesg @ http://bpaste.net/raw/339596/, 3.12.20 dmesg @ http://bpaste.net/raw/340642/). I could not bisect it beyond that. It looks quite (if not directly) related to https://bugzilla.kernel.org/show_bug.cgi?id=65761 and https://bugzilla.kernel.org/show_bug.cgi?id=73291 If you need any other details from the laptop, please let me know. [ 41.540431] [drm] Memory usable by graphics device = 2048M [ 41.686143] i915 0000:00:02.0: irq 46 for MSI/MSI-X [ 41.686167] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 41.686170] [drm] Driver supports precise vblank timestamp query. [ 41.686185] i915 0000:00:02.0: Invalid ROM contents [ 41.686188] [drm] failed to find VBIOS tables [ 41.686336] vga_switcheroo: enabled [ 41.686479] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none [ 41.686485] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=none:owns=none [ 41.761063] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2 [ 41.769341] i915 0000:00:02.0: No connectors reported connected with modes [ 41.769348] [drm] Cannot find any crtc or sizes - going 1024x768 [ 41.773036] i915 0000:00:02.0: fb1: inteldrmfb frame buffer device [ 41.774614] ACPI: Video Device [IGPU] (multi-head: yes rom: no post: no) [ 41.774730] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input18 [ 41.775012] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 1 [ 41.778296] hda-intel 0000:01:00.1: Disabling via VGA-switcheroo [ 42.061380] fbcon: Remapping primary device, fb1, to tty 1-63 [ 42.061408] VGA switcheroo: switched nouveau off [ 43.311696] Console: switching to colour dummy device 80x25 [ 43.334821] ------------[ cut here ]------------ [ 43.334837] WARNING: CPU: 1 PID: 3890 at fs/sysfs/group.c:214 sysfs_remove_group+0x4b/0x81() [ 43.334843] sysfs group ffffffff81e75210 not found for kobject 'i2c-19' [ 43.334846] Modules linked in: i915(-) ccm nouveau brcmsmac brcmutil mac80211 ttm drm_kms_helper mac_hid [ 43.334869] CPU: 1 PID: 3890 Comm: rmmod Not tainted 3.13.0-rc1-mbp-acpidebug #12 [ 43.334874] Hardware name: Apple Inc. MacBookPro6,2/Mac-F22586C8, BIOS MBP61.88Z.0057.B0F.1112091028 12/09/11 [ 43.334878] 0000000000000000 ffff88023bdc7a90 ffffffff817763b1 ffff88023bdc7ad8 [ 43.334886] ffff88023bdc7ac8 ffffffff81091227 ffffffff811c77fd 0000000000000000 [ 43.334894] ffffffff81e75210 ffff8800aa9f2410 0000000000000000 ffff88023bdc7b28 [ 43.334902] Call Trace: [ 43.334913] [<ffffffff817763b1>] dump_stack+0x4d/0x66 [ 43.334925] [<ffffffff81091227>] warn_slowpath_common+0x7a/0x93 [ 43.334932] [<ffffffff811c77fd>] ? sysfs_remove_group+0x4b/0x81 [ 43.334940] [<ffffffff81091287>] warn_slowpath_fmt+0x47/0x49 [ 43.334948] [<ffffffff8177a9ef>] ? mutex_unlock+0x11/0x13 [ 43.334955] [<ffffffff811c68f7>] ? sysfs_get_dirent_ns+0x47/0x4f [ 43.334963] [<ffffffff811c77fd>] sysfs_remove_group+0x4b/0x81 [ 43.334974] [<ffffffff8143b51f>] dpm_sysfs_remove+0x37/0x3a [ 43.334984] [<ffffffff8143416e>] device_del+0x3e/0x173 [ 43.334991] [<ffffffff814342b0>] device_unregister+0xd/0x18 [ 43.334999] [<ffffffff8143431c>] device_destroy+0x34/0x39 [ 43.335009] [<ffffffff8150b88d>] i2cdev_detach_adapter+0x42/0x47 [ 43.335018] [<ffffffff8150bc7f>] i2cdev_notifier_call+0x1a/0x29 [ 43.335028] [<ffffffff8177fcd6>] notifier_call_chain+0x37/0x59 [ 43.335039] [<ffffffff810af52c>] __blocking_notifier_call_chain+0x41/0x5a [ 43.335047] [<ffffffff810af554>] blocking_notifier_call_chain+0xf/0x11 [ 43.335055] [<ffffffff81434166>] device_del+0x36/0x173 [ 43.335062] [<ffffffff814342b0>] device_unregister+0xd/0x18 [ 43.335071] [<ffffffff8150a8dc>] i2c_del_adapter+0x142/0x18b [ 43.335136] [<ffffffffa0290ac0>] intel_dp_encoder_destroy+0x22/0x6a [i915] [ 43.335172] [<ffffffff81424d96>] drm_mode_config_cleanup+0x39/0x201 [ 43.335234] [<ffffffffa0287bdf>] intel_modeset_cleanup+0xdb/0xec [i915] [ 43.335288] [<ffffffffa02554d1>] i915_driver_unload+0xc6/0x2b0 [i915] [ 43.335316] [<ffffffff8141f5da>] drm_dev_unregister+0x26/0xa2 [ 43.335345] [<ffffffff8141f6a3>] drm_put_dev+0x4d/0x58 [ 43.335391] [<ffffffffa02524a8>] i915_pci_remove+0x18/0x1a [i915] [ 43.335422] [<ffffffff8137d0b3>] pci_device_remove+0x40/0x8a [ 43.335435] [<ffffffff81436b6d>] __device_release_driver+0x84/0xda [ 43.335443] [<ffffffff8143716f>] driver_detach+0x85/0xab [ 43.335451] [<ffffffff814368ad>] bus_remove_driver+0x64/0x81 [ 43.335459] [<ffffffff814376a1>] driver_unregister+0x41/0x44 [ 43.335467] [<ffffffff8137c536>] pci_unregister_driver+0x17/0x64 [ 43.335476] [<ffffffff814215b2>] drm_pci_exit+0x3f/0x78 [ 43.335526] [<ffffffffa02b4e4e>] i915_exit+0x17/0x19 [i915] [ 43.335537] [<ffffffff810e2b38>] SyS_delete_module+0x153/0x1d9 [ 43.335547] [<ffffffff8178304f>] tracesys+0xe1/0xe6 [ 43.335553] ---[ end trace d240e773e7b2bbc5 ]--- [ 43.335664] ------------[ cut here ]------------ [ 43.335675] WARNING: CPU: 1 PID: 3890 at fs/sysfs/group.c:214 sysfs_remove_group+0x4b/0x81() [ 43.335677] sysfs group ffffffff81e75210 not found for kobject 'i2c-19' [ 43.335688] Modules linked in: i915(-) ccm nouveau brcmsmac brcmutil mac80211 ttm drm_kms_helper mac_hid [ 43.335696] CPU: 1 PID: 3890 Comm: rmmod Tainted: G W 3.13.0-rc1-mbp-acpidebug #12 [ 43.335701] Hardware name: Apple Inc. MacBookPro6,2/Mac-F22586C8, BIOS MBP61.88Z.0057.B0F.1112091028 12/09/11 [ 43.335705] 0000000000000000 ffff88023bdc7b98 ffffffff817763b1 ffff88023bdc7be0 [ 43.335746] ffff88023bdc7bd0 [ 43.335748] ffffffff81091227 [ 43.335749] ffffffff811c77fd [ 43.335750] 0000000000000000 [ 43.335752] ffffffff81e75210 [ 43.335753] ffff8800a76b3960 [ 43.335754] ffff8800a76b3c30 [ 43.335759] ffff88023bdc7c30 [ 43.335762] Call Trace: [ 43.335770] [<ffffffff817763b1>] dump_stack+0x4d/0x66 [ 43.335779] [<ffffffff81091227>] warn_slowpath_common+0x7a/0x93 [ 43.335786] [<ffffffff811c77fd>] ? sysfs_remove_group+0x4b/0x81 [ 43.335793] [<ffffffff81091287>] warn_slowpath_fmt+0x47/0x49 [ 43.335802] [<ffffffff8177a9ef>] ? mutex_unlock+0x11/0x13 [ 43.335810] [<ffffffff811c68f7>] ? sysfs_get_dirent_ns+0x47/0x4f [ 43.335819] [<ffffffff811c77fd>] sysfs_remove_group+0x4b/0x81 [ 43.335827] [<ffffffff8143b51f>] dpm_sysfs_remove+0x37/0x3a [ 43.335858] [<ffffffff8143416e>] device_del+0x3e/0x173 [ 43.335863] [<ffffffff814342b0>] device_unregister+0xd/0x18 [ 43.335869] [<ffffffff8150a8dc>] i2c_del_adapter+0x142/0x18b [ 43.335925] [<ffffffffa0290ac0>] intel_dp_encoder_destroy+0x22/0x6a [i915] [ 43.335934] [<ffffffff81424d96>] drm_mode_config_cleanup+0x39/0x201 [ 43.335987] [<ffffffffa0287bdf>] intel_modeset_cleanup+0xdb/0xec [i915] [ 43.336041] [<ffffffffa02554d1>] i915_driver_unload+0xc6/0x2b0 [i915] [ 43.336047] [<ffffffff8141f5da>] drm_dev_unregister+0x26/0xa2 [ 43.336051] [<ffffffff8141f6a3>] drm_put_dev+0x4d/0x58 [ 43.336077] [<ffffffffa02524a8>] i915_pci_remove+0x18/0x1a [i915] [ 43.336087] [<ffffffff8137d0b3>] pci_device_remove+0x40/0x8a [ 43.336096] [<ffffffff81436b6d>] __device_release_driver+0x84/0xda [ 43.336118] [<ffffffff8143716f>] driver_detach+0x85/0xab [ 43.336126] [<ffffffff814368ad>] bus_remove_driver+0x64/0x81 [ 43.336134] [<ffffffff814376a1>] driver_unregister+0x41/0x44 [ 43.336163] [<ffffffff8137c536>] pci_unregister_driver+0x17/0x64 [ 43.336168] [<ffffffff814215b2>] drm_pci_exit+0x3f/0x78 [ 43.336219] [<ffffffffa02b4e4e>] i915_exit+0x17/0x19 [i915] [ 43.336228] [<ffffffff810e2b38>] SyS_delete_module+0x153/0x1d9 [ 43.336237] [<ffffffff8178304f>] tracesys+0xe1/0xe6 [ 43.336255] ---[ end trace d240e773e7b2bbc6 ]--- [ 43.336332] vga_switcheroo: disabled [ 43.341760] [drm] Module unloaded [ 43.361947] [drm] Memory usable by graphics device = 2048M [ 43.406170] i915 0000:00:02.0: irq 46 for MSI/MSI-X [ 43.406195] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 43.406200] [drm] Driver supports precise vblank timestamp query. [ 43.406217] i915 0000:00:02.0: Invalid ROM contents [ 43.406222] [drm] failed to find VBIOS tables [ 43.406428] vga_switcheroo: enabled [ 43.497234] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2 [ 43.637744] Console: switching to colour frame buffer device 210x65 [ 43.648894] i915 0000:00:02.0: fb1: inteldrmfb frame buffer device [ 43.651044] ACPI: Video Device [IGPU] (multi-head: yes rom: no post: no) [ 43.651161] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input19 [ 43.651456] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 1
Have you tried latest kernels? CC Imre, did we fix something related to i2c cleanup lately? Does the dmesg look familiar to you?
Up until 3.14.4, with exactly the same results.
(In reply to Jani Nikula from comment #1) > Have you tried latest kernels? > > CC Imre, did we fix something related to i2c cleanup lately? Does the dmesg > look familiar to you? Yes, by a quick look it does look like the WARN fixed by commit 4932e2c3c716067f3580e1a9687bed9d751549e3 Author: Imre Deak <imre.deak@intel.com> Date: Tue Feb 11 17:12:48 2014 +0200 drm/i915: add unregister callback to connector and commit 80f65de3c9b8101c1613fa82df500ba6a099a11c author: Imre Deak <imre.deak@intel.com> Date: Tue Feb 11 17:12:49 2014 +0200 drm/i915: dp: fix order of dp aux i2c device cleanup The fix first appeared only in v3.15-rc1 and not sent to -stable (and so not part of 3.14.4). They apply on 3.14.4 so you could try if they fix the problem.
OK. I will try it tonight and report back.
Yes!! Those two commits on top of 3.14.5 work beautifully http://bpaste.net/raw/341855/ I hope you push them to 3.13.y and 3.14.y :)))
And thanks a lot ;)
(In reply to Javier Marcet from comment #5) > Yes!! > > Those two commits on top of 3.14.5 work beautifully > http://bpaste.net/raw/341855/ > > I hope you push them to 3.13.y and 3.14.y :))) Cool, thanks to Jani for the accurate triaging. It's also up to him and Daniel Vetter if the fix is -stable material.
(In reply to Imre Deak from comment #7) > Cool, thanks to Jani for the accurate triaging. It's also up to him and > Daniel Vetter if the fix is -stable material. Triaging... more like intuitive backtrace pattern matching! ;) I'll ask the stable team to pick the commits up for 3.13.y and 3.14.y. Javier, please confirm that the latest 3.12.y works without the patches.
Yes, 3.12.y works fine without the patches. I have been using it for several months already on that laptop.
(In reply to Jani Nikula from comment #8) > I'll ask the stable team to pick the commits up for 3.13.y and 3.14.y. FYI, I only requested for 3.14 stable backport because the commits don't apply cleanly to 3.13 and AFAICT that's no longer supported upstream anyway. It's up to the distros using 3.13 to backport there. Javier, thanks for the report and testing.