I am running Ubuntu 22.04 on Lenovo Think Pad. It was detecting till yesterday but after I connected a Windows laptop (another laptop) to the monitor, my laptop stopped detecting the monitor. I tried various threads but it doesn't work. I am using HDMI to mini display port connection.
Output for lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)