My laptop would crash when it used battery power, and I was able to trace the cause of the crashes to igdkmd64.sys. In addition to the crashes, sometimes the screen would have garbage output for a second or 2. The crashes and graphics errors happened whenever I used battery power, and I tend to only use the laptop for web browsing with Google Chrome. Disabling the Intel Graphics driver in device manager caused a thin black rectangle at the bottom of the screen, and would not allow the NVIDIA driver to detect the NVIDIA GeForce GTX 980M. I was able to fix the problem by enabling the Intel Graphics driver, and using the NVIDIA settings to require everything to use the NVIDIA GeForce GTX 980M. I have attached a System Information export file, in hope that it may help fix the problem in the driver. I also added Minidump files.
The driver version was from some time in 2015, and I just noticed(after submitting this report) that there was a driver released in 2017, so I tried to update, and got the error: Error: The driver being installed is not validated for this computer. Obtain the appropriate driver from the computer's manufacturer. Setup will exit.
I thus completely uninstalled the driver and installed the latest version. I will be testing the Intel Graphics on battery as often as I can tomorrow to see if the problem has been fixed in the latest version.
Update: I forced it to use Intel Graphics, not NVIDIA, and though it has not yet crashed, the graphics messed up for less than a second, at about 82% battery, 2 hours, 08 minutes estimated left. Thus there is either a hardware problem, which the driver should have detected and avoided triggering, or there is something wrong with the driver. I will continue testing to see if it still crashes.