Screen/USB-C switches off for a second randomly and frequently

This is a follow-up to Ubuntu 22.04 nvidia-driver-515 not working/starting and USB-C monitor not detected with nvidia-driver on Ubuntu - the process of making Ubuntu 22.04 on a Lenovo X1 Extreme laptop work with a Dell USB-C monitor (at home) and a Lenovo DisplayLink dock (at work).

After getting the DisplayLink dock working, I came home and found the USB-C monitor going black every few minutes, for a second or two. It was irritating, but not wanting to break the setup that worked with the DisplayLink at work, I left it like that for a while. Then I went on a trip where I worked only on the laptop display…and the same behavior continued there. So I googled the Lenovo forums for a solution, and ended up trying to use sudo prime-select intel - this solved the problem of the screen going black, so for a while I was happy.

But when I connected the laptop via HDMI to a hotel room TV, there was no signal. Not a big deal at the moment, so I left it.

Then I came home and connected the USB-C monitor, and the same result as the HDMI-connection: No signal

Okay, now it’s a problem I can’t live with. So I tried sudo prime-select on-demand and rebooted. Now the USB-C monitor is working…but the random black screen is back :-(

I’m going to the office tomorrow, will see how the DisplayLink fares then, with the current setup…

But my question now - is there a fix for the random black screen?

Back in the office yesterday, the DisplayLink was working fine. And interestingly, while connected there, not a single instance of black screen.