Category Archives: ATI

Dual GPU notebook configuration Intel + AMD/ATI

Add catalyst + xorg114 pacman repos to your /etc/pacman.conf:

[catalyst]
Server = http://catalyst.wirephire.com/repo/catalyst/$arch
 
[xorg114]
Server = http://catalyst.wirephire.com/repo/xorg114/$arch

Install required xorg server and driver packages:

xorg114/xorg-server
 
catalyst/catalyst-hook
catalyst/catalyst-utils-pxp
catalyst/lib32-catalyst-utils-pxp
 
xorg114/xf86-video-intel
extra/intel-dri
multilib/lib32-intel-dri

Create /etc/X11/xorg.conf using aticonfig –initial

Section "ServerLayout"
        Identifier     "aticonfig Layout"
        Screen      0  "aticonfig-Screen[0]-0" 0 0
EndSection
 
Section "Module"
EndSection
 
Section "Monitor"
        Identifier   "aticonfig-Monitor[0]-0"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection
 
Section "Device"
        Identifier  "aticonfig-Device[0]-0"
        Driver      "fglrx"
        BusID       "PCI:1:0:0"
EndSection
 
Section "Screen"
        Identifier "aticonfig-Screen[0]-0"
        Device     "aticonfig-Device[0]-0"
        Monitor    "aticonfig-Monitor[0]-0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Switch gpu using the AMD tool: amdcccle

Direct rendering works: glxinfo | grep direct

direct rendering: Yes
[...]

 

If glxgears / glxinfo gives errors like:

libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.

… set the catalyst libGL path:

export LIBGL_DRIVERS_PATH=/usr/lib/catalystpxp/fglrx/
export LD_PRELOAD=/usr/lib/catalystpxp/fglrx/fglrx-libGL.so.1.2

OpenCL works: clinfo

Number of platforms:                             1
  Platform Profile:                              FULL_PROFILE
  Platform Version:                              OpenCL 1.2 AMD-APP (1348.4)
  Platform Name:                                 AMD Accelerated Parallel Processing
  Platform Vendor:                               Advanced Micro Devices, Inc.
  Platform Extensions:                           cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
 
  Platform Name:                                 AMD Accelerated Parallel Processing
