Can't set laptop screen as primary monitor when external monitor is plugged in


I have an MSI GS63VR laptop running Linux Mint 18 with a GTX1060 and I have some issues when using an external monitor (HDMI output, can’t try the other ones). I’m using the NVIDIA driver (v367.57) installed through the Driver Manager.

The first problem is that I can’t set the laptop screen as the primary one. Well, I can set it but it has no effect, the menu bar is always displayed on the external screen. I tried with both xrandr and the Display Settings with the same result.

The second one is that if I try to maximize a window (full screen, left or right) it always goes to the external monitor, no matter what.

I don’t know why this is happening but I know it can work because it started working as expected a few days ago (don’t ask me why) but after the last driver update everything went wrong again…

Does someone have any idea on how to fix this?
nvidia-bug-report.log.gz (117 KB)
xorg.conf.gz (270 Bytes)