autorandr icon indicating copy to clipboard operation
autorandr copied to clipboard

Result of 'autorandr --current' does not correspond with detected configuration

Open smac89 opened this issue 5 years ago • 2 comments
trafficstars

I was just trying to debug why autorandr was not switching configurations after I unplug my external monitor.

First off, running autorandr --current does not show anything after switching configurations. What this means for me is that it has not actually detected the right configuration, which is why it was not running any of the scripts.

I don't know what causes this, but after I run autorandr --force --save config_name, and run autorandr --current, it shows config_name. Now I plug and unplug the external monitor, and autorandr --current shows empty output.

However, looking at the systemd logs, reveals that it thinks it has actually detected a configuration, and that the configuration has already been loaded:

Sep 13 18:47:02 ArcoB systemd[1]: Starting autorandr execution hook...
Sep 13 18:47:04 ArcoB autorandr[119867]: Config already loaded
Sep 13 18:47:04 ArcoB autorandr[119867]: autorandr running as user chigozirim (started from batch instance)
Sep 13 18:47:04 ArcoB autorandr[119867]: home
Sep 13 18:47:04 ArcoB autorandr[119867]: config_name (detected) (current)
Sep 13 18:47:04 ArcoB autorandr[119865]: Running autorandr as chigozirim for display :0
Sep 13 18:47:04 ArcoB systemd[1]: autorandr.service: Succeeded.
Sep 13 18:47:04 ArcoB systemd[1]: Finished autorandr execution hook.

I'm kinda confused what this means because the configuration it shows that is already loaded, is the one that should have been loaded, so it is detecting the correct configuration in the systemd service, but it thinks it has already been loaded. However, when I run autorandr --current, it does not show that any profile is active, which is also correct because none of the scripts for the supposedly current configuration were run.

Is this a known bug, or am I not using autorandr correctly?

smac89 avatar Sep 14 '20 01:09 smac89

@smac89 I kind of have the same issue. I use autorandr to toggle between two configurations. I grep the output of autorandr --current to identify the running configuration and based on that do the toggle. For some strange reasons when the system starts up the toggle logic works, but when I use it once my windows manager has been started it does not work anymore as autorandr --current gives an empty value. This looks a bit odd to me as it used to work in the past. I cannot actually tell when exactly this stopped working though.

HiMyNameIsIlNano avatar Mar 12 '22 15:03 HiMyNameIsIlNano

This is happening to me too, though either newly or intermittently – I used to just work based on autorandr --current (here), but somehow this stopped working. I can still switch to a specific configuration and have the switch work but autorandr --current remains stubbornly empty. I've switched my scripts to manually track the last selected layout, but that's very prone to errors obviously …

rixx avatar Sep 26 '23 13:09 rixx