autorandr
autorandr copied to clipboard
HDMI output staying active when profile has it turn off.
I am using autorandr version 1.7
. Currently I have two profiles.
- Default
output DP-1
off
output HDMI-1
off
output DP-2
off
output HDMI-2
off
output eDP-1
mode 3840x2160
pos 0x0
primary
rate 60.00
- Bedroom TV
output DP-1
off
output DP-2
off
output HDMI-2
off
output HDMI-1
mode 1360x768
pos 1184x0
rate 60.02
output eDP-1
mode 3840x2160
pos 0x768
primary
rate 60.00
When I plug in my HDMI cable, autorandr
switches to the correct layout and everything works fine. However once I unplug the HDMI out autorandr seems to leave the lower resolution on top of my display, even though the config for default
tells it to turn off HDMI-1
Here is a screenshot of what happens after switch to the default profile:
I have tried using the --force
option to no avail.
What exactly is broken - detection or loading? After unplugging, if you run autorandr -c
manually, does it then switch correctly? What if you run autorandr -l default
? What does autorandr --debug -l default
output? Does xrandr --verbose
correctly say that the HDMI-1
output is not connected?
After unplugging the second display
[matt@xps ~ ]$ autorandr -c
SmallTV
default (detected) (current)
docked
Config already loaded
[matt@xps ~ ]$ autorandr -l default
Config already loaded
[matt@xps ~ ]$ autorandr --debug -l default
Config already loaded
It doesn't seem to recognize that anything is wrong.
Here's the relavant bit to xrandr --verbose
HDMI-1 disconnected 1920x1080+1000+0 (0x1c9) normal (normal left inverted right x axis y axis) 0mm x 0mm
Identifier: 0x44
Timestamp: 169344
Subpixel: unknown
Gamma: 1.0:1.0:1.0
Brightness: 1.0
Clones: DP-1
CRTC: 1
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
Content Protection: Undesired
supported: Undesired, Desired, Enabled
max bpc: 12
range: (8, 12)
content type: No Data
supported: No Data, Graphics, Photo, Cinema, Game
aspect ratio: Automatic
supported: Automatic, 4:3, 16:9
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
link-status: Good
supported: Good, Bad
CONNECTOR_ID: 100
supported: 100
non-desktop: 0
range: (0, 1)
It says it has been disconnected however the HDMI-1 display remains on top of my laptop display
Does xrandr --output HDMI-1 --off
change this? If yes I'm afraid this is the bad case I predicted in #128 / #139.. try what happens if you replace
if not match["connected"] or not match["width"]: # Line 320 for me
with
if not match["width"]:
in that case, please. If that helps I'll try to come up with a solution that works for everyone.
Yep! I can verify changing if not match["connected"] or not match["width"]:
to if not match["width"]:
fixed the issue. Thank you!
I can confirm that this is an issue I have been facing (v 1.8.1) and that the fix in https://github.com/phillipberndt/autorandr/issues/143#issuecomment-474085143 worked for me. Hoping this is fixed in the next version as this is such a useful piece of software!
See my comments in #128. I changed the line as mentioned above and think I've found a proper solution for the earlier bug. Once I got confirmation that behaviour looks sane for everyone now I'll make a release containing the fix.
@phillipberndt perhaps this should be reopened, as the proposed fix was reverted.
I can report the same issue on my setup with autorandr 1.8.1
.
Upon unplugging, autorandr hapilly thinks, that the Mobile profile is active, while HDMI2 is still in
HDMI2 disconnected 1920x1080+1920+0 (0x2f6) normal (normal left inverted right x axis y axis) 0mm x 0mm
state.
Running autorandr -c --force
fixes the issue, but it is pretty annoying.
Changing the mentioned line of code to just match["width"]
did nothing to resolve the issue.
It seems like autorandr assumes that the display is off and therefore does not bother to actually aplly the profile, despite all the changes in xrandr output.
I would also suggest re-opening this. I have the same bug with autorandr 1.8.1
.
Running
autorandr -c --force
fixes the issue
I was able to make this work for myself temporarily by adding the --force
flag to the autorandr.service
installed by pacman:
--- /usr/lib/systemd/system/autorandr.service.orig 2019-11-05 08:42:37.463447888 -0700
+++ /usr/lib/systemd/system/autorandr.service 2019-11-05 08:42:41.423448070 -0700
@@ -8,7 +8,7 @@
StartLimitBurst=1
[Service]
-ExecStart=/usr/bin/autorandr --batch --change --default default
+ExecStart=/usr/bin/autorandr --batch --change --force --default default
Type=oneshot
RemainAfterExit=false
KillMode=process
same issue with autorandr 1.8.1
Still got this problem with autorandr 1.9 on 5.5.15-1-MANJARO, tried to look at journalctl logs but couldn't find anything wrong. I resolved by just creating a startup script with autorandr -c. It didn't have this problem some time ago though, I wonder what's the issue...
Still got this problem with autorandr 1.9 on 5.5.15-1-MANJARO, tried to look at journalctl logs but couldn't find anything wrong. I resolved by just creating a startup script with autorandr -c. It didn't have this problem some time ago though, I wonder what's the issue...
Idem! Same problem here with autorandr 1.10 on 5.6.7-1-MANJARO.
Try downgrading to v1.8! In arch/manjaro you have a downgrade tool for this. Use downgrade for install v1.8 and add autorandr to IgnorePkg until problem was resolved.
In my case, autorandr was updated to v1.10 along with the arch system upgrade. I've downgraded to autorandr 1.8 and this works fine. I think that problem is with autorandr.service in v1.10 because i not find any autorandr.service file in /usr/lib/systemd/system/autorandr.service