I've installed Juno release and all it's amazing, except that when I block my notebook, that have a secondary display, the display settings is lost.

My notebook is on the left side and my main screen is his, the secondary screen is on the right side. When the compute is locked, the login screen is showed on my secondary display, instead of the notebook screen (my main display). The position of screens is lost too, like my notebook is on the right and secondary monitor (now primary) is on the left

  • Some settings do require login though.
    – Hasan
    Commented Feb 9, 2019 at 7:43
  • I understand what you're talking, but to screen settings it doesn't make sense. I did not change my monitors configurations when I logout. :/
    – Carlos
    Commented Feb 10, 2019 at 19:04

1 Answer 1


StackExchange is not really the right place for reporting bugs, take a look at this issue on Github. Anyway, the following seems to be a workaround:

  1. Create a file called set-primary-monitor-pantheon-greeter in /usr/local/bin/ (source):
# Created: 2017-07-02 16:20
# Updated: 2018-02-09 12:23
# Creator: Ryan Miller
# Website: http://devopsmachine.com/
# File:    /usr/local/bin/set-primary-monitor-pantheon-greeter


# Get list of connected monitors
x_out=$(xrandr -q | grep -e '\( \)connected' | awk -F' ' '{ print $1 }')

# Safety - Check if PRIMARY_DISPLAY is connected; if not, bail out of script
[[ $(grep ${PRIMARY_DISPLAY} <<< ${x_out}) ]] || exit 0

# Iterate over x_out and disable all monitors except for PRIMARY_DISPLAY
for monitor in ${x_out[@]} ; do
    if [[ ${monitor} = ${PRIMARY_DISPLAY} ]] ; then
        xrandr --output ${monitor} --primary
        xrandr --output ${monitor} --off
  1. Change [PRIMARYDISPLAY] to the name of your primary display. You can get a list of all displays with xrandr (for example DisplayPort-2 in my case)
  2. Make the file executable: sudo chmod +a /usr/local/bin/set-primary-monitor-pantheon-greeter
  3. Add the following at the end of /usr/share/lightdm/lightdm.conf.d/40-io.elementary.greeter.conf: greeter-setup-script=/usr/local/bin/set-primary-monitor-pantheon-greeter

This will run the script when the greeter is set up. The script will then set the specified output as the primary output.

  • This script doesn't works to me... Thanks!
    – Carlos
    Commented Feb 10, 2019 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.