I had a similar problem as you guys are experiencing. I do not have a GT940mx so I do not know if my work around for my graphics card GTX1060 would work for you. But try to update your nvidia driver and see if it helps.
I am running a Ubuntu 16.04.
I tried upgrading the kernel which didn’t help. In the process ended up with 4.15.13-041513-generic. I honestly do not know if it is a combination of the kernel update or not. But I will mention the step as it seams to help others. I am new to the Linux world and I am using Ubuntu as like the debian flavor. I found uuku to be an easy tool jump from kernel to kernel. To find out which kernel type the following in terminal.
~$ uname -r
4.15.13-041513-generic
If you like to change your kernel google how to install the uuku tool.
I also installed laptop-mode-tools and used lmt-config-gui to test if that would help. lmt-config-gui must be run as root. I tried tweaking with it but I do not think it helps much as long as you are running an old nvida driver or the nouveau driver. Basically ended up just using the hibernate and sleep button to test if the driver update fixed my problem. But like with the kernel I mention it as it was part of my way to finding the solution.
To update my driver I used the guide found here:
I had a little tricky time finding which nvidia unix driver matched mine but what worked for me on this page:
Was to choose the platform for me which is Linux x64 click on the 3xx.xx longest (like playing it safe) and under supported products search for my nvdia card.
Since I like to play it safe I chose the 390. As the blog in how to install latest nvidia drivers in linux says, start by deleting your old drivers:
~$ sudo apt-get purge nvidia*
Setup your graphical drivers PPA and update.
~$ sudo add-apt-repository ppa:graphics-drivers
~$ sudo apt-get update
Install the driver you chose and activate it:
~$ sudo apt-get install nvidia-390
Mine was the 390 but yours may be different.
Reboot your computer. And remember to check if it was activated.
~$ lsmod | grep nvidia
If it doesn’t show any info then maybe something went wrong. Check if nouveau is showing.
I must also mentioned the Software and Update center under thirdparty became my friend after running the graphical drivers PPA.
Hope this helps.