Mid 2014 Retina MacBook Pro sometimes crashes switching to discrete GPU

I've recently started to get crashes when changing to GPU (I'm using gfxCardStatus and I know which apps/plugins etc use discrete GPU). It only happens sometimes and I can't really examine a pattern. It's not bound to a specific app, specific time, I don't know, it just hangs the system completely sometimes when changing from integrated to discrete GPU, the screen, including the cursor is completely frozen, and the only way out is as system reset by pressing the power button. I've been using my computer for longer than a month and I've started having these crashes only in the last week or so. I don't want to disable automatic graphics switching as it helps me to preserve battery when I travel, and I also play games/use graphics intensive apps like Photoshop, Premiere etc. so I also can't stick to integrated too.

I'm on 10.10.2 (it might have started since I've upgraded to 10.10.2, but I can't really rely on it -- no it's not, after revealing a log file from 10.10.1), my integrated is Intel Iris Pro, and my discrete is NVIDIA GeForce GT 750M 2048 MB, and I'm using the 1920x1200 'scaled' resolution (the one in default options, so it renders at 3840x2400 and downscales), if it helps, and those are the settings that I've been using since the day I've bought my Mac. I'm sure that it's GPU switching related because it exactly happens at the point where GPU switches when starting discrete-GPU-using apps, and the first time it happened, my Mac displayed a message telling me that it shut down due to a graphics related problem. I've just sent the report and it's not displayed after any of the crashes again (if it did, I'd note it somewhere and post it here). I get GPU switches many times a day, and it seems to happen only in 20-30 of the times. Otherwise, my system has no issues, no heating, abnormal fans etc. everything is smooth, including the GPU (unless it crashes).

Why would this be?

Update: I've found the crash logs in Console.app. There are a few files like Kernel_2015-01-27-183045_Cans-MacBook-Pro.gpuRestart with content almost the same. A sample one of them goes like:

Tue Jan 27 18:30:45 2015

Event:               GPU Reset
Data/Time:           Tue Jan 27 18:30:45 2015
Application:         
Path:                
OS Version:          Mac OS X Version 10.10.1 (Build 14B25)
Graphics Hardware:   Intel Iris Pro
Signature:           801

Report Data:

===========================================================================
                         Intel GPU Hang Summary
                              version 1.0.0
===========================================================================

-- Summary of Status for ALL Rings --
MAIN Ring   is idle
MEDIA Ring  is idle
BLT Ring    is idle
VEBOX Ring  is idle
===========================================================================
                     Essential Ring Registers
===========================================================================
[...] //many register dumps
===========================================================================
                            End Hang Analysis
===========================================================================
System Profile:
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x134), Broadcom BCM43xx 1.0 (7.15.124.12.10)
Bluetooth: Version 4.3.1f2 15015, 3 services, 27 devices, 1 incoming serial ports
Thunderbolt Bus: MacBook Pro, Apple Inc., 17.1
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120
USB Device: Internal Memory Card Reader
USB Device: Razer Naga Epic Dock
USB Device: iPhone
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: Apple Internal Keyboard / Trackpad
Serial ATA Device: APPLE SSD SM0512F, 500.28 GB
Model: MacBookPro11,3, BootROM MBP112.0138.B11, 4 processors, Intel Core i7, 2.5 GHz, 16 GB, SMC 2.19f12
Network Service: Wi-Fi, AirPort, en0
Graphics: Intel Iris Pro, Intel Iris Pro, Built-In
Graphics: NVIDIA GeForce GT 750M, NVIDIA GeForce GT 750M, PCIe, 2048 MB

According to what I see on the report, while I'm not an expert, it seems like integrated graphics is hanging when switching to discrete, the cause of them problem seems like integrated graphics, not discrete one. However, it's just my personal assumption after examining the log. I could post the whole crash dump, but I don't think if it will mean anything here.

UPDATE 2: It happened to me again, I was listening to music and music kept playing, indicating that the system itself didn't hang completely at all.


Solution 1:

I can assure you that it's not a hardware problem. It's a software problem that Apple doesn't seem to have fixed with the latest updates. I disabled graphic switching in energy preferences, and my crashes are gone. And I mean severe crashes that happened a lot! Total system freezes, except for the mouse pointer. System freezes mostly mean it's a kernel thing, like a video driver that causes it. Try it, disable the switching and the problem should be gone.

Too bad this means my Mac gets much warmer with the NVideo GPU running. You can also try the gfxCardStatus app to disable the switching and stick to the IRIS Pro 'Integrated' GPU.