I have the same problem, and my external screen freezes constantly, sometimes within the same minute, while my laptop is not frozen, if I (e.g.) open a Terminal nothing happens to my external screen, but if I remove the HDMI cable the laptop screen takes over, I can see that the Terminal did indeed open. If I’m in extended view, I can blindly try to move the cursor toward my laptop, and with a bit of movement, the cursor shows up there showing that the laptop display is active.
Because of this, my laptop is completely useless, I don’t like working on it directly I always connect it to an external screen, mouse, and keyboard. I am able to reproduce this with three different monitors. It happens both in extended view and in “external screen only” mode.
I am able to un-freeze it by running
xrandr --output HDMI-1-0 --off --output eDP-1 --auto
xrandr --output eDP-1 --off --output HDMI-1-0 --preferred
Most times I have to run these two commands more than once, but seldom more than five times to get a responsive external screen. On some rare occasions (1/50) I have to remove the HDMI cable and plug it back in to un-freeze the monitor.
My laptop is the MSI Katana 15 B13V, I am running Ubuntu 22.04.
Originally the laptop came with 2x8Gb RAM, I have removed these and replaced them with 2x32Gb RAM. It has a 4070 RTX GPU.
I have installed the
nvidia-driver-535/jammy-updates,jammy-security,jammy,now 535.113.01-0ubuntu0.22.04.3 amd64
If you need more information about my laptop I have attached
lscpu_json.txt (4.0 KB)
lshw_json.txt (54.5 KB)
hwinfo.txt (637.6 KB)