phillipberndt / autorandr

Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
2.51k stars 123 forks source link

Screens remain dark after reboot #284

Open mipimipi opened 2 years ago

mipimipi commented 2 years ago

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:

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

Thanks, mipi

stevleibelt commented 3 months ago

It looks like my issue almost fits to the issue @mipimipi has reported.

I am using arch linux and i3wm too but just log in on the shell and call xinit after login. My issue is, that all connected screens are powered up but not with the expected profile. Having a look into journalctl -u autorandr.service, it looks like:

Jul 08 07:39:42 urz-n238676 systemd[1]: Starting autorandr execution hook...
Jul 08 07:39:43 urz-n238676 systemd[1]: autorandr.service: Deactivated successfully.
Jul 08 07:39:43 urz-n238676 systemd[1]: Finished autorandr execution hook.
Jul 08 07:45:12 urz-n238676 systemd[1]: Starting autorandr execution hook...
Jul 08 07:45:16 urz-n238676 autorandr[23752]: autorandr running as user <string: username> (started fr>
Jul 08 07:45:16 urz-n238676 autorandr[23752]: office (detected)
Jul 08 07:45:16 urz-n238676 autorandr[23752]: stand_alone
Jul 08 07:45:16 urz-n238676 autorandr[23752]: homeoffice

I've installed the package from the regular repository.