You are not logged in.
Hello,
As the title says, I get a black screen and what seems to be a system crash when I try to plug any monitor on the HDMI port of my laptop when it’s turned on. I searched several times on the internet to see if this problem was known, but either I didn’t search with the right keywords, or I’m searching for something that has not been identified at the moment, the fact remains that I didn’t find any relevant solutions or problems.
I, then, did several tests to try to determine in which cases this problem exactly happens and if I could identify the source of the it. The blank black screen, as the system crashes, affects both monitors.
Here’s a short but probably relevant list of information about my laptop and Linux installation:
OS: Arch Linux x86_64
Host: VivoBook 12_ASUS Laptop E203MAS_E203MA 1.0
Kernel: 5.12.7-arch1-1
Resolution: 1366x768
DE: Plasma 5.21.5
WM: KWin
CPU: Intel Pentium Silver N5000 (4) @ 2.700GHz
GPU: Intel UHD Graphics 605
________________________________
* I don’t have any of these problems on the same machine with Windows 10.
* I encounter them both on X.org and Wayland.
* As I can’t switch to a new tty and can’t control anything, either with KdeConnect or ssh, and as when the screens becomes black, all audio streams (on speaker or jack line out) are stopped, I think we can consider that it’s not only a X.org/Wayland crash but a crash of almost the whole system.
* However, when my phone is connected with Bluetooth to my laptop, the system/bluez/KDE-with-bluedevil automatically routes the phone’s audio streams to the laptop’s audio output. This way, I found by accident that when the system crashes, the audio streams from my phone are still read on the laptop audio output used before the crash (e.g. plugging in headphones on the jack port stops the sound of the speakers but doesn’t switch to the headphones, and unplugging it restore the sound on speakers).
Maybe things are directly routed from BT device to the laptop’s BT chip to the laptop’sound chip then to the laptop’speakers/jack line, so nothing pass through the system and thus stops when it crashes…
* Going into the Kde’s display settings (or using another X/RandR configuration tool like LxRandR or aRandR) and disabling the external screen to enable it again is the equivalent of hot-plugging the screen,
* There is no problems when unplugging the monitor: the entire display switches to the laptop builtin monitor and I can continue using it as usual, without rebooting,
* It crashes too when I plug the monitor after the `Starting·Finished Load/Save Screen Backlight Brightness of backlight:intel_backlight` log line during boot is shown, BUT I can un·plug the screen in SDDM as many times I want, and SDDM will just choose the smallest resolution between the monitors and use it to render the display on both monitor (e.g. a 1920×1080 monitor will display at my laptop’s 1366×768 resolution, and a 1280×720 monitor will make my laptop’s render at the monitor’s resolution)
* I thought it was kscreen’s fault and that disabling it would solve things but in fact it didn’t changed a lot of things, and even made some things worse:
— I still have to plug the monitor before the boot or in SDDM,
— but when unplugging the external monitor, the screen layout’s auto-config is not made anymore: the display remains the same as with the external monitor plugged in, so windows and cursor still display on this second screen and I can move them… blindly :D
— If I plug the monitor in SDDM when kscreen is disabled, the external monitor is not automatically enabled.
— Next, if I enable kscreen again, it enables automatically the second monitor then the system crashes. However, when kscreen is disabled but I plug in the monitor before the boot, both monitor will display the same things (with the resolution of both screens being the one of the smaller screen, as already said in the upper brackets), and enabling kscreen will automatically and properly set the resolution and placement of both screens, according to the previously chosen settings, without any crash.
So the thing is that I just need to plug the screen at boot to not encounter any problems, but it is really not convenient for a laptop, and the problem really seems to be with this activation of a new monitor.
I really don’t know what logs of which programs or tool I can look at to investigate deeper, so I surely need the help from the Arch community to solve this.
Have a nice day,
Last edited by Aznörth (2022-02-16 13:54:41)
Offline
Hi,
I searched for some logs.
Starting dmesg -w -k -H > output_file to get logs of the activation writes nothing in the file, and journalctl /usr/lib/kf5/kscreen_backend_launcher outputs nothing, as well as journalctl, which output nothing relevant about the «crash» itself. Nevertheless, as the only way to power off my computer is forcing it to turn off with a long press on the power button, I observe in journalctl a Power key pressed line, followed by some logs after the "crash", about modules and services extinction. However, if I just press shortly the Power button, the machine never turns off, even after waiting. So the crash seems to not be total.
X.org lines about the activation of HDMI1 seems irrelevant too, as it’s just informative, and nothing is output after that:
[ 815.760] (II) intel(0): switch to mode 1280x720@60.0 on HDMI1 using pipe 1, position (0, 0), rotation normal, reflection none
I don’t have any problems when I enable my internal monitor, and the problem is the same with other DE like i3 or LxQt.
Would there be other relevant logs I could search in ?
EDIT: Also, I tried disabling TLP systemd service, as it can sometimes create mayhem, but nothing changed. I enabled it again.
EDIT2: Is there a way in BBCode to use a monospace font like the `` in markdown? It seems that the font=monospace tag doesn’t work on ArchForums, and the code tag creates a block of text separate of the rest of the line.
Last edited by Aznörth (2021-11-14 11:12:26)
Offline
Hi! Happy to finally find a report of an issue I have been looking for an answer without success. It turns out I found this thread when I was looking for another thing, so lol.
I have the same issue as you, we have different laptops but our CPU and GPU are the same, and I'm using Arch with Plasma 5,23, but may have been dragging this situation probably since one or two versions ago. My problem seems to be a little more critical since I can't recover when I unplug the external monitor (In my case a TV) through HDMI, my only solution is forcing a reboot. I have tried executing some reboot, suspend, lock and unlock commands using KDE Connect, unsuccesfully. Could you please share the commands you use to re-enable kscreen (if you use the command line)? to check if it works using KDE Connect.
I will try to check if my scenario is similar to yours in other situations. Until now I could only partially confirm it is a Plasma thing because it didn't happen during a session with a WM (I guess the screen sharing there isn't automatic so I may be wrong).
Have a nice day!
Offline
Hallo, i have the same problem regardless of the DE.
Acer Swift 1
Intel Pentium N5030
UHD Graphics 605
In addition, my screen flickers and shifts after a restart. When I suspend the laptop and wake it up again, the flickering and shifting disappear.
When I connect a second monitor, both screens go black and nothing happens anymore, even if I unplug the hdmi cable.
This problem only exists with kernel newer than 5.4.*. with 5.4.* or older there are no problems! no screen flickering after the start, or black screen when plugging in a second monitor, everything works smoothly.
Offline
Wow, answers! I started to think this thread would not have any !
I’m glad some others encounter this exact problem, and that it happens on laptops with the same integrated graphics chip!
My problem seems to be a little more critical since I can't recover when I unplug the external monitor (In my case a TV) through HDMI, my only solution is forcing a reboot. I have tried executing some reboot, suspend, lock and unlock commands using KDE Connect, unsuccesfully. Could you please share the commands you use to re-enable kscreen (if you use the command line)? to check if it works using KDE Connect.
Maybe I wasn’t clear. When my machine crashes, I cannot recover it if I unplug the cable: I need to force a shutdown with a long-press on the power button. However, if the double-screen display is correctly set (i.e. with the external monitor plugged at boot) I can, indeed, unplug and have the display automatically re-set without a crash. In sober desktop environments such as i3, which doesn’t have something like kscreen, I can see that I can manually disable a screen without worry, so it’s really the activation that causes this mess.
I’ve tried to execute some of the same commands you sent with KdeConnect, and got the same result. However, for the de·activation of kscreen, I just went in Kde’ System Settings > Start and stop > Background services > un·tick Kscreen 2 (these settings titles are translated from french, it may be different in English)
I identified the problem is not DE-dependant, as Wimboson said. I tried with Kde (Wayland and Xorg), LxQt, GNOME (wayland +x.org), & i3.
In addition, my screen flickers and shifts after a restart. When I suspend the laptop and wake it up again, the flickering and shifting disappear.
I don’t seem to have this problem (It makes me recall that picom is doing this on some elements of my i3 windows and polybar, but it’s a totally different problem !). What do you mean by «a restart» ? A reboot of your machine?
When I connect a second monitor, both screens go black and nothing happens anymore, even if I unplug the hdmi cable.
Yep, that’s it.
This problem only exists with kernel newer than 5.4.*. with 5.4.* or older there are no problems! no screen flickering after the start, or black screen when plugging in a second monitor, everything works smoothly.
So this problem doesn’t happen anymore when you use an old kernel ? As far as I can remember, the problem is happening since I installed Arch on my laptop (about a year ago) and I don’t really want to risk myself in downgrading the Linux Kernel. It would be a wise idea to take a look at a complete changelog of the first 5.4.x version, to see if it contains some interesting lines linked to this.
Some weeks ago, I successfully managed to plug a monitor and enable a new display with xrandr --auto. It didn’t crashed !
But it happened only one. single. time. Each subsequent attempts have (successfully) failed.
Offline
Hey, sorry for the late reply.
What do you mean by «a restart» ? A reboot of your machine?
Yes, i meant reboot.
So this problem doesn’t happen anymore when you use an old kernel ?
Yes, in my case the problem is only present with kernel >5.4.x.
After further searching I came across this:
https://www.linuxquestions.org/question … 175703775/
Unfortunately, my PC mainboard burned down two days ago and destroyed my graphics card at the same time
I'm now dependent on the laptop and would not like to experiment until I have a replacement for it.
When I have a second PC again, I will continue testing.
Offline
OK forget what I said.
I took a BTRFS snapshot and then loaded kernel 5.15.
Created /etc/modprobe.d/intel-hdmi.conf with content:
options snd_hda_codec_hdmi enable_acomp = off enable_silent_stream = off
Reboot.
Seems to have solved the problem.
Since I do not use audio via HDMI, I cannot say whether this will have negative effects and if this solution is a long-term solution.
Offline
Hi again,
Don’t worry for your answer time, this thread is six-months-old, I can wait some weeks more !
After further searching I came across this:
This is an interesting thread you have here ! I searched things about this silent_stream thing as I can’t get sound to work on HDMI outputs, and have an snd_hda_codec_hdmi hdaudioC0D2: Monitor plugged-in, Failed to power up codec ret=[-13] error at boot. This error is broached here https://bbs.archlinux.org/viewtopic.php?id=261225 where it talks about the snd_hda_codec_hdmi.enable_silent_stream=0 boot parameter. I thought it was a totally different problems, but it seemed to be related with our current problem !
I tried to set this parameter but it makes a warn during boot:snd_hda_intel: unknown parameter 'enable_silent_stream' ignored
I’ll try to do what you did.
Offline
Aaaand… it solved nothing for me.
Offline
I didn't have the time to address this until today.
Doing a quick search I found this post https://bbs.archlinux.org/viewtopic.php?id=257710 about a very similar problem (or the same). In commen #8 there is a solution that I tried, and it's very similar to the one that was mentioned here. It turned out well and solved the problem for me, also, audio works well in my external monitor so I guess everything is back to normal !
What I did:
Created /etc/modprobe.d/snd_hda.conf with the content:
options snd_hda_codec_hdmi enable_silent_stream=N
Rebooted, started session and plugged external TV, everything is ok now!
I hope it works for you too!
Offline
Hi,
I said that it didn’t solve anything, but I think that my machine required a full extinction rather than a simple reboot.
It finally works thanks to the options snd_hda_codec_hdmi enable_acomp = off enable_silent_stream = off parameter in /etc/modprobe.d/intel-hdmi.conf that @Wimboson wrote here, and I can plug and enable any monitor since a month, now.
Thanks, all!
Offline