Thursday, April 21, 2016

Macbook Pro with Nvidia 320M black screen after sleeping

After a recent update some time around March 2016, a Macbook Pro with Nvidia 320M GPU running Ubuntu 15.10 would stop waking from sleep - the keyboard would light up but the screen remained off.

It is running Linux 4.2.0-35-generic with Nvidia 340.96 binary driver installed.  Trying to modprobe the nvidia module produces the error:

modprobe: ERROR: ../libkmod/libkmod-module.c:816 kmod_module_insert_module() could not find module by name='nvidia_340'
modprobe: ERROR: could not insert 'nvidia_340': Function not implemented
Trying earlier recent kernel & nvidia versions did not yield any success.

The Workaround

Install gcc-4.9 and adjust links to use 4.9 versions for:
/usr/bin/gcc
/usr/bin/gpp 
Ref:
https://devtalk.nvidia.com/default/topic/902950/linux/-solved-faulty-340-9x-drivers-with-kernels-4-2-x-and-4-3-x/