拔掉 HDMI 不会触发显示更改
拔掉 HDMI 线之后，笔记本仍然认为外接显示器还连接着，窗口不会移动到笔记本屏幕来，无法操作。(内核 Bug 202579)
拔掉 HDMI 线之后，手动运行
xrandr 命令即可。也可以创建一个 Cron 周期任务，每分钟执行
* * * * * /usr/bin/xrandr &> /dev/null
Laptop HDMI output is limited to 4K 30Hz
When connecting some laptop to external 4K (UHD) display, the refresh rate is limited to 30Hz.
Most GPU, including Intel Core GPU, supports 4K@60Hz, but not the HDMI controller. Most laptops and USB Type-C to HDMI adapters still provides HDMI 1.4 or older, which only support 4K@30Hz output. You need at least HDMI 2.0 to support 4K@60Hz output. If it is not available on your laptop, try to use USB Type-C (Thunderbolt) or (mini) DisplayPort, which should support 4K@60Hz. If you have to buy an adapter, make sure it is HDMI 2.0 adaptor, or DisplayPort adapter.
In some older 4K monitor, the HDMI port only support HDMI 1.4. Some have two HDMI ports, one is HDMI 1.4, the other is HDMI 2.0. You can try each HDMI port and if no success, switch to DisplayPort, which is always provided by 4K monitors.
If you connect to two or more 4K monitors, then GPU might become the limitation. Intel Core GPU support maximum one 4K@60Hz output. If you need multiple 4K@60Hz outputs, you need a more powerful GPU.