Ubuntu 16.04 power off problem

With Ubuntu 16.04 I have got a problem when power off, i.e. the screen becomes black as usual,
but the fan and the power led and the bloc maiusc led still are on.
At this point the only way is to push the power off button and force the off.

This happends randomly (I do not see a scheme) when I have in use the nVidia driver, and no problem
when they are not in use.

I found that other people have similar problem:

see this question reboot - Ubuntu 16.10 won't shutdown - Ask Ubuntu
or kranx’s answer to this question Shutdown does not power off computer - Ask Ubuntu

I tryed different nVidia drivers in ubuntu (propretary and open source).

To me is not clear if this a problem of the Ubuntu kernel or is a problem of nVidia driver.