Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Screens are reversed in the login manager?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Sat Sep 17, 2016 11:28 pm    Post subject: Screens are reversed in the login manager? Reply with quote

I have two monitors, the displays are reversed in the login manager but display correctly in the window manager (after logging in). What causes this?

Monitor1 is left of monitor2 after I have logged in.
Before logging in, monitor1 is right of monitor2!

This wasn't a problem before until a recent world update, which updated xorg-server.

The way I'm specifying the orientation of the monitors is by specifying in /etc/X11/xorg.conf.d:

Code:

Option "LeftOf" "DFP10"


In the "Monitor" section.

I'm using slim as my login manager, same as before.

slim: 1.3.6-r5
xorg-server: 1.18.4
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1519
Location: KUUSANKOSKI, Finland

PostPosted: Sun Sep 18, 2016 10:28 am    Post subject: Reply with quote

I don't know if slim supports scripting or running scripts/programs at certain events, but I managed to overcome that in LightDM by writing a script.
I went this way because for some reason sometimes the port names change. Also I've never quite got the hang of configuring X via its own config files propely. At least I leave monitor placements in a display to scripts running xrandr.
If slim does not support, then I guess there could be a way to run a script before slim starts but after X has started.

EDIT01: You could first just check if the monitor connector names are still the same and compare them to ones you have in your X configuration:
Code:
xrandr | awk '/^[[:alnum:]-]+ connected/ {if ($1 != "Screen") print $1}'
The code above lists connectors that are attached to any monitors.

Here's some picks from my bash script:

Function to list physical display connectors. You need this code to run any latter code in this post.
Run "list-monitors" to list all.
Run "list-monitors connected" to list connectors that have monitor attached.
Run "list-monitors disconnected" to list connectors that doesn't have monitor attached.
Code:
function list-monitors {
    # first argument to this function should only have values "connected", "disconnected", "" or NULL.
    xrandr | awk '/^[[:alnum:]-]+ '$1'/ {if ($1 != "Screen") print $1}'
}


After that you can rearrange your monitors. Here's how it is in my setup:
Code:
# 'primary' is your primary monitor.
# Here I run command to find it and grab the first Display Port connected monitor.
# You can just set it static also like:
#primary='DisplayPort-0'
primary="$(list-monitors connected | grep -m 1 'DisplayPort')"

# xrandr with combined bash and awk magic.
# Turns off all disconnected ports and then picks up the $primary and sets it primary.
# Finally gets first HDMI connected monitor via "list-monitors connected | grep -m 1 'HDMI'"
# and sets it left of the primary monitor.
xrandr --display "$DISPLAY" \
    $(awk '{print "--output " $1 " --off"}' <<< "$(list-monitors disconnected)") \
        --output "$primary" --auto --primary \
        --output "$(list-monitors connected | grep -m 1 'HDMI')" --auto --mode 1920x1080 --pos 0x120 --left-of "$primary"
You can remove the
Code:
$(awk '{print "--output " $1 " --off"}' <<< "$(list-monitors disconnected)") \
-line in most cases, but it shouldn't hurt if it's there either.

In short: Try to run xrandr before slim starts or via slim. ;)
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...


Last edited by Zucca on Sun Sep 18, 2016 10:59 am; edited 3 times in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sun Sep 18, 2016 10:35 am    Post subject: Reply with quote

I have the same issue with slim and my external monitor.

I have no idea why slim do not use the internal lvds display of my notebook to ask me for a login prompt.

To make matters worse, the external monitor is running with the wrong specs by slim and is black at the point when I want to enter my passphrase and user. I do not want to create an xorg.conf for that because its an external monitor and when i plug it in after i logged in X, i can easily set it up with nvidia-settings and it works than.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum