can't detect 2nd monitor on ubuntu

I have installed ubuntu 16.04 and win10 on my computer. Just now , the cuda(both tensorflow code and nvidia-smi) told me that connecting with nvidia driver failed. And the 2nd monitor worked all right. after that, I reboot the ubuntu, the problems still occured. And then ,I reinstalled the nvidia-driver (390.67). The cuda works now but it cannot detect the 2nd monitor. The hardware is all right because all of them works properly on win10. And now, I don't know how to solve it.