LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   "Rotate" option in custom xorg.conf.d Monitor section config crashing X11 on startup (https://www.linuxquestions.org/questions/slackware-14/rotate-option-in-custom-xorg-conf-d-monitor-section-config-crashing-x11-on-startup-4175668937/)

kestralis 02-03-2020 09:43 PM

"Rotate" option in custom xorg.conf.d Monitor section config crashing X11 on startup
 
After a good while on 14.2 x86_64 stable, I recently reinstalled my system with the latest version of current using alienbob's ISO. Seemed to go well until I tried to "startx", where X11 fails to come up and just crashes.

The tail excerpt from the resultant /var/log/Xorg.0.log:
Code:

[150788.765] (II) Initializing extension GLX
[150788.768] (II) AIGLX: Loaded and initialized nouveau
[150788.768] (II) GLX: Initialized DRI2 GL provider for screen 0
[150788.768] (II) Initializing extension XFree86-VidModeExtension
[150788.768] (II) Initializing extension XFree86-DGA
[150788.768] (II) Initializing extension XFree86-DRI
[150788.768] (II) Initializing extension DRI2
[150788.768] (EE)
[150788.768] (EE) Backtrace:
[150788.769] (EE) 0: /usr/libexec/Xorg (OsLookupColor+0x138) [0x58af68]
[150788.770] (EE) 1: /lib64/libpthread.so.0 (funlockfile+0x50) [0x7ffb5ecde6df]
[150788.770] (EE) 2: /usr/libexec/Xorg (DamageRegister+0x1d) [0x50f95d]
[150788.770] (EE) 3: /usr/libexec/Xorg (xf86RandR12PreInit+0x379) [0x4b72e9]
[150788.770] (EE) 4: /usr/libexec/Xorg (xf86CrtcRotate+0x311) [0x4b7981]
[150788.770] (EE) unw_get_proc_name failed: no unwind info found [-10]
[150788.770] (EE) 5: /usr/lib64/xorg/modules/drivers/modesetting_drv.so (?+0x0) [0x7ffb5f1e13c0]
[150788.770] (EE) unw_get_proc_name failed: no unwind info found [-10]
[150788.770] (EE) 6: /usr/lib64/xorg/modules/drivers/modesetting_drv.so (?+0x0) [0x7ffb5f1db0c0]
[150788.771] (EE) 7: /usr/libexec/Xorg (InitExtensions+0x5fe) [0x4a945e]
[150788.771] (EE) 8: /usr/libexec/Xorg (InitFonts+0x269) [0x443009]
[150788.771] (EE) 9: /lib64/libc.so.6 (__libc_start_main+0xeb) [0x7ffb5eb09e5b]
[150788.771] (EE) 10: /usr/libexec/Xorg (_start+0x2a) [0x42deea]
[150788.771] (EE)
[150788.771] (EE) Segmentation fault at address 0x10
[150788.771] (EE)
Fatal server error:
[150788.771] (EE) Caught signal 11 (Segmentation fault). Server aborting
[150788.771] (EE)
[150788.771] (EE)

The cause of the crash appears to be the "Rotate" option for one of my displays in my custom /etc/X11/xorg.conf.d/10-monitor.conf:
Code:

Section "Monitor"
        Identifier "DVI-I-1"
        Option "PreferredMode" "1920x1080"
        Option "DPMS" "true"
        Option "RightOf" "DP-1"
        Option "Primary" "true"
EndSection

Section "Monitor"
        Identifier "DP-1"
        Option "PreferredMode" "1920x1080"
        Option "DPMS" "true"
        Option "LeftOf" "DVI-I-1"
        Option "Rotate" "left"
EndSection

Removing or commenting out the "Rotate" option line allows X11 to start normally, but then my second display is obviously no longer portrait orientation. This xorg.conf.d file is unchanged from the one I used without issue for my 14.2 install. Swapping in another model video card didn't seem to matter.

I'm honestly at a loss as to how to troubleshoot this further so I can get my second display to come up portrait orientation as before. Any thoughts or suggestions greatly appreciated!

mrmazda 02-09-2020 02:01 AM

See if xrandr works instead of xorg.conf:
Code:

# --output DisplayPort-0 --right-of DVI-I-0 --rotate left --output DVI-I-0 --primary
# inxi -V | head -n1
inxi 3.0.37-00 (2019-11-19)
# inxi -SGxx
System:    Host: big31 Kernel: 5.3.6-300.fc31.x86_64 x86_64 bits: 64 compiler: gcc v: 9.2.1 Desktop: KDE Plasma 5.16.5
          tk: Qt 5.12.5 wm: kwin_x11 dm: KDM Distro: Fedora release 31 (Thirty One)
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Oland [Radeon HD 8570 / R7 240/340 OEM] vendor: Dell driver: amdgpu
          v: kernel bus ID: 01:00.0 chip ID: 1002:6611
          Display: server: Fedora Project X.org 1.20.5 driver: amdgpu unloaded: fbdev,modesetting,vesa alternate: ati
          compositor: kwin_x11 resolution: 1680x1050~60Hz, 1920x1200~60Hz
          OpenGL: renderer: AMD Radeon HD 8500 Series (OLAND DRM 3.33.0 5.3.6-300.fc31.x86_64 LLVM 9.0.0) v: 4.5 Mesa 19.2.1
          direct render: Yes
#  xrandr | egrep 'onnect|creen|\*' | grep -v disconn | sort -r
Screen 0: minimum 320 x 200, current 2970 x 1680, maximum 16384 x 16384
DVI-I-0 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
DisplayPort-0 connected 1050x1680+1920+0 left (normal left inverted right x axis y axis) 474mm x 296mm
  1920x1200    59.95*+
  1680x1050    59.97*+  74.89


mrmazda 02-09-2020 03:09 AM

Same success with xrandr on Tumbleweed:
Code:

# inxi -V | head -n1
inxi 3.0.37-00 (2019-11-19)
# inxi -SGxx
System:    Host: p5bse Kernel: 5.4.13-1-default x86_64 bits: 64 compiler: gcc v: 9.2.1 Desktop: KDE 3 wm: kwin dm: startx
          Distro: openSUSE Tumbleweed 20200125
Graphics:  Device-1: NVIDIA GF119 [NVS 310] vendor: Hewlett-Packard driver: nouveau v: kernel bus ID: 01:00.0
          chip ID: 10de:107d
          Display: server: X.Org 1.20.7 driver: modesetting unloaded: fbdev,vesa alternate: nouveau,nv,nvidia
          resolution: 2560x1440~60Hz, 1920x1200~60Hz
          OpenGL: renderer: llvmpipe (LLVM 9.0.1 128 bits) v: 3.3 Mesa 19.3.2 compat-v: 3.1 direct render: Yes
# xrandr --output DP-1 --primary --output DP-2 --right-of DP-1 --rotate left
# xrandr | egrep 'onnect|creen|\*' | grep -v disconn | sort -r
Screen 0: minimum 320 x 200, current 3760 x 1920, maximum 16384 x 16384
DP-2 connected 1200x1920+2560+0 left (normal left inverted right x axis y axis) 519mm x 324mm
DP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
  2560x1440    59.95*+  74.92
  1920x1200    59.95*+

I too get a crash attempting to use xorg.conf to rotate:
Code:

Section "Device"
        Identifier        "NV"
        Option        "monitor-DP-1"        "lowerCon"        # modesetting DP
        Option        "monitor-DP-2"        "upperCon"        # modesetting DP
EndSection

Section "Monitor"
        Identifier        "lowerCon"
        Option                "Primary"        "true"
        Option                "LeftOf"        "upperCon"
EndSection

Section "Monitor"
        Identifier        "upperCon"
        Option                "DPMS"        "off"
        Option                "Rotate"        "left"
EndSection

Section "Screen"
        Identifier        "ScreenLeft"
        Device                "NV"
        Monitor                "lowerCon"
EndSection

Section "Screen"
        Identifier        "ScreenRight"
        Device                "NV"
        Monitor                "upperCon"
EndSection

Code:

...
[  383.365] (II) modeset(0): Refusing to try glamor on llvmpipe
[  383.381] (EE) modeset(0): glamor initialization failed
[  383.381] (II) modeset(0): ShadowFB: preferred YES, enabled YES
...
[  383.486] (II) Initializing extension DRI2
[  383.486] (EE)
[  383.486] (EE) Backtrace:
[  383.486] (EE) 0: X (xorg_backtrace+0x79) [0x55a4e3f716f9]
[  383.486] (EE) 1: X (0x55a4e3dc0000+0x1b53f8) [0x55a4e3f753f8]
[  383.486] (EE) 2: /lib64/libpthread.so.0 (0x7fef49401000+0x142d0) [0x7fef494152d0]
[  383.486] (EE) 3: X (DamageRegister+0x1d) [0x55a4e3ef61fd]
[  383.486] (EE) 4: X (0x55a4e3dc0000+0xd8321) [0x55a4e3e98321]
[  383.486] (EE) 5: X (xf86CrtcRotate+0x321) [0x55a4e3e98b01]
[  383.486] (EE) 6: /usr/lib64/xorg/modules/drivers/modesetting_drv.so (0x7fef48b83000+0x12caf) [0x7fef48b95caf]
[  383.486] (EE) 7: /usr/lib64/xorg/modules/drivers/modesetting_drv.so (0x7fef48b83000+0xc4c8) [0x7fef48b8f4c8]
[  383.486] (EE) 8: X (0x55a4e3dc0000+0xc9bee) [0x55a4e3e89bee]
[  383.486] (EE) 9: X (0x55a4e3dc0000+0x5f349) [0x55a4e3e1f349]
[  383.487] (EE) 10: /lib64/libc.so.6 (__libc_start_main+0xeb) [0x7fef49260e0b]
[  383.487] (EE) 11: X (_start+0x2a) [0x55a4e3e092da]
[  383.487] (EE)
[  383.487] (EE) Segmentation fault at address 0x10
[  383.487] (EE)
Fatal server error:
[  383.487] (EE) Caught signal 11 (Segmentation fault). Server aborting
...

I don't see resemblance to yours though. :p

No crash if I simply position secondary above primary:
Code:

Section "Device"
        Identifier        "NV"
        Option        "monitor-DP-1"        "lowerCon"        # modesetting DP
        Option        "monitor-DP-2"        "upperCon"        # modesetting DP
EndSection

Section "Monitor"
        Identifier        "lowerCon"
        Option                "Primary"        "true"
        Option                "Below"        "upperCon"
EndSection

Section "Monitor"
        Identifier        "upperCon"
        Option                "DPMS"        "off"
EndSection

Section "Screen"
        Identifier        "ScreenLeft"
        Device                "NV"
        Monitor                "lowerCon"
EndSection

Section "Screen"
        Identifier        "ScreenRight"
        Device                "NV"
        Monitor                "upperCon"
EndSection


allend 02-09-2020 05:54 AM

On my ancient machine with an nVidia GeForce 7300 LE GPU running the nouveau driver with the primary monitor on DVI-I-1 and the second monitor on VGA-1, I do not get a crash with an active 'Option "Rotate" "Left" ' option in my xorg.conf, but it does not do the rotation on the second monitor when starting X.
I see this in /var/log/Xorg.0.log
Quote:

(WW) NOUVEAU(1): Option "Rotate" is not used
I need to use 'xrandr --ouput VGA-1 --rotate left' after X has started. To make this the default at startup, I would add it to the autostart of my window manager.

kestralis 02-09-2020 08:40 PM

Quote:

Originally Posted by allend (Post 6087956)
I need to use 'xrandr --ouput VGA-1 --rotate left' after X has started. To make this the default at startup, I would add it to the autostart of my window manager.

Thank! This approached proved useful for me, too. Adding the lines
Code:

/usr/bin/xrandr --output DVI-I-1 --primary --right-of DP-1
/usr/bin/xrandr --output DP-1 --rotate left --left-of DVI-I-1

to my $HOME/.xinitrc will set a display orientation identical to what I should be getting using my custom xorg.conf.d. At least until that bug is fixed I'll gladly take this solution!

mrmazda 02-09-2020 10:18 PM

It appears there may be an existing bug report about this: https://gitlab.freedesktop.org/xorg/xserver/issues/485

kestralis 02-10-2020 04:40 PM

Quote:

Originally Posted by mrmazda (Post 6088230)
It appears there may be an existing bug report about this: https://gitlab.freedesktop.org/xorg/xserver/issues/485

Thanks for following up with that report. Sounds like the next update of package xorg-server to current should include this fix.


All times are GMT -5. The time now is 08:11 AM.