autorandr
autorandr copied to clipboard
Failed to find an EDID for output `HDMI-1-1` in setup file
I just set up a docked and a mobile profile and after unplugging and reconnecting my monitor from my laptop, I ran autorandr to check if it picked up the docked profile. Instead of the expected output, it gave me this error:
Failed to load profiles (line 393): Failed to find an EDID for output `HDMI-1-1\' in setup file, required as `HDMI-1-1' is not off in config file. (line 393)
It did store some EDIDs in the setup files when I first generated them. I've also tried replacing the EDIDs with the * wildcard which didn't make a difference.
Thanks
EDIT: I'm using Nvidia drivers so maybe it's related to that?
Okay so I got it working by going into ~/.config/autorandr/mobile/config and setting HDMI-1-1 off and then deleting the docked profile and generating it again. Would be interested to know why that worked..
I'm encountering the same problem. I tried removing the profile and switching and that didn't work as well.
So I've encountered this problem too.
For me at least it looks to be an edge cause where a disconnected display has a resolution with it.
$ xrandr | awk '$2 ~ /connected/'
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected 1920x1080+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm
DVI-I-2-2 disconnected (normal left inverted right x axis y axis)
DVI-I-1-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 521mm x 293mm
if I change one conditional in the code then it works for me.
diff --git a/autorandr.py b/autorandr.py
index 1e980f6..7edf72f 100755
--- a/autorandr.py
+++ b/autorandr.py
@@ -317,7 +317,7 @@ class XrandrOutput(object):
else:
edid = "%s-%s" % (XrandrOutput.EDID_UNAVAILABLE, match["output"])
- if not match["width"]:
+ if not match["connected"]:
options["off"] = None
else:
if match["mode_name"]:
I need to reopen this: Turns out the fix broke #143 / wasn't the right one.
My current understanding is that some video drivers will not automatically reset the mode of an output when it becomes disconnected. The impact of that is that autorandr treats it as still active/configured until that mode is unset, which is what calling xrandr with --off does. The fix that resolved this issue was to treat an output as "off" as long as it is disconnected. But this led to #143, a situation where autorandr can no longer detect that it still needs to unset the residual mode.
So I now think the original code was correct. The question is what triggered this bug then.
Here's a theory: If you have a working multi-monitor configuration, then unplug your second monitor, and then save an autorandr profile without reconfiguring anything manually then autorandr will store the setup for the single-monitor case but the configuration for the multi-monitor one.
This results in the broken case you guys have been observing: When you try to run autorandr again, it will parse the files it just wrote and see that there is an active output without an attached monitor, and then bail because that doesn't make any sense.
The proper fix for this issue here is that autorandr should refuse to even save the configuration in this case, and instead ask the user to properly configure their xrandr setup beforehand.
I just pushed a commit that does this.
Does anyone remember the situation well enough to confirm or rebut my theory?
If anyone has the time I'd appreciate to get feedback for whether the detection works - that is: Delete your profile, disconnect a display, and then attempt to save. autorandr should now refuse until you explicitly define the specific output as --off, and afterwards shouldn't have the issue with the profiles you had experienced.
@phillipberndt I don't think that saving the profile after disconnecting is the source of the issue here: I've been experiencing something a lot like #143 , and I think my 'mobile' profile was saved without any notion of an external monitor at all (basically, a fresh boot with my laptop disconnected from anything).
When autorandr switches to the mobile profile after disconnecting HDMI cable, it doesn't properly disconnect HDMI2 output/display (leaves a VIRTUAL1 around) and xrandr --output HDMI2 --off fixes it.
EDIT: I've just tested this to the best of my ability (redoing the mobile profile, basically) on version 1.8.1 and the problem seems to persist as above.