Announcement

Collapse
No announcement yet.

Running radeonsi on Ubuntu 13.04

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

  • Zgembo
    replied
    Thanks for packaging glamor! Works great on raring, without messing up the system too much.
    BTW, I tested compiled packages from sources at your ppa on Quantal (+mesa from xorg-edgers) and it also worked great. Thanks indeed!
    You should consider talking to xorg-edgers people about integrating glamor...

    Leave a comment:


  • Cybjit
    replied
    ppa

    Seems my previous post did not go trough.

    Anyway, I have made a ppa (ppa:cybjit/ppa-glamor) with glamor packaged, and a glamor enabled xserver-xorg-video-ati. Works with stock raring mesa 9.1.

    I cherry picked some patches from xf86-video-ati git, so configuring xorg.conf should not be necessary on SI hardware.

    Leave a comment:


  • Cybjit
    replied
    ppa

    Now that mesa 9.1 is finally in raring, it is not necessary to compile mesa, even if 9.2 is probably better for radeonsi.
    --enable-gbm was probably never needed, as it is already enabled by dependencies.

    That leaves installing glamor, recompiling xserver-xorg-video-ati with glamor, and configuring xorg.conf

    I have made a stab at packaging this at https://launchpad.net/~cybjit/+archive/ppa-glamor/.
    After installing xserver-xorg-video-glamor and upgrading xserver-xorg-video-radeon, only configuring xorg.conf should be needed.

    Leave a comment:


  • Zgembo
    replied
    Yes, but that commit is not yet included in a xorg/driver/xf86-video-ati version available at xorg-edgers.
    They are at git 3e5350be, from 20130315, and the commit you mention arrived 10 days later...
    Last edited by Zgembo; 07 April 2013, 04:04 AM.

    Leave a comment:


  • ChrisXY
    replied
    Originally posted by Zgembo View Post
    Finally, all left to be done is a manual change of xorg.conf
    Code:
    [ -f /etc/xorg.conf ] && sudo cp /etc/xorg.conf /etc/xorg.conf.BACKUP.$(date -Iseconds)
    TAB="$(printf '\t')"
    sudo bash -c "cat > /etc/xorg.conf" << EOF
    Section "Module"
    ${TAB}Load "dri2"
    ${TAB}Load "glamoregl"
    EndSection
    
    Section "Device"
    ${TAB}Identifier "ati"
    ${TAB}Driver "ati"
    ${TAB}Option "AccelMethod" "glamor"
    EndSection
    EOF
    I don't think this is needed after http://cgit.freedesktop.org/xorg/dri...9ec50ef3b769f1

    Leave a comment:


  • Vincenzov
    replied
    Hello, I tried to install the radeon 7750, nothing works and the PC consumes 40 watts more.
    I just wanted to know why not add support for the series radeonsi Ubuntu 13.04.

    Leave a comment:


  • Zgembo
    replied
    radeonsi driver Ubuntu 12.10 and 13.04

    Since the recent refresh of xorg-edgers repositories, it has become much easier to compile the necessary
    mesa support without the need fro llvm3.3. Here is a recipe for easy enabling radeonsi,
    tested working on both Ubuntu 12.10 & 13.04. This can be easily made into install script,
    feel free to do it at your own convenience.

    First, we need to temporarily enable xorg-edgers repo, just to retrieve the sources & some dev tools and libs
    Code:
    sudo apt-get -y install build-essential git xutils-dev xorg-dev
    mkdir radeonsi
    cd radeonsi
    sudo add-apt-repository -y -s ppa:xorg-edgers/ppa
    sudo apt-get update
    apt-get source mesa
    apt-get source xserver-xorg-video-ati
    sudo apt-get -y build-dep mesa
    sudo apt-get -y install mesa-utils
    sudo add-apt-repository -r -y ppa:xorg-edgers/ppa
    sudo apt-get update
    Next, we compile mesa, with gbm support enabled (this will take some time)
    Code:
    JOBS=$(cat /proc/cpuinfo | grep ^processor | tail -n1 | awk '{ print $3 }')
    ARCH=$([ "$(uname -m)" != "x86_64" ] && echo "i386" || echo "amd64")
    MESAREVISION=$(ls -d mesa*/ | grep -o "9.[0-9].[0-9]~git[a-z0-9.+]*")
    MESAPPAREVISION=$(ls mesa_$MESAREVISION*.dsc | grep -o "\-[0-9]ubuntu[0-9][a-z]*[~_a-z3864]*")
    MESAPKGSUFFIX=${MESAREVISION}${MESAPPAREVISION}_${ARCH}.deb
    ATIDRVREVISION=$(ls -d xserver-xorg-video-ati*/ | grep -o "[\.0-9]*+git[a-z0-9.]*")
    ATIDRVPPAREVISION=$(ls xserver-xorg-video-ati_$ATIDRVREVISION*.dsc | grep -o "\-[0-9]ubuntu[0-9][a-z]*[~_a-z3864]*")
    ATIDRVPKGSUFFIX=${ATIDRVREVISION}${ATIDRVPPAREVISION}_${ARCH}.deb
    cd mesa-$MESAREVISION
    sed -i 's|../../configure --prefix=/usr|../../configure --enable-gbm --prefix=/usr|' debian/rules
    time dpkg-buildpackage -b -j$JOBS
    cd ..
    Next, assuming the mesa compilation was successful, we install mesa packages
    Code:
    sudo dpkg -i libegl1-mesa_$MESAPKGSUFFIX libegl1-mesa-dev_$MESAPKGSUFFIX \
                 libegl1-mesa-drivers_$MESAPKGSUFFIX libgbm1_$MESAPKGSUFFIX \
                 libgbm-dev_$MESAPKGSUFFIX libgl1-mesa-dev_$MESAPKGSUFFIX \
                 libgl1-mesa-dri_$MESAPKGSUFFIX libgl1-mesa-dri-experimental_$MESAPKGSUFFIX \
                 libgl1-mesa-glx_$MESAPKGSUFFIX libglapi-mesa_$MESAPKGSUFFIX \
                 libgles1-mesa_$MESAPKGSUFFIX libgles1-mesa-dev_$MESAPKGSUFFIX \
                 libgles2-mesa_$MESAPKGSUFFIX libgles2-mesa-dev_$MESAPKGSUFFIX \
                 mesa-common-dev_$MESAPKGSUFFIX libosmesa6_$MESAPKGSUFFIX \
                 libosmesa6-dev_$MESAPKGSUFFIX libxatracker1_$MESAPKGSUFFIX \
                 libxatracker-dev_$MESAPKGSUFFIX libopenvg1-mesa_$MESAPKGSUFFIX \
                 libopenvg1-mesa-dev_$MESAPKGSUFFIX
    Next, time to compile and install glamor. Unfortunately, this will not be packaged into a deb, manuall install is nedeed
    Code:
    git clone git://anongit.freedesktop.org/git/xorg/driver/glamor
    cd glamor
    ./autogen.sh --enable-glx-tls --prefix=/usr
    make -j$JOBS
    sudo make install
    cd ..
    Almost there, time to compile and install ati/radeon driver for X
    Code:
    sudo apt-get -y build-dep xserver-xorg-video-ati
    cd xserver-xorg-video-ati-$ATIDRVREVISION
    sed -i 's|\(XXV=xserver-xorg-video\)|\1\n\noverride_dh_auto_configure:\n\tdh_auto_configure -- --enable-glamor|' debian/rules
    sed -i 's|dh_shlibdeps -- --warnings=6|dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info|' debian/rules
    time dpkg-buildpackage -b -j$JOBS
    cd ..
    sudo dpkg -i xserver-xorg-video-ati_$ATIDRVPKGSUFFIX xserver-xorg-video-radeon_$ATIDRVPKGSUFFIX

    Finally, all left to be done is a manual change of xorg.conf
    Code:
    [ -f /etc/xorg.conf ] && sudo cp /etc/xorg.conf /etc/xorg.conf.BACKUP.$(date -Iseconds)
    TAB="$(printf '\t')"
    sudo bash -c "cat > /etc/xorg.conf" << EOF
    Section "Module"
    ${TAB}Load "dri2"
    ${TAB}Load "glamoregl"
    EndSection
    
    Section "Device"
    ${TAB}Identifier "ati"
    ${TAB}Driver "ati"
    ${TAB}Option "AccelMethod" "glamor"
    EndSection
    EOF
    Now, if only somebody with the proper authority can convince xorg-edgers into adding --enable-gbm switch into mesa, this would be way more easier to do...
    BTW, anyone heard of glamor deb package?
    Last edited by Zgembo; 07 April 2013, 03:16 AM. Reason: added missing code...

    Leave a comment:


  • Cybjit
    replied
    Yes, I am using xserver-xorg-core 2:1.13.2-0ubuntu3 now. But I have also upgraded other packages (LLVM git, Mesa git, Linux git), since some crashing bugs are gone with them.

    I have not tried using prime.

    Leave a comment:


  • ChrisXY
    replied
    Did you actually have luck in trying it? I tried prime with it and it looks good so far, X.Org X Server 1.14.0, xf86-video-intel with uxa, xf86-video-ati compiled with glamor

    Code:
     ~ % xrandr --listproviders
    Providers: number : 2
    Provider 0: id: 0x70 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 8 associated providers: 0 name:Intel
    Provider 1: id: 0x45 cap: 0xd, Source Output, Source Offload, Sink Offload crtcs: 6 outputs: 0 associated providers: 0 name:radeon
     ~ % xrandr --setprovideroffloadsink 1 0
     ~ % DRI_PRIME=0 glxinfo | grep OpenGL
    OpenGL vendor string: Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
    OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2-devel (git-11b8df0)
      OpenGL core profile shading language version string: 1.40
      OpenGL core profile context flags: (none)
      OpenGL core profile extensions:
      OpenGL version string: 3.0 Mesa 9.2-devel (git-11b8df0)
      OpenGL shading language version string: 1.30
      OpenGL context flags: (none)
      OpenGL extensions:
    But as soon as I do "DRI_PRIME=1 glxinfo" X segfaults
    Code:
    [  5449.109] (EE) Backtrace:
    [  5449.112] (EE) 0: /usr/bin/X (xorg_backtrace+0x36) [0x589a36]
    [  5449.112] (EE) 1: /usr/bin/X (0x400000+0x18d849) [0x58d849]
    [  5449.112] (EE) 2: /usr/lib/libpthread.so.0 (0x7f7193af7000+0xf1e0) [0x7f7193b061e0]
    [  5449.112] (EE) 3: /usr/bin/X (0x400000+0x15a46b) [0x55a46b]
    [  5449.112] (EE) 4: /usr/bin/X (DRI2Connect+0x77) [0x55c317]
    [  5449.112] (EE) 5: /usr/bin/X (0x400000+0x15d4d4) [0x55d4d4]
    [  5449.112] (EE) 6: /usr/bin/X (0x400000+0x37d46) [0x437d46]
    [  5449.113] (EE) 7: /usr/bin/X (0x400000+0x2680a) [0x42680a]
    [  5449.113] (EE) 8: /usr/lib/libc.so.6 (__libc_start_main+0xf5) [0x7f7192983a15]
    [  5449.113] (EE) 9: /usr/bin/X (0x400000+0x26b4d) [0x426b4d]
    [  5449.113] (EE)
    [  5449.113] (EE) Segmentation fault at address 0x28
    As far as I know this is because prime needs acceleration, i.e. glamor and there is no error reporting for a case where it doesn't work yet.

    I even tried "LD_PRELOAD=/usr/lib/xorg/modules/libglamor.so X :1" but I only got "sh: symbol lookup error: /usr/lib/xorg/modules/libglamor.so: undefined symbol: serverClient"
    Last edited by ChrisXY; 11 March 2013, 06:32 PM.

    Leave a comment:


  • Cybjit
    replied
    Well, that was a lot of unnecessary work: http://lists.x.org/archives/xorg-dev...ch/035721.html.
    It did not even occur to me to try the stock xorg-server, as the Glamor page says it would be unreliable with 1.13+, http://www.freedesktop.org/wiki/Software/Glamor.

    I guess step 1, 2 and 6 are unnecessary.

    Leave a comment:

Working...
X