Second monitor does not work after disabling? 18.04

I hooked up a second screen to my computer today. It worked at first. Since I don’t need it the whole time, I switched it off and set the screen display settings to only use my HDMI monitor. Now I can’t use the DVI one anymore at all as long as the HDMI one is connected. To be clear, I can see both in the settings and adjust settings, and when I click “apply”, the screen quickly wakes up. But it shows no image, and everything reverts back. It does show a picture before login. What can I do about this? I’m on Ubuntu 18.04.