autorandr icon indicating copy to clipboard operation
autorandr copied to clipboard

Am having Profile Issues after Lock Screen on Linux Mint 19.3

Open kendoori opened this issue 5 years ago • 2 comments

If let my screensaver kick in (e.g. it is set to 1 hour and to lock the screen), often when I unlock it, my. primary and secondary monitors are swapped. I've built an xrandr script and bound it to a keyboard combo to switch it back, but am wondering if there's a way to use autorandr automatically after unlocking?

kendoori avatar Jan 04 '20 01:01 kendoori

Found this via google: https://unix.stackexchange.com/questions/28181/run-script-on-screen-lock-unlock I see there's a ActiveChanged signal in the org.cinnamon.ScreenSaver interface of the /org/cinnamon/ScreenSaver path.

This will help:

dbus-monitor --session "type='signal',interface='org.cinnamon.ScreenSaver',member='ActiveChanged'" | grep --line-buffered "boolean false" | xargs -L1 -I X autorandr -cf --default default

Run this somewhere in your session, e.g. by placing an appropriate desktop file into ~/.config/autostart, and autorandr will run each time your screen is unlocked.

phillipberndt avatar Jan 04 '20 11:01 phillipberndt

@phillipberndt Will give this a whirl and report back. Many people suffer from this "bug." In my case it may be because my external monitor is hooked up to the Thunderbolt port via USB3-->Displayport cable.

kendoori avatar Jan 04 '20 13:01 kendoori