Announcement

Collapse
No announcement yet.

How to enable glamor on AMD 7560D ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to enable glamor on AMD 7560D ?

    Hello. I would like to see how glamor works, but it seems i cant get my head around it.

    Here is what i did:

    -installed glamor from git.
    -recompiled the xf86 ati driver with --enable-glamor
    -compiled mesa with

    Code:
    --sysconfdir=/etc --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-debug \
    --enable-texture-float --with-gallium-drivers=r600,swrast \
    --enable-glx --enable-vdpau --enable-dri --with-dri-drivers=radeon \
    --enable-egl --enable-osmesa --enable-gles1 --enable-gles2 \
    --enable-glx-tls --enable-64-bit --disable-32-bit \
    CPPFLAGS="-m64" \
    CXXFLAGS="-m64" \
    --with-dri-driverdir=/usr/lib/x86_64-linux-gnu/dri \
    --disable-gallium-llvm \
    --enable-xorg \
    --with-egl-platforms=x11,drm \
    --enable-gbm
    added to xorg.conf the device section:

    Code:
    Section "Device"
        Identifier "AMD Radeon 7560D"
        Driver "radeon"
        Option "AccelMethod" "glamor"
    EndSection
    /usr/share/X11/xorg.conf.d/glamor.conf was created automatically and had these in it:

    Code:
    Section "Module"
        Load "dri2"
        Load "glamoregl"
    EndSection
    But when i start the x server, i have these in the xorg log:

    Code:
    [  1288.503] (II) LoadModule: "glamoregl"
    [  1288.503] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
    [  1288.506] (II) Module glamoregl: vendor="X.Org Foundation"
    [  1288.506] 	compiled for 1.12.4, module version = 0.5.1
    [  1288.506] 	ABI class: X.Org ANSI C Emulation, version 0.4
    So the module loads, but:
    Code:
    [  1288.803] (WW) RADEON(0): Option "AccelMethod" is not used
    I tried adding both the module and device section to xorg.conf but it did the same. Any thoughts?

    Full xorg log:

    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

  • #2
    Originally posted by gradinaruvasile View Post
    Hello. I would like to see how glamor works, but it seems i cant get my head around it.
    Did you get this sorted out?

    I'm wondering if it comes down to a matter of precedence.

    The reason why glamor.conf exists is given here: how to enable, pt.4, http://lists.freedesktop.org/archive...il/000156.html

    The reason why we need to load dri2/glamoregl earlier is ... So if the glx module is loaded earlier than dri2/glamoregl, then we will get an incomplete dispatch table and everything is broken in glamor then.
    And from your xorg log:
    Code:
    [  1288.502] (II) "glx" will be loaded by default.
    ...
    [  1288.503] (II) Loading extension DRI2
    [  1288.503] (II) LoadModule: "glamoregl"
    Also of note from the log is the fact that EXA is in play a short bit before the WW is registered regarding your glamor acceleration option.

    And so the question arises as to why are those behaviours occurring. (I would have tested this myself but can't right now, and so am currently only offering this) bit of speculation:

    The man page for both xorg and xorg.conf layout the precedence order for configuration mechanisms. Specifically, from that, you find that xorg.conf > xorg.conf.d

    What is the module section in the xorg.conf file you have used look like? Chances are its empty. In which case, I think that the default behaviour for modules is occurring (see the modules section within "man xorg.conf") .... and that happens before the specific directives of the xorg.conf.d/glamour.conf file is examined. Consequently, the environment is not quite enabled correctly for glamor to function.

    Try placing the very same Module section within your xorg.conf file proper.

    Comment


    • #3
      Try placing the very same Module section within your xorg.conf file proper.
      Did that already. Its exactly the same. It seems that the glamor.conf is actually processed before the modules load. I also split it up because after reboots the device section was gone from it.

      Anyway, the exact warning generated by the radeon driver in the xorg log states:

      Code:
      Option "AccelMethod" is not used
      So it seems that the radeon driver doesnt take into account the AccelMethod option, not its value. I put some gibberish there and it was exactly the same message.
      I read up on it and for instance at one point the intel driver supported only UXA acceleration, gave the same error if one wanted to set EXA because it supported only UXA and plain ignored the AccelMethod option.

      So, is the radeon driver from current git supports only EXA for certain AMD cards (for example ARUBA) or i didnt do the configuration right?

      Comment


      • #4
        Originally posted by gradinaruvasile View Post
        Did that already. Its exactly the same.
        ah, okay.

        It seems that the glamor.conf is actually processed before the modules load.
        oh boy, I'm a monkey. Looking at the log again (in the light of day), I see glx is indeed loaded post dri2 & glamoregl loads.
        Code:
        [  1288.508] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
        It is only the message that it "will be loaded" that occurs prior. Didn't take the time to process that difference last night I guess.

        So it seems that the radeon driver doesnt take into account the AccelMethod option, not its value. I put some gibberish there and it was exactly the same message.
        I read up on it and for instance at one point the intel driver supported only UXA acceleration, gave the same error if one wanted to set EXA because it supported only UXA and plain ignored the AccelMethod option.

        So, is the radeon driver from current git supports only EXA for certain AMD cards (for example ARUBA) or i didnt do the configuration right?
        I don't think its chip specific. Your configurations, however, look fine AFAICT.

        I see (from the log file) that you're using X.Org X Server 1.12.4. I recall that there was a bit of a stumbling block with the server and glamor at one point, but I believe it was in relation to the order of module loading (as discussed above). Still, it might be worthwhile to upgrade that to see if there is a change. Other suggestion is to re-grab the ddx from git and rebuild it -- as you likely know, glamor is enabled by default as of most recently.

        Best of luck.

        Comment


        • #5
          I pulled mesa, xf86-ati, kernel, libdrm and glamor from the git today so it shouldnt be an issue.
          May be xorg or something or the radeon driver itself.

          Comment


          • #6
            Sorted it out. I dont know the exact reson for the problem but i did 2 things at once: rebuilt everything (mesa, glamor, xf86-ati) and i deleted some unused libraries from the /usr/lib/xorg/modules/ folder - it seems that i left some stuff there when i compiled mesa with different options - the xaa.so and ati_, radeon_drv .so files. Maybe those interfered or something.

            Anyway, it is working now.

            Code:
            $ cat /var/log/Xorg.0.log | grep -i glamor
            [ 16026.071] (II) LoadModule: "glamoregl"
            [ 16026.071] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
            [ 16026.109] (II) Module glamoregl: vendor="X.Org Foundation"
            [ 16026.127] (**) RADEON(0): Option "AccelMethod" "glamor"
            [ 16026.128] (II) Loading sub module "glamoregl"
            [ 16026.128] (II) LoadModule: "glamoregl"
            [ 16026.128] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
            [ 16026.128] (II) Module glamoregl: vendor="X.Org Foundation"
            [ 16026.128] (II) glamor: OpenGL accelerated X.org driver based.
            [ 16026.190] (II) glamor: EGL version 1.4 (DRI2):
            [ 16026.202] (II) RADEON(0): glamor detected, initialising EGL layer.
            [ 16026.812] (II) RADEON(0): Use GLAMOR acceleration.
            As for the quality of it, im not quite impressed yet.

            The first thing i noticed is that half of my icons in the system tray were invisible (but taking up space and could be interacted with).
            I have activated the Xfce software compositing and most came back, except the ones i put there with alltray.
            This has the side effect of slight tearing when dragging terminals around and introducing a slight sluggishness for all dragging operations.

            Second, flash player stopped working if i had "use acceleration" ticked. This worked well before, but even if i restarted x with exa subsequently, i still have this issue. Anyway this is not that important for me as it does work with slight tearing using software rendering and i dont need it for hd content (youtube can be played in virtually all proper video players).

            Comment


            • #7
              Hm. Interesting stuff:

              - I had an issue of the whole system freezing randomly usually after a few hours of usage ever since i used radeon with dpm. After i enabled glamor, i didnt have this issue, my computer ran for 2 days and 16 hours or so without problems (did just about everything i do usually - browse, watch movies with vdpau, play games). I restarted X with exa rendering and the computer froze hard within minutes. Anyway, this needs futher investigation, but its interesting find nonetheless.

              - If X crashes when enabling glamor check the /var/log/Xorg.0.log file and at the bottom you will see a list of the libraries loaded.
              I had an update on my system that installed the libegl1-mesa-drivers package that contained the /usr/lib/x86_64-linux-gnu/egl/egl_gallium.so file (along with some wayland libs). X wanted to load this file first and it seems it conflicted with my self compiled mesa (9.3 devel from git, whereas the mesa on the system is by default 9.1.6) resulting in X crashing. I removed this library (as it wasnt there before anyway and glamor worked) and X started as usual.

              Edit:
              either the above or compile mesa with --enable-gallium-egl, that will create that library (my system library was 8.2 MB, my compiled one 28 MB...). Not sure it helps anything.

              Regarding glamor vs exa - exa is better for now. Moving windows around is smoother, i get to see all my icons in the system tray etc...
              Last edited by gradinaruvasile; 28 September 2013, 07:41 PM.

              Comment


              • #8
                Originally posted by gradinaruvasile View Post
                Hm. Interesting stuff:

                - I had an issue of the whole system freezing randomly usually after a few hours of usage ever since i used radeon with dpm. After i enabled glamor, i didnt have this issue, my computer ran for 2 days and 16 hours or so without problems (did just about everything i do usually - browse, watch movies with vdpau, play games). I restarted X with exa rendering and the computer froze hard within minutes. Anyway, this needs futher investigation, but its interesting find nonetheless.
                Haven't had a single freeze or restart with my A10 6800 since I run 3.12

                Comment


                • #9
                  Originally posted by ObiWan View Post
                  Haven't had a single freeze or restart with my A10 6800 since I run 3.12
                  I had this freezing issue ever since i use radeon with dpm, around 3.11 rc2 or something (wrote about it here on the forum). And it seems it still happens, if i use the default EXA acceleration. I tried countless kernel compile config and boot options, patches from radeon devs to no avail (although they might have helped as the current build of my kernel incorporates patches not yet in mainline).

                  I tried glamor out of curiosity to see if hardware accelerated everything is faster/better (its NOT, its actually worse than the software based EXA) and i was baffled by the lack of freezes - i wasnt expecting this "side effect". Seems im stuck with glamor whether i like it or not...

                  I have a first gen Trinity chip (A8-5500) so YMMW. Also, it might be that the specific mobo i use (Gigabyte F2A85X-D3H) is acting differently (BIOSes sometimes have their specific bugs etc). I exclude hardware issues since fglrx had no issues and now with radeon/glamor seems stable too.

                  Comment


                  • #10
                    And I had freezes and restarts with every dpm kernel until 3.12 rc1. With my old ASRock board and with the GigaByte (F2A85XM-D3H).

                    Comment

                    Working...
                    X