Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Going to sleep in clamshell mode -> wake up in laptop mode #407

Open
mil-ad opened this issue Jan 17, 2025 · 0 comments
Open

Going to sleep in clamshell mode -> wake up in laptop mode #407

mil-ad opened this issue Jan 17, 2025 · 0 comments

Comments

@mil-ad
Copy link

mil-ad commented Jan 17, 2025

I normally use my laptop in clamshell mode (i.e closed lid, connected to an external monitor) monitor so I have defined three autorandr two support various scenarios:

  • laptop-only
  • external-only
  • dual-screen

This mostly works great but here's is the scenario it almost always fails at: I'm in external-only mode and put the machine into sleep. Later I disconnect it from the laptop (to take it out with me) and then later open the lid to wake it up. Autorandr seems to think that I'm in dual-screen mode and then fails to apply the profile. I end up in the previous mode (external only) and don't see anything on my laptop screen 😬

Here's the systemd log showing sleep in dual mode and waking up next day in laptop only mode:

Jan 16 17:29:33 thinkpad-p1 systemd[1]: Finished autorandr.service - autorandr execution hook.
Jan 16 17:29:33 thinkpad-p1 systemd[1]: autorandr.service: Consumed 227ms CPU time, 122.3M memory peak.
Jan 17 09:59:29 thinkpad-p1 systemd[1]: Starting autorandr.service - autorandr execution hook...
Jan 17 09:59:32 thinkpad-p1 autorandr[1313033]: Failed to apply profile 'laptop-dualup-combo' (line 1019):
Jan 17 09:59:32 thinkpad-p1 autorandr[1313033]:   Command failed: xrandr --fb 6400x4192 --output DP-2-1-5 --crtc 0 --gamma 1.0:1.0:1.0 --mode 2560x2880 --pos 0x0 --primary --rate 59.97 --reflect normal --rotate normal --set audio auto -->
Jan 17 09:59:32 thinkpad-p1 autorandr[1313033]: autorandr running as user milad (started from batch instance)
Jan 17 09:59:32 thinkpad-p1 autorandr[1313033]: laptop-dualup-combo (detected)
Jan 17 09:59:32 thinkpad-p1 autorandr[1313033]: dualup-only
Jan 17 09:59:32 thinkpad-p1 autorandr[1313033]: laptop-only
Jan 17 09:59:32 thinkpad-p1 autorandr[1313022]: Running autorandr as milad for display :0
Jan 17 09:59:32 thinkpad-p1 systemd[1]: autorandr.service: Deactivated successfully.
Jan 17 09:59:32 thinkpad-p1 systemd[1]: Finished autorandr.service - autorandr execution hook.

Is this some sort of race condition?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant