autorandr icon indicating copy to clipboard operation
autorandr copied to clipboard

Screens remain dark after reboot

Open mipimipi opened this issue 2 years ago • 1 comments

Hi, autorandr is a great tool, but unfortunately I have one problem that I couldn't solve to far:

I am running a laptop with Arch Linux and i3wm. I created 2 autorandr profiles:

  1. "laptop" - laptop only, which I made the default via autorandr --default laptop
  2. "desktop" - external monitor only

When I have the external monitor connected and I reboot the system. I can log in (I use lightdm as login mgr), but then both screens (laptop and external monitor) remain dark. When I unplug the external monitor, the laptop screen appears. When I plug in the external monitor again, the laptop monitor automatically is switched off and the external monitor is switched on.

The status of the autorandr systemd service is as follows:

% systemctl status autorandr
○ autorandr.service - autorandr execution hook
     Loaded: loaded (/usr/lib/systemd/system/autorandr.service; enabled; vendor preset: disabled)
     Active: inactive (dead)

Apr 09 12:49:40 spock systemd[1]: autorandr.service: Deactivated successfully.
Apr 09 12:49:40 spock systemd[1]: Finished autorandr execution hook.
Apr 09 12:49:44 spock systemd[1]: Starting autorandr execution hook...
Apr 09 12:49:48 spock autorandr[2911]: [{"success":true}]
Apr 09 12:49:48 spock autorandr[2796]: autorandr running as user mipi (started from batch instance)
Apr 09 12:49:48 spock autorandr[2796]: laptop (current)
Apr 09 12:49:48 spock autorandr[2796]: desktop (detected)
Apr 09 12:49:48 spock autorandr[2792]: Running autorandr as mipi for display :0
Apr 09 12:49:48 spock systemd[1]: autorandr.service: Deactivated successfully.
Apr 09 12:49:48 spock systemd[1]: Finished autorandr execution hook.

Any idea why this happens and how I can ensure that after reboot and login one screen is switched on?

Also tried to create a profile called "default" as described in #257. That didn't work, same system behavior.

Update: I tried different things, unfortunately without success:

  • I experimented with executing autorandr --batch -c --default default via script during the login phase (assigned the script to 'session-setup-script` in the Lightdm config).
  • Added autorandr -c --force to my .xinitrc

It seems that autorandr is not executed after login when the user session starts.

Thanks, mipi

mipimipi avatar Apr 09 '22 11:04 mipimipi