I have notebook Dell G5 with hybrid intell + nvidia RTX 2060 GPU and I’m unsing the build-in display coupled with external monitor connected over HDMI. Recently the OS stopped recognizing when I unplug the external monitor. Is there a way to force re-detection of displays? The only way of turning off that external monitor I found is to open the Display Configuration tool and untick the “enable” which is quite a hassle.
I’ve tried: xrandr --auto xrandr --output eDP-1 --mode 1920x1080
but none of it works.
FYI: tried fresh installation of manjaro-gnome, updated to latest packages and have the same problem, so this looks like some kind of bug with the drivers.
In the future, when providing code/output, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text so that the output looks like this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
instead of like this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.`
(as that makes both our lives much easier)
No need to do anything right now as I’m an editor here on this site and have fixed it for you already. However, in the future I might not see your post so review my edits by pushing the orange pencil above the post I just fixed.
xset is your friend.
xset dpms force off
and that will turn off all monitors.
When you click the mouse, only the connected one comes back.
1 & 2. Noted.
3. Thanks for the tip, but it does nothing. I mean, it turns off the monitor and on click it turns back on, but the system still thinks the external display is connected.
As I’ve written in my previous post. I’ve to install fresh manjaro (manjaro-gnome-20.2.1-210103-linux59.iso) on new partition. And until I’ve updated the OS it seemed to work fine. Then after updating the OS, the same problem reappeared. Given that it happens on KDE as well as on Gnome, I’d say there’s some problem in either nvidia hybrid drivers or the X server - I’m no expert these areas unfortunately.
Is it possible to downgrade the Nvidia drivers perhaps?
No problem I went to bed after sending my reply too
Many thanks for the advice with the xset dpms force off. I’ve played with the it some more and it eventually works. By eventually I mean sometimes, when I unplug the hdmi and run it the screen goes black and on mouse click it wakes up and all the windows will move to the eDP. But other times, when I run the xset the screen goes black for 1-2s and comes back on its own and I still have 2 monitors. However, running the xset couple more times eventually sets it back to eDP only, so I at least have some workaround solution to the problem.
Btw. the display manager still thinks I have 2 monitors plugged in even when the xset recognizes the HDMI is unplugged. But xrandr correctly lists only eDP.
Here’s the output of inxi --admin --verbosity=7 --filter --no-host --width
Also I’ve found another thing I have a USB-C port replicator which has HDMI and that used to work too and now it does not even recognize the monitor is plugged in. But that’s not that big of an issue since I don’t use it any more as I’m using directly the HDMI on the ntb itself (Until 450 driver the HDMI output didn’t work).
ah, I’ve tried the 5.9 kernel when I was playing around trying to see what would fix that issue and forgot to revert back the 5.4. Let me revert and try again.
So, here’s the update. With kernel 5.4, xset didn’t work at all. With 5.10 it behaves still the same but I’ve figured out the exact steps to make the monitors set correctly.
After plugging-in or unplugging the HDMI in order to force the re-detection of active monitors I have to run: xrandr --listmonitors
and then xset dpms force off
in this exact order.
I’ve tried xrandr --auto when I plugged in the HDMI but got xrandr: Configure crtc 3 failed and nothing happened. When I tried the xrandr --auto when I unplugged the HDMI, no error appeared and nothing happened but the command took like 1ms opposed to the first scenario where it took couple seconds to generate that error and finish.
Any ideas what might be happening?
P.S.:
Also noticed one surprising thing - with the 5.10 kernel the GPU temp fell down from 75-80C to 50-55C under load.
It’s old-ish monitor and there are no firmware updates. Strangely though that until one of the latest updates it worked just fine. OOTB manjaro - w/o updates works just fine. I’ve tried different machines with Windows and Ubuntu 20 and it worked as well. Usually when I have these kinds of problems, it turns out to be the nvidia drivers, so I guess I’ll wait patiently and pray to nvidia devs to fix up the issue in the coming releases.
I’ve scripted the force re-detection so it’s not that much of an issue now.