23

I have a really irritating issue where my external monitors randomly goes black for a few seconds and then returns. This happens every other minute, but sometimes i can sit for 30 minutes before it happens again. It affects both my external monitors, usually the one i am currently working on.

This is my setup:

Samsung 27" + Acer 24" monitors -> TESmart Dual Monitor KVM via HDMI -> Thinkpad Pro Dock via HDMI/DisplayPort -> Lenovo Thinkpad T440p Ubuntu 20.04 LTS.

The KVM is also connected to my Windows 10 desktop, but i have never experienced any issues on that, which is why I'm thinking it may be an Ubuntu issue.

What I've tried so far without results:

  1. Changing refresh rates on both screens to 60, 59,94 and 50hz

  2. Made sure all cables are properly connected

  3. Updated to latest firmware on Thinkpad Pro Dock

  4. Switched between XORG and Wayland, and changed refresh rates on both

  5. Enabled / disabled fractional scaling

  6. Updated the system with apt-get update/upgrade

Here is a paste of graphics troubleshooting from https://help.ubuntu.com/community/GraphicsTroubleshootingProcedure :

https://pastebin.com/xWemAjFz

Thank you very much!

edit:

The occurrence rate of this issue seems to be correlated to the battery percentage on my laptop. Maybe this can point somebody to a solution?

Sapomex
  • 341
  • Do you see anything in this thread that you haven't tried? https://askubuntu.com/questions/773529/external-monitor-turns-off-for-several-seconds-every-5-10-minutes – Levente Feb 11 '21 at 20:00
  • Went through the suggested fixes in this post without result. Any more ideas? – Sapomex Mar 06 '21 at 12:38
  • Hey, @Sapomex. I'm facing the same issue on the latest 22.04, got any solutions? – Heisenberg Apr 23 '22 at 12:25

4 Answers4

9

Try to set no_turbo to 1 to "limit the driver to selecting P-State below the turbo frequency range"[1].

% cat /sys/devices/system/cpu/intel_pstate/no_turbo

to see if cpu's turbo is enabled (enabled: 0, disabled:1). To disable it type

echo "1" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo

It worked for me, but I don't know if it is a permanent change, since I changed it just in the current session. Hope it works for you too.

UPDATE: No more random black screen on second monitor (HDMI) since then!

[1] https://www.kernel.org/doc/Documentation/cpu-freq/intel-pstate.txt

  • 3
    It looks like it fixed the issue for me. However, I don't really understand why. Does anyone know why? – dgrat Oct 14 '22 at 14:08
3

Deleting monitors.xml fixed that issue for me. Please create a backup before deleting the file and then try:

rm ~/.config/monitors.xml

Oddly enough logging off after that wasn't enough for me, it required a reboot. I tried the procedure twice to confirm.

A few more details: I had this issue after updating from Ubuntu 20.04 to Ubuntu 22.04. The monitor went black every few seconds, especially when I switched between windows, scrolled down in firefox or watched a video with mpv player. After creating a new user I noticed the issue was fixed, which led me to play around with ~/.local and ~/.config.

  • Just deleting the file wasn't enough to fix the issue for me. Can you please suggest another solution as this thing is really annoying. – Heisenberg Jun 04 '22 at 02:00
  • @Heisenberg To isolate this issue I suggest to create a new user and see if you still face the issue then. In case a new user account solves this for you, I'd say it must be related to configuration in your homedirectory (f.e. .local or .config). If you face this issue after an upgrade, you could try to use a live image to make sure it's not hardware related. – user70408 Jun 10 '22 at 21:11
0

This discussion on github contained a workaround that worked for me

https://github.com/rolandguelle/razer-blade-stealth-linux/issues/18

As for a fix, there is a suggested fix in there but I don't think it works.

Either way, the workaround is to set your output audio device to something other than your internal speaker, either by plugging in headphones/headset to the audio jack, or selecting HDMI/Displayport as the output audio device.

Strangely enough the problem still occurs for me when opening the pulseaudio volume controls, but it seems that the random occurrences while web browsing don't happen anymore.

The cause of the problem seems related to the Intel audio device, and it's affecting the display only because the Intel audio device is interacting with HDMI in some way. When it happens coincides with a video being on a webpage, which occur regularly (ie, even in ads sometimes).

thomasrutter
  • 36,774
0

Make sure your mobile is nowhere near to notebook cables. I had the same problem with two different notebooks, one with Ubuntu 22.04, the other one with Mint 21. Tried all solutions and workarounds, with always only temporary success. Then I noticed, when I sit down to my desk, I eventually put my mobile phone on the HDMI and phone cable running across in front of me. I removed it, and blackening has gone ever since. It is hard to say it for sure, since it has always been a random problem, but it looks quite likely, and rational to me. High energy EM pulses are bad news.

IFaz
  • 1