slight OT: zaphodheads and glamor scramble text

Hi Linux-xorg-specialists,

Psychtoolbox works with the second monitor visible with DISPLAY=:0.1 and a single monitor visible for xrandr. So, it is no Psychtoolbox-bug itself.


But, as reported in thread
  Scrambled text if Zaphodheads; was: [PSYCHTOOLBOX] Re: Cannot end BitsPlusIdentityClutTest(1, 1)
I am not able to get a readable desktop. All text (menue bars, window titles, web pages in browser window) gets partially scrambled as if some letters are written on top of each other, see attachment.

Reason is "Zaphodheads" in xorg.conf (as suggested by XOrgConfCreate) *and* the forced usage of glamor.
Recently with older system (2014), I was able to switch off glamor in xorg.conf's Device sections with
  Option   "AccelMethod" "exa"       # thanks to a hint of Mario
This doesn't work anymore, since Xorg.0.log shows:
  [234.971] (WW) RADEON(0): EXA not supported, using glamor
Also if skipped, or
  Option   "AccelMethod" "none"
glamor is switched on :-(
  [235.400] (II) RADEON(0): Use GLAMOR acceleration.
  [235.400] (II) RADEON(0): Acceleration enabled
  [235.448] (II) RADEON(1): Use GLAMOR acceleration.
  [235.448] (II) RADEON(1): Acceleration enabled

Whenever I use the default (combined Screen over two monitors (DP & DVI)), all fonts look normal.
But Psychtoolbox then cannot use the second monitor.

* Does anybody know, how to switch off glamor?
* Or how to circumvent the text-scrambling?
Thanks for hints!

Best regards,
Uli


System Hardware:
  AMD TAHITI 7790 (Southern Islands)
    according to https://www.x.org/wiki/RadeonFeature/ supported
  2 Monitors: DVI-0 (Viewpixx 1920x1200), DisplayPort-0 (Eizo LCD 1920x1200)
System Linux
  Debian 8.7.1 (vanilla, Feb 2017)  -or-
  Kubuntu 2016.04-LTS               -same-

# inxi -G
  Graphics:  Card: Advanced Micro Devices [AMD/ATI] Tahiti XT
             [Radeon HD 7970/8970 OEM / R9 280X]
            Display Server: X.org 1.16.4 drivers: ati,radeon
             tty size: 193x57 Advanced Data: N/A for root
# uname -a
  Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux

$ xrandr -q
  Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 16384 x 16384
  DisplayPort-0 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
    1920x1200     59.95*+
$ DISPLAY=:0.1 xrandr -q
  Screen 1: minimum 320 x 200, current 1920 x 1200, maximum 16384 x 16384
  DVI-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 484mm x 302mm
    1920x1200    100.00*+ 120.00    84.93    74.93    59.95

$ glxgears -info   (same with DISPLAY=:0.1)
  GL_RENDERER   = Gallium 0.4 on AMD TAHITI
  GL_VERSION    = 3.0 Mesa 10.3.2
  GL_VENDOR     = X.Org

more info helpfull?

xorg.conf:
    # Auto generated xorg.conf - Created by Psychtoolbox XOrgConfCreator.

    Section "ServerLayout"
      Identifier    "PTB-Hydra"
      Screen 0      "Screen0" 0 0
      Screen 1      "Screen1" RightOf "Screen0"
    EndSection

    Section "Monitor"
      Identifier    "DisplayPort-0"
    EndSection

    Section "Monitor"
      Identifier    "DVI-0"
    EndSection

    Section "Device"
      Identifier  "Card0"
      Driver      "ati"
      Option      "ZaphodHeads" "DisplayPort-0"
      Option      "Monitor-DisplayPort-0" "DisplayPort-0"
      Screen 0
      Option      "AccelMethod" "none"     # no more "EXA"
    EndSection

    Section "Device"
      Identifier  "Card1"
      Driver      "ati"
      Option      "ZaphodHeads" "DVI-0"
      Option      "Monitor-DVI-0" "DVI-0"
      Screen 1
      Option      "AccelMethod" "none"     # no more "EXA"
    EndSection

    Section "Screen"
      Identifier    "Screen0"
      Device        "Card0"
      Monitor       "DisplayPort-0"
    EndSection

    Section "Screen"
      Identifier    "Screen1"
      Device        "Card1"
      Monitor       "DVI-0"
    EndSection

grep -i glamor Xorg.0.log
  [3.314] (WW) RADEON(0): EXA not supported, using glamor
  [3.314] (II) Loading sub module "glamoregl"
  [3.314] (II) LoadModule: "glamoregl"
  [3.314] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
  [3.321] (II) Module glamoregl: vendor="X.Org Foundation"
  [3.321] (II) glamor: OpenGL accelerated X.org driver based.
  [3.438] (II) glamor: EGL version 1.4 (DRI2):
  [3.460] (II) RADEON(0): glamor detected, initialising EGL layer.
  [3.635] (WW) RADEON(1): EXA not supported, using glamor
  [3.635] (II) Loading sub module "glamoregl"
  [3.635] (II) LoadModule: "glamoregl"
  [3.635] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
  [3.635] (II) Module glamoregl: vendor="X.Org Foundation"
  [3.635] (II) glamor: OpenGL accelerated X.org driver based.
  [3.636] (II) glamor: EGL version 1.4 (DRI2):
  [3.648] (II) RADEON(1): glamor detected, initialising EGL layer.
  [3.845] (II) RADEON(0): Use GLAMOR acceleration.
  [3.847] (II) RADEON(0): Set up textured video (glamor)
  [3.847] (II) RADEON(0): [XvMC] Associated with GLAMOR Textured Video.
  [3.973] (II) RADEON(1): Use GLAMOR acceleration.
  [3.975] (II) RADEON(1): Set up textured video (glamor)
  [3.975] (II) RADEON(1): [XvMC] Associated with GLAMOR Textured Video.


Hi Uli,

does this always happen? Any difference after a reboot? What's the "inxi -G" output on the KUbuntu 16.04 system? X-Server version, Mesa version?

This must be some peculiar graphics system bug, as KUbuntu 16.04 was extensively tested by me on a variety of Intel, AMD and NVidia cards in single display, multi-display and multi-display ZaphodHeads mode without showing such problems.

By now a fully up to date 16.04.2 LTS system should have XOrg 1.18.4, and Mesa version 12.0.6 i think.

Glamor can't be disabled on a Tahiti gpu anymore. As exa is no longer supported on Tahiti and later, it is glamor or nothing, and nothing is not compatible with PTB's graphics/display timing as far as i remember.

You could try with XOrgConfCreator's "special/advanced settings" to enable DRI3 mode when it asks about it. Another option would be to use the "modesetting" display driver when it asks for that. However to switch to modesetting you must first go back to a single X-Screen + modsetting, logout/login, then with another XOrgConfCreator invocation back to modesetting + multi-x-screen. The reason is that the modesetting driver names video outputs for the 'ZaphodHeads' option differently from the regular ati driver.

-mario