You are not logged in.

#1 2017-05-07 20:01:10

taylorthurlow
Member
Registered: 2016-12-16
Posts: 8

GNOME on X11 overrides xrandr display changes done by LightDM

I've configured LightDM with a display startup script as follows:

#!/usr/bin/env bash
xrandr --output DVI-D-0 --pos 3640x0 --mode 1920x1080 --rate 144 --right-of DP-2 --rotate left
xrandr --output DP-2 --pos 1080x240 --mode 2560x1440 --rate 144 --left-of DVI-D-0 --primary
xrandr --output HDMI-0 --pos 0x0 --auto --left-of DP-2 --rotate right
xrandr --output DP-2 --pos 1080x240

Which works without issues for the login part. As soon as I log in to Gnome 3 (on X11), each monitor shows a black screen with a white box in one corner for about 10-15 seconds. I can only assume that it's changing display settings at this point. Once the desktop loads, the display settings have clearly changed (refresh rates are not set, monitors not rotated).

This is on a nearly fresh installation of Arch. I have no xorg.conf or any files in xorg.conf.d. I'm running zsh, and its associated files do not contain any display-altering commands:

.zshrc

export ZSH=$HOME/.oh-my-zsh

ZSH_THEME="hyperzsh"

plugins=(git autojump capistrano catimg common-aliases gem npm perms pip python rails ruby sublime st sudo systemd web-search)

source $ZSH/oh-my-zsh.sh

#################################
## USER CONFIG BELOW THIS LINE ##
#################################

export ZSH_THEME="hyperzsh"

# Up a directory with "up"/
up() {
	cd $(eval printf '../'%.0s {1..$1})
}

# Makedir and cd into it
mkcd() {
	if [ $# != 1 ]; then
		echo "Usage: mkcd <dir>"
	else
		mkdir -p $1 && cd $1
	fi
}

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

.xinitrc

#!/usr/bin/env bash

xrdb -load ~/.Xresources

if [[ -d /etc/X11/xinit/xinitrc.d ]]; then
	for f in /etc/X11/xinit/xinitrc.d/*; do
		[[ -x "$f" ]] && source "$f"
	done
fi

xset m 6/5 0

A pastebin of my journalctl -b: https://pastebin.com/WbK1tmgT

---

Worst case scenario here, I'd like to figure out the best place to put the xrandr commands in order to have them execute when gnome loads the desktop. That said, it would feel stupid to run the same commands for both LightDM and Gnome, so I'd like to prevent gnome from messing with the current monitor settings if at all possible. Thanks!

Offline

#2 2017-05-08 13:19:34

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,567

Re: GNOME on X11 overrides xrandr display changes done by LightDM

Try putting those commands in a Xprofile , see https://wiki.archlinux.org/index.php/Xprofile


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2017-05-08 18:58:19

taylorthurlow
Member
Registered: 2016-12-16
Posts: 8

Re: GNOME on X11 overrides xrandr display changes done by LightDM

Lone_Wolf wrote:

Try putting those commands in a Xprofile , see https://wiki.archlinux.org/index.php/Xprofile

Tried both $HOME/.xprofile and /etc/xprofile but neither did the trick. Trying to confirm that LightDM is actually running them. LightDM has a script located at /etc/lightdm/Xsession which does the loading of the xprofile scripts and some other important stuff, which happens to echo each time it loads a file. I can't figure out for the life of me where these statements actually echo to. I can't find anything in journalctl.

Last edited by taylorthurlow (2017-05-08 18:58:36)

Offline

Board footer

Powered by FluxBB