Number of devices:                               2
  Device Type:                                   CL_DEVICE_TYPE_GPU
  Device ID:                                     4098
  Board name:                                    AMD Radeon HD 8600/8700M
  Device Topology:                               PCI[ B#1, D#0, F#0 ]
  Max compute units:                             6
  Max work items dimensions:                     3
    Max work items[0]:                           256
    Max work items[1]:                           256
    Max work items[2]:                           256
  Max work group size:                           256
  Preferred vector width char:                   4
  Preferred vector width short:                  2
  Preferred vector width int:                    1
  Preferred vector width long:                   1
  Preferred vector width float:                  1
  Preferred vector width double:                 1
  Native vector width char:                      4
  Native vector width short:                     2
  Native vector width int:                       1
  Native vector width long:                      1
  Native vector width float:                     1
  Native vector width double:                    1
  Max clock frequency:                           825Mhz
  Address bits:                                  32
  Max memory allocation:                         1073741824
  Image support:                                 Yes
  Max number of images read arguments:           128
  Max number of images write arguments:          8
  Max image 2D width:                            16384
  Max image 2D height:                           16384
  Max image 3D width:                            2048
  Max image 3D height:                           2048
  Max image 3D depth:                            2048
  Max samplers within kernel:                    16
  Max size of kernel argument:                   1024
  Alignment (bits) of base address:              2048
  Minimum alignment (bytes) for any datatype:    128
  Single precision floating point capability
    Denorms:                                     No
    Quiet NaNs:                                  Yes
    Round to nearest even:                       Yes
    Round to zero:                               Yes
    Round to +ve and infinity:                   Yes
    IEEE754-2008 fused multiply-add:             Yes
  Cache type:                                    Read/Write
  Cache line size:                               64
  Cache size:                                    16384
  Global memory size:                            2009071616
  Constant buffer size:                          65536
  Max number of constant args:                   8
  Local memory type:                             Scratchpad
  Local memory size:                             32768
  Kernel Preferred work group size multiple:     64
  Error correction support:                      0
  Unified memory for Host and Device:            0
  Profiling timer resolution:                    1
  Device endianess:                              Little
  Available:                                     Yes
  Compiler available:                            Yes
  Execution capabilities:                                
    Execute OpenCL kernels:                      Yes
    Execute native function:                     No
  Queue properties:                              
    Out-of-Order:                                No
    Profiling :                                  Yes
  Platform ID:                                   0x00007f33cbfb54c0
  Name:                                          Oland
  Vendor:                                        Advanced Micro Devices, Inc.
  Device OpenCL C version:                       OpenCL C 1.2 
  Driver version:                                1348.4 (VM)
  Profile:                                       FULL_PROFILE
  Version:                                       OpenCL 1.2 AMD-APP (1348.4)
  Extensions:                                    cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt cl_khr_image2d_from_buffer

DOGE mining also works with cgminer-gpu from AUR with 55Kh/s at intensity 10:

cgminer version 3.7.2 - Started: [2014-01-16 18:39:45]
--------------------------------------------------------------------------------
 (5s):54.25K (avg):48.66Kh/s | A:64  R:0  HW:0  WU:42.1/m
 ST: 2  SS: 0  NB: 3  LW: 19  GF: 0  RF: 0
 Connected to xxx diff 16 with stratum as user xxx
 Block: daa10059...  Diff:505  Started: [18:39:58]  Best share: 97
--------------------------------------------------------------------------------
 [P]ool management [G]PU management [S]ettings [D]isplay options [Q]uit
 GPU 0:                | 54.25K/48.66Kh/s | A:64 R:0 HW:0 WU: 42.1/m I:10
--------------------------------------------------------------------------------
 
 [2014-01-16 18:39:44] Started cgminer 3.7.2
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

AMD OpenCL on arch linux

 
Due to an old AMD Radeon HD 4890 graphics card, I was forced to use the additional repos xorg112 and catalyst-hd234k to get a working AMD legacy fglrx / X server duo. Till now, clinfo runs fine. However, in order to compile OpenCL applications I installed the amdapp-sdk package from AUR. Afterwards, clinfo and every other OpenCL binary segfaulted instantaneously due to mixed OpenCL versions. Replacing /opt/AMDAPP/SDK/lib/libamdocl64.so with /usr/lib/libamdocl64.so solved this issue.

catalyst-utils: /usr/lib/libamdocl64.so
amdapp-sdk: /opt/AMDAPP/SDK/lib/libamdocl64.so

The GPU load can be monitored using the following command:

aticonfig --adapter=0 --od-getclocks
VN:F [1.9.22_1171]
Rating: 6.0/10 (1 vote cast)

KMS for Radeon HD 3200 (RS780)

With 2.6.32 it’s now also possible for r6xx/r7xx radeon cards to use kernel based mode switching.

First you have to emerge a 2.6.32 kernel:

doep ~ # emerge -av vanilla-sources

After oldconfig let’s enable “staging drivers” and “Enable modesetting on radeon by default (NEW)” in the device drivers section. And don’t forget to remove any framebuffer. You have also to remove the framebuffer boot options in your boot loader config. Then compile the kernel and boot it without vesa command line options. If you have an AGP card it’s a good idea to add this boot option: radeon.agpmode=-1

hmm.. kms works, so I have an resolution of 1920×1200 px while booting, but when my X starts, the screen is completely white. On my notebook kms works fine with a rv350 chip.

I had to use the radeon drivers: x11-drivers/xf86-video-ati to get it working.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Setup 3D support for Radeon HD 3200 (RS780)

What to do with an ATI graphic card ? Using proprietary fglrx drivers and use old kernels. Btw. they didn’t work for me, I had some strange stripes on my screen.. Or use the open source drivers radeon, radeonhd but without 3D acceleration ? Since 2.6.31 you can solve this problem using unstable drivers.

Here are all the steps I had to do to get working 2D/3D acceleration with open source video drivers. I’m using a 2.6.31 vanilla kernel. The 2.6.32 supports also kms for r6xx/r7xx but it’s not yet in my portage :/

doep ~ # emerge -av  =vanilla-sources-2.6.31.1
and then the other stuff..

My xorg-server version is 1.6.3.901. After booting the kernel and installing the modules I reinstalled x11-drivers/xf86-video-radeonhd, media-libs/mesa and x11-libs/libdrm.

doep ~ # emerge -av x11-libs/libdrm media-libs/mesa x11-drivers/xf86-video-radeonhd
[ebuild   R   ] x11-libs/libdrm-9999  USE="-debug" 0 kB [1]
[ebuild   R   ] x11-drivers/xf86-video-radeonhd-9999  USE="-debug" 0 kB [2]
[ebuild   R   ] media-libs/mesa-9999  USE="nptl xcb -debug -gallium -motif -pic"
VIDEO_CARDS="radeonhd -intel -mach64 -mga -none -nouveau -r128 -radeon -s3virge -savage
-sis (-sunffb) -tdfx -trident -via" 0 kB [1]

Total: 3 packages (3 reinstalls), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage/layman/x11
 [2] /usr/local/portage/layman/zen-overlay

Of course you need some portage overlays to get the newest git sources. Then I followed the guide from the xorg wiki:

doep ~ # git clone git://anongit.freedesktop.org/~agd5f/drmdoep ~ # cd drm
doep ~ # git checkout -t -b r6xx-r7xx-3d origin/r6xx-r7xx-3d
doep ~ # ./autogen.sh --prefix=$(pkg-config --variable=prefix libdrm) --libdir=$(pkg-config
--variable=libdir libdrm) --includedir=$(pkg-config --variable=includedir libdrm)
doep ~ # make
doep ~ # make installdoep ~ # cd linux-core
doep ~ # make
doep ~ # make install

After stopping the X server, unloading the old modules: radeon and drm, I start the X with the new modules and the following config:

Section "Device"
 Option     "NoAccel"    "False"
 Option     "AccelMethod"    "exa"
 Option     "DRI"        "True"

 Identifier  "Card0"
 Driver      "radeonhd"
 VendorName  "ATI Technologies Inc"
 BoardName   "Radeon HD 3200 Graphics"
 BusID       "PCI:1:5:0"
EndSection

Some test: direct rendering is enabled

doep ~ # glxinfo | grep direct
IRQ's not enabled, falling back to busy waits: 2 0
direct rendering: Yes

and glxgears gets over 800 fps

doep ~ # glxgears
IRQ's not enabled, falling back to busy waits: 2 0
4179 frames in 5.0 seconds = 835.678 FPS

Now xv is working and I can play games like quake3, supertux, supertuxkart without problems 😀

VN:F [1.9.22_1171]
Rating: 5.0/10 (1 vote cast)