Xrandr shows monitor as CONNECTED when it is not
Recently I wanted to have monitor hotplugging and I wrote a udev rule which worked okayish (except that it could only detect the monitor when it got plugged in for the first time)
I decided to ditch that and removed the rule, but now after disconnecting the HDMI, xrandr still shows a fake monitor connected and it turns into HDMI-1 when I plug the monitor back in.
HDMI-3 disconnected (normal left inverted right x axis y axis)
1920x1080 (0x246) 148.500MHz +HSync +VSync
h: width 1920 start 2008 end 2052 total 2200 skew 0 clock 67.50KHz
v: height 1080 start 1084 end 1089 total 1125 clock 60.00Hz
How am I supposed to debug this? The side effect of this fake monitor is that it has a i3 workspace on it + pavucontrol says HDMI is disconnected (regardless of it being connected or not) and I cannot play sound on the monitor then.
EDIT: xrandr --auto after disconnecting the external monitor works!
Edited 11 May 2019. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 5 · 100% up
- Kind
- Text
- ID
- bm31mo
3 comments
It could be related to pulseaudio. When I do
aplay -lmy internal onboard soundcard shows up named as HDMI. It’s a 9-10 year old thinkpad that doesn’t even have a hdmi port.I have another htpc connected to my tv where I do use sound via hdmi. On this one I loose sound whenever the blank display screensave thing kicks in, and I manually have to change config back to hdmi in pavucontrol. When display blanks out it jumps back to the regular soundcard and wants to send audio via the mini jack connector.
Does restarting pulseaudio help?
Sadly, it's not. After killing pulseaudio, that device still stays.
Restarting the entire X session works, which is expected, but I have no idea what that device even is, nor where can I look for it. It's as if it's not actually related to HDMI3, but it just happened to be printed below it because it's last in the list.
I figured it out!
I tried setting just the laptop screen via xrandr with
xrandr --output eDP-1 --primary --auto, but it didn't work. Then I tried justxrandr --autoand the disconnected external monitor was gone!
EDIT: and now I found this thread which deals with the same problem - https://www.reddit.com/r/i3wm/comments/6gtpm8/workspaces_remain_on_disconnected_monitors_output/