You are not logged in.

#1 2018-04-12 20:43:36

Moviuro
Member
Registered: 2012-06-03
Posts: 73

(solved) Xorg fun: portrait and landscape

Hi,

I added a screen to my setup. I now have:

* One 1440p @ 144Hz display, hooked up to a Radeon card (amdgpu), Display Port, primary display on my desk
* One 1080p @ 60 Hz display, hooked to an intel built-in GPU, VGA cable, portrait mode, right of 1440p display

This is what I want (picture), this is what I see (picture).

In the white (it's actually not white, but a solid color that I can set) area, my cursor is OK: pointy side up, moving as expected. The red rectangle represents the physical limits of the screen, and the cursor can't move over it. However, you can see that the content is rotated. If my cursor is at the bottom of the screen in the blank area (where URxvt is supposed to be), then the URxvt window gets focus. If the cursor is at the top of the screen (over mpv), then mpv gets the focus.

In [c]/etc/X11/xorg.conf.d[/c]:

./00-keyboard.conf
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "fr"
EndSection
./10-rat7.conf # irrelevant for this test, I hope
Section "InputClass"
    Identifier "Mouse Remap"
    MatchProduct "Mad Catz Mad Catz R.A.T.7 Mouse"
    MatchDevicePath "/dev/input/event*"
    Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 0 0 0 0 0 0"
EndSection
./20-amdgpu.conf
Section "Device"
  Identifier "AMD"
  Driver     "amdgpu"
  Option     "DRI" "3"
  BusID      "PCI:1:0:0"
EndSection
./20-i915.conf
Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
  BusID       "PCI:0:2:0"
#  Option      "Rotate" "left"
#  Option      "TearFree" "true"
#  Option      "AccelMethod" "sna"
EndSection

Further tests I conducted:

* If I set the VGA display as "normal" rotation, everything works perfectly fine. GlxGears works like a charm!
* If I set the VGA display as "inverted" rotation, the windows have the same gravity as "normal", meaning that they are upside-down. The cursor is the only thing that works as expected. GlxGears glitches like hell, it's horrible.
* Other rotations end up with even stranger things...
* Other resolutions don't change anything: same symptoms, bigger pixels.

xrandr output: http://ix.io/17Cv
If I remove the intel xorg.conf(5) file, the screen disappears: http://ix.io/17CI

And that's it.

Last edited by Moviuro (2018-04-15 11:46:02)


bspwm, BTRFS over LUKS
Archlinux a lot, FreeBSD more and more...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.

Offline

#2 2018-04-14 14:49:54

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: (solved) Xorg fun: portrait and landscape

full xorg log and lspci -k output please.

How are you starting X and which wm/de are you using ?
what's in your ~/.xinitrc ?

Last edited by Lone_Wolf (2018-04-14 14:50:44)


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2018-04-15 07:08:26

Moviuro
Member
Registered: 2012-06-03
Posts: 73

Re: (solved) Xorg fun: portrait and landscape

http://ix.io/17NH lscpi -k
http://ix.io/17NF Xorg log at startup of X session
http://ix.io/17NI Xorg log after xrandr --output DP1 --right-of DisplayPort-3 --auto
http://ix.io/17NK Xorg log after xrandr --output DP1 --right-of DisplayPort-3 --auto --rotate left

I'm using bspwm, but the issue is the same with i3 and awesome.

xinitrc:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

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

if [ -f ~/.Xresources ]; then
  xrdb -merge ~/.Xresources
fi

# Notification daemon
pgrep dunst || dunst &

# Set browser
export BROWSER=google-chrome-stable

# music !
pgrep mpd || mpd
pgrep mpd && mpc pause

_host_config=~/.config/X/"xinitrc.$(hostname)"
if [ -f "$_host_config" ]; then
  . "$_host_config"
fi

# keyboard
setxkbmap fr

# Hotkey daemon
pgrep sxhkd || sxhkd &

# tmux
pgrep tmux || tmux

# No more X cursor over the root window!
xsetroot -cursor_name left_ptr

# Window Manager of your choice
exec bspwm

host-specific settings

#!/bin/sh
#
# ~/.xinitrc.hostname

xrandr --output DisplayPort-3 --auto --primary
#xrandr --output DP1 --auto --right-of DisplayPort-3 --rotate left

#Wallpaper
/usr/local/bin/gif-soup ~/Pictures/wallpapers/gif &

bspwm, BTRFS over LUKS
Archlinux a lot, FreeBSD more and more...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.

Offline

#4 2018-04-15 11:45:46

Moviuro
Member
Registered: 2012-06-03
Posts: 73

Re: (solved) Xorg fun: portrait and landscape

I fixed the problem:

Driver      "intel" -> Driver      "modesetting"

I'll update the wiki to reflect this


bspwm, BTRFS over LUKS
Archlinux a lot, FreeBSD more and more...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.

Offline

Board footer

Powered by FluxBB