You are not logged in.

#5676 2013-09-05 07:36:27

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 874

Re: The AMD/ATI Bar & Grill

ChemBro wrote:

By now with the new shiny "shader backend" in Mesa 9.2 (needs to be enabled, is enabled in Mesa 9.3) and with radeon's dpm in Kernel 3.11, everyone with a legacy driver should switch to the open-source drivers. The performance should be on a par or better now. Also Kernel 3.12 will, i think, let you switch off your second (radeon) video card, if not needed, or so.

Only thing missing for older cards is full OpenGL 3.2/3.3 support (the HD4xxx cards don't support OpenGL 4.x anyway).

If it wasn't for broken functionality in KDE 4.11, I would never have left Catalyst. It always worked like a charm for me, maybe I'm a lucky soul but I've used it since 2009 with very little issues, mostly thanks to the great work done by Kensai in setting up the Catalyst repo and then Vi0l0 which put it on steroids. Apart from compatibility with kernels and xorg servers, I believe that the free driver is not superior to Catalyst in any aspect, at least according to my very limited experience with open source driver. Also, I'm experiencing random freezes at boot with the open driver but I think they may be related either to youth problems of the 3.11 kernel or to some misconfigured options; suspend and resume doesn't work as well, but I tested only once and it may be fixed with some future kernel release. I don't care about OpenGL, the only missing feature that may interest me is audio over HDMI but it's already in place and has only to be activated with a kernel command line parameter.

Offline

#5677 2013-09-05 16:27:42

arvidsson
Member
From: Sweden
Registered: 2013-08-26
Posts: 6

Re: The AMD/ATI Bar & Grill

Just wanna ask, I have a ATI 7600M in my laptop. Before I tried ati-dri, but the system runs so hot! So I gave Catalyst a go a few months ago, and runs way cooler.

But, since things improves and changes all the time. Is it worth changing back to ati-tri (radeon), or stick to Catalyst? Run 13.8 with no problems at the moment.

Offline

#5678 2013-09-05 16:33:33

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 874

Re: The AMD/ATI Bar & Grill

arvidsson wrote:

Just wanna ask, I have a ATI 7600M in my laptop. Before I tried ati-dri, but the system runs so hot! So I gave Catalyst a go a few months ago, and runs way cooler.

But, since things improves and changes all the time. Is it worth changing back to ati-tri (radeon), or stick to Catalyst? Run 13.8 with no problems at the moment.

As I said above I just switched to open driver, but I would not recommend you to do the same. Your card is still supported by the mainline catalyst, and with open driver I'm facing problems as random freezes at boot and bad resume from suspend. But my card is different so the situation with yours may be a different story. Try it if you have a hour to spend in installing linux 3.11 from testing, purging all the catalyst stuff from your system and configure it for KMS and DPM... at least it's funny smile

Offline

#5679 2013-09-05 16:46:12

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: The AMD/ATI Bar & Grill

I would wait at least until 3.11 hits [core]; it's too much of a hassle first removing Catalyst, upgrading to [testing], installing radeon and if needed, reverting all this again.

I must add that radeon in combination with 3.11 is a sweet-spot for me. I'm not experiencing what snack is and I'm getting the same temps as I did with Catalyst.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#5680 2013-09-05 16:52:37

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 874

Re: The AMD/ATI Bar & Grill

Unia wrote:

I must add that radeon in combination with 3.11 is a sweet-spot for me. I'm not experiencing what snack is and I'm getting the same temps as I did with Catalyst.

Maybe my problems are due to kernel 3.11 and not open driver. It's difficult to say since they cannot be disentangled if one wants DPM. Maybe I'll experiment a bit by downgrading the kernel and disabling DPM to see what happens. Anyway I confirm what Unia says: temperatures are as low as with catalyst.

Offline

#5681 2013-09-06 21:23:06

maroid
Member
Registered: 2013-05-11
Posts: 14

Re: The AMD/ATI Bar & Grill

Hey guys, i want to share some observations i made:

Catalyst 13.4 works without any problems. Many month (since April wink ) I thought catalyst 13.4 is unusable due to extreme mouse lag. But today i found out all steam games (and i have most wink) do actually work nicely!
- Turn ON Vertical sync (especially for Valve's Source games) to get rid of the horrible mouse lag.
- Unity games (Kerbal Space Program, Sir Youre Being Hunted...): Turn OFF Vertical sync for better performance!
- Turn OFF motion blurr and Antialising at first when bad performing (has huge impact)
- When available: Turn ON raw mouse input
- Euro Truck Simulator 2: Start with -mm_pool_size 1200 (As long as you got 8gig ram)
- Red Orchestra 2: Delete ~/.redorchestra folder!
- Shatter: Delete its config dir as well (forgot path, sry)
- X-Plane 10: Start it with --no-pinned or clouds will flicker and drop your fps-
- Blender, crash when quitting: $> LIBGL_ALWAYS_INDIRECT=1 blender 

All games do work very well with AMD A10-5800K (not overclocked). I use xorg-server-1.12 and kernel-3.11.
I'm not a gamer, i don't even like most games. But guys! Euro Truck Simulator or the Half Life 2 Episode 1/2, Wargame... they just do look nice (HDR enabled)! Never believed this will ever run on Linux natively.
Perhaps all this is not new for you, but i didn't know that and i was persuaded of catalyst-13.4 was completely broken.

Only game refusing to start is Anomaly 1. People say Humble store version is ok but i'm too lazy to try it out.

To sum it up: 13.4 much better than all the beta drivers together regarding performance and bugs - i can almost say: I'm happy with it.

Last edited by maroid (2013-09-07 13:35:09)

Offline

#5682 2013-09-08 12:48:39

Zamajalo
Member
From: Belgrade, Serbia
Registered: 2013-08-26
Posts: 17

Re: The AMD/ATI Bar & Grill

For everyone having problems with screen backlight, I made a Python script which controls screen backlight with ACPI and aticonfig.
Solution with manual echoing to acpi_video0/brightness is not working for me, so I had to do this way.

Backlight control script can be found here, and example of ACPI handler.sh can be found here.

Script is written and tested on ASUS K73BR with Raden HD 7470M, using catalyst 13.8. I'm using XFCE as DE.


Using Arch Linux x86-64 (linux-ck-bobcat kernel) on AMD based laptop with HD 7400 series GPU.

dd if=/dev/null of=/dev/everything

Offline

#5683 2013-09-08 19:03:08

Vi0L0
Member
From: Poland
Registered: 2009-06-24
Posts: 1,349
Website

Re: The AMD/ATI Bar & Grill

snack "Et tu, Brute?" ;P
naaah, just kidding, it was and is very good to have you here cool. BTW Kensai did more - he was the maintainer and one of ancient creators of the catalyst' PKGBUILD (+ was the author of Arch Linux Newsletter, remember?), while repo was actually my idea - it now has mirrors but then it was starting on some sharing sites and dropbox :>

Your move to switch to oss drivers was good and rational. In fact I believe that everybody (well maybe except hardcore steam players / opencl users, but this exception should only be temporary) should to check out 3.11 kernel (either after it will appear in core or by downloading a couple of packages like linux linux-headers linux-firmware from testing, you don't actually need to jump to testing repo) and the newest radeon/mesa drivers.


Now something different, a workaround to the "so called 30 fps or tear-free bug" present in catalyst >= 13.6, found by M132 here:

I JUST FOUND THE FIX!

1. Enable Tear-Free, it will set 3D V-Sync option to Always on.
2. Set 3D V-Sync to Always Off.
3. Make sure Tear-Free is still on.
4. Restart X / Re-login.

AND ENJOY 60 FPS DESKTOP WITHOUT TEARING big_smile

The only weird thing I found is:

2751 frames in 5.0 seconds = 550.097 FPS
2806 frames in 5.0 seconds = 561.184 FPS
2770 frames in 5.0 seconds = 553.987 FPS

While running glxgears

Yeah, it's working very well here on KDE 4.11 (feel free to also disable KDE's v-sync)

In case of problems M132 found workaround to workaround:

Unfortunately, the fix I posted before seems to work only with Compiz. If you still experience V-Sync problems try disabling "Detect refresh rate" and specify monitor's refresh rate in Composite plugin.

Offline

#5684 2013-09-08 19:44:03

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: The AMD/ATI Bar & Grill

For the Awesome WM users using the great fix mentioned above, I got rid of the hangs when switching tags by using the --no-argb flag as mentioned here.

Offline

#5685 2013-09-09 07:56:38

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 874

Re: The AMD/ATI Bar & Grill

Vi0L0 wrote:

snack "Et tu, Brute?" ;P

Man, I'm back... I told you I love you people from the AMD bar&grill wink
More seriously, r6xx asics like my Mobile HD3470 has still serious bugs with DPM, I am able to boot ~50% of the times and often the windows are extremely laggy:

https://bugs.freedesktop.org/show_bug.cgi?id=66963

I reverted to Catalyst legacy yesterday. I strongly advice people to follow the bug report and wait for the fix before jumping on the OSS wagon.

Last edited by snack (2013-09-09 07:58:26)

Offline

#5686 2013-09-09 11:19:43

32reg
Member
Registered: 2012-08-06
Posts: 24

Re: The AMD/ATI Bar & Grill

Hi, all.
After update to kde 4.11 kwin effects stop working.
My card: ATI HD 4870, driver: catalyst-12.8 from VIOLO's repo.

uname -a
Linux localhost 3.10.10-1-ARCH #1 SMP PREEMPT Fri Aug 30 11:30:06 CEST 2013 x86_64 GNU/Linux
glxinfo | grep -i render
direct rendering: Yes
OpenGL renderer string: ATI Radeon HD 4800 Series        
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image, 
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image,

What happend?
Help me please with this problem.

Offline

#5687 2013-09-09 11:20:55

ChemBro
Member
Registered: 2008-10-22
Posts: 704

Re: The AMD/ATI Bar & Grill

snack wrote:

I reverted to Catalyst legacy yesterday. I strongly advice people to follow the bug report and wait for the fix before jumping on the OSS wagon.

You mean on the "dpm" wagon.

Offline

#5688 2013-09-09 11:55:23

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 874

Re: The AMD/ATI Bar & Grill

32reg wrote:

Hi, all.
After update to kde 4.11 kwin effects stop working.
My card: ATI HD 4870, driver: catalyst-12.8 from VIOLO's repo.

uname -a
Linux localhost 3.10.10-1-ARCH #1 SMP PREEMPT Fri Aug 30 11:30:06 CEST 2013 x86_64 GNU/Linux
glxinfo | grep -i render
direct rendering: Yes
OpenGL renderer string: ATI Radeon HD 4800 Series        
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image, 
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image,

What happend?
Help me please with this problem.

https://plus.google.com/115606635748721 … hma7898wfx

Offline

#5689 2013-09-09 11:56:55

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 874

Re: The AMD/ATI Bar & Grill

ChemBro wrote:
snack wrote:

I reverted to Catalyst legacy yesterday. I strongly advice people to follow the bug report and wait for the fix before jumping on the OSS wagon.

You mean on the "dpm" wagon.

I mean OSS, since without DPM the open driver is not an option for anyone who cares about temperatures and battery life.

Offline

#5690 2013-09-09 13:43:31

ChemBro
Member
Registered: 2008-10-22
Posts: 704

Re: The AMD/ATI Bar & Grill

snack wrote:
ChemBro wrote:
snack wrote:

I reverted to Catalyst legacy yesterday. I strongly advice people to follow the bug report and wait for the fix before jumping on the OSS wagon.

You mean on the "dpm" wagon.

I mean OSS, since without DPM the open driver is not an option for anyone who cares about temperatures and battery life.

So you mean "dpm" wagon for everyone, who needs to care about temperature and battery life, which means mostly laptop users. There are enough people, who use the radeon driver without having to care temperature and battery life.

Offline

#5691 2013-09-09 14:36:28

32reg
Member
Registered: 2012-08-06
Posts: 24

Re: The AMD/ATI Bar & Grill

@snack: thank you very much!!! Now all kwin effects are working again!

Offline

#5692 2013-09-10 10:06:25

Squarius
Member
From: Germany
Registered: 2012-04-11
Posts: 7

Re: The AMD/ATI Bar & Grill

ivdok wrote:
[ivdok@arch ~]$ grep '(EE)' /var/log/Xorg.0.log
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    64.371] (EE) AIGLX error: failed to open /usr/X11R6/lib/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]

How could it be? X11R6 was removed years ago from Arch. And even symlinking this to /usr/lib/xorg/modules/dri/fglrx_dri.so cannot help.

I got this Problem too. Even

 ln -s /usr/lib64/xorg/modules /usr/X11R6/lib64

did not help.


uname -a
Linux localhost 3.10.10-1-ARCH #1 SMP PREEMPT Fri Aug 30 11:30:06 CEST 2013 x86_64 GNU/Linux
glxinfo |grep -i render
direct rendering: Yes
OpenGL renderer string: AMD Radeon HD 7800 Series
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_conditional_render, 
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_conditional_render,
pacman -Q |grep catalyst
catalyst-hook 13.8-3
catalyst-utils 13.8-2
lib32-catalyst-utils 13.8-2

Offline

#5693 2013-09-10 19:29:56

darfy
Member
Registered: 2013-09-10
Posts: 1

Re: The AMD/ATI Bar & Grill

Just a quick feedback about 13.8 :

My X-Plane 10 setup is broken, both x64 and i386 edition fails to load (just before initializing OpenGL things I believe)

A reverted to catalyst-hook 13.6-3, catalyst-utils 13.6-3 and lib32-catalyst-utils 13.6-1 and it all works again.

Offline

#5694 2013-09-10 21:27:44

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: The AMD/ATI Bar & Grill

@darfy: So you're not the only one having problems with Catalyst 13.8, though yours is sounding a bit more serious.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#5695 2013-09-11 14:06:17

christov84
Member
From: West. Australia
Registered: 2013-08-27
Posts: 27

Re: The AMD/ATI Bar & Grill

fresh install today and yeah 13.8 doesnt seem to want to install with Xorg 1.14-2 sad(((((

Pacman says it cant find Xorg<1.14

Offline

#5696 2013-09-11 16:32:12

ivdok
Member
From: Abu Dhabi
Registered: 2013-07-17
Posts: 60

Re: The AMD/ATI Bar & Grill

Squarius wrote:
ivdok wrote:
[ivdok@arch ~]$ grep '(EE)' /var/log/Xorg.0.log
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    64.371] (EE) AIGLX error: failed to open /usr/X11R6/lib/modules/dri/fglrx_dri.so, error[/usr/X11R6/lib/modules/dri/fglrx_dri.so: cannot open shared object file: No such file or directory]

How could it be? X11R6 was removed years ago from Arch. And even symlinking this to /usr/lib/xorg/modules/dri/fglrx_dri.so cannot help.


fresh install today and yeah 13.8 doesnt seem to want to install with Xorg 1.14-2 sad(((((

Pacman says it cant find Xorg<1.14

I got this Problem too. Even

 ln -s /usr/lib64/xorg/modules /usr/X11R6/lib64

did not help.


uname -a
Linux localhost 3.10.10-1-ARCH #1 SMP PREEMPT Fri Aug 30 11:30:06 CEST 2013 x86_64 GNU/Linux
glxinfo |grep -i render
direct rendering: Yes
OpenGL renderer string: AMD Radeon HD 7800 Series
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_conditional_render, 
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_conditional_render,
pacman -Q |grep catalyst
catalyst-hook 13.8-3
catalyst-utils 13.8-2
lib32-catalyst-utils 13.8-2

I solved it by switching to stable branch. I hope what there would be freshier stable release in month-two or three, and then I could switch to bleeding-edge again. 13.8 does not work good AT ALL for me.

christov84 wrote:

fresh install today and yeah 13.8 doesnt seem to want to install with Xorg 1.14-2 sad(((((

Pacman says it cant find Xorg<1.14

Old dependency unfixed? Catalyst >= 13.7 works with 1.14. Witnessed it myself.

Last edited by ivdok (2013-09-11 16:32:47)

Offline

#5697 2013-09-11 20:41:01

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: The AMD/ATI Bar & Grill

christov84 wrote:

fresh install today and yeah 13.8 doesnt seem to want to install with Xorg 1.14-2 sad(((((

Pacman says it cant find Xorg<1.14

Hmm, that's strange, because I am using 13.6 with 1.14 (I had installed 13.8 with X 1.14 from Vi0L0's repo, but performance was **** because of RAM leakage)/

Last edited by clfarron4 (2013-09-11 20:41:34)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#5698 2013-09-11 21:08:48

Vi0L0
Member
From: Poland
Registered: 2009-06-24
Posts: 1,349
Website

Re: The AMD/ATI Bar & Grill

Both aur's catalyst-test* and catalyst-utils from catalyst repo have xorg-server<1.15.0, there should be no such problem

Last edited by Vi0L0 (2013-09-11 21:09:42)

Offline

#5699 2013-09-11 22:47:51

haagch
Member
Registered: 2013-08-17
Posts: 209

Re: The AMD/ATI Bar & Grill

People with hybrid intel/amd gpus might be interested in (very hacky) primus:

If you want to test it you'll need
1. primus-git (and lib32-primus-git) with that patch: https://github.com/amonakov/primus/issu … t-21398865
2. breaking some symbols in fglrx-libGL.so.1.2 and fglrx_dri.so for 64 and 32 bit each: https://github.com/amonakov/primus/issu … t-24177917
Pretty much only

for tfile in /usr/lib/xorg/modules/dri/fglrx_dri.so /usr/lib32/xorg/modules/dri/fglrx_dri.so /usr/lib/catalystpxp/fglrx/fglrx-libGL.so.1.2 /usr/lib32/catalystpxp/fglrx/fglrx-libGL.so.1.2; do
  cp $tfile ${tfile}.bak
  sed -i s/_glapi_/_glaoy_/g $tfile
done

For personal use I commented out some stuff in the catalyst-total-pxp PKGBUILD and added some symlinks:

pkgname=catalyst-total-pxp
pkgver=13.8
pkgrel=1
_amdver=13.8
pkgdesc="AMD/ATI drivers. catalyst-hook + catalyst-utils + lib32-catalyst-utils with testing powerXpress support. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED"
arch=('i686' 'x86_64')
url="http://www.amd.com"
license=('custom')
depends=('linux>=3.0' 'linux<3.12' 'linux-headers' 'xorg-server>=1.7.0' 'xorg-server<1.15.0' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'gcc>4.0.0' 'make' 'patch' 'libxinerama')
optdepends=('qt: to run ATi Catalyst Control Center (amdcccle)'
	    'libxxf86vm: to run ATi Catalyst Control Center (amdcccle)'
	    'opencl-headers: headers necessary for OpenCL development'
	    'acpid: acpi event support  / atieventsd'
	    'linux-headers: to build the fglrx module for the linux kernel'
	    'linux-lts-headers: to build the fglrx module for the linux-lts kernel')
conflicts=('catalyst-test' 'nvidia-utils' 'nvidia' 'catalyst' 'catalyst-daemon' 'catalyst-generator' 'catalyst-hook' 'catalyst-utils' 'libcl' 'catalyst-total' 'catalyst-dkms')
provides=("libatical=${pkgver}" "catalyst=${pkgver}" "catalyst-utils=${pkgver}" "catalyst-hook=${pkgver}" 'libcl' 'dri' 'libtxc_dxtn')

if [ "${CARCH}" = "x86_64" ]; then
 warning "x86_64 system detected"
 warning "[multilib] repository must be uncommented in /etc/pacman.conf to add lib32-catalyst-utils into the package"
  if [[ `cat /etc/pacman.conf | grep -c "#\[multilib]"` = 0 ]]; then
    warning "OK, lib32-catalyst-utils will be added to the package"
    depends+=('lib32-libxext' 'lib32-libdrm')
    conflicts+=('lib32-nvidia-utils' 'lib32-catalyst-utils')
    provides+=('lib32-libgl-pxp' "lib32-catalyst-utils=${pkgver}" 'lib32-dri' 'lib32-libtxc_dxtn')
      else
	warning "lib32-catalyst-utils will NOT be added to the package"
  fi
fi

install=${pkgname}.install

#   http://www2.ati.com/drivers/beta/amd-catalyst-13.15.100.1-linux-x86.x86_64.zip
source=(
    https://www2.ati.com/drivers/beta/amd-catalyst-13.8-beta2-linux-x86.x86_64.zip
    catalyst_build_module
    lib32-catalyst.sh
    catalyst.sh
    atieventsd.sh
    atieventsd.service
    catalyst.conf
    arch-fglrx-authatieventsd.patch
    hook-fglrx
    ati_make.sh
    makefile_compat.patch
    switchlibGL
    switchlibglx
    catalystpxp.sh
    20-catalystpxp.conf
    pxp_switch_catalyst
    lib32-catalystpxp.sh
    catalyst-hook.service
    temp_links_catalyst
    temp-links-catalyst.service
    kolasa_fglrx_3.10.patch
    kolasa_fglrx_fixing_ttys.patch
    lano1106_fglrx_intel_iommu.patch
    lano1106_kcl_agp_13_4.patch)

md5sums=('1a6527ac6de2032317a4d658ba560f79'
	 'f75ad119618ed37bc4b344a3b924aab1'
	 'af7fb8ee4fc96fd54c5b483e33dc71c4'
         'bdafe749e046bfddee2d1c5e90eabd83'
         '9d9ea496eadf7e883d56723d65e96edf'
	 '90a37e010f4e5f45e270cd000894d553'
	 '3e19c2285c76f4cb92108435a1e9c302'
	 '4ec9ba4440ec5a320ed3987c1d3b417d'
         '9126e1ef0c724f8b57d3ac0fe77efe2f'
	 '62239156a9656c6f41e89a879578925c'
	 '3e1b82bd69774ea808da69c983d6a43b'
         'f98cd932f56fdc4da73ba383926f1ade'
         '52e20085e141c1ff48dff4496bdae889'
         '003d6620ccedde9a3b40e6798e80df24'
         'aa0bbfca2c4b32aa25bbf8024af68978'
         '6b8d659b62442c962b4f3cc0efa19845'
         'a6f2f8c17484624ab36fc3c820bbcb4f'
	 'a64e2eae5addc6d670911ccf94b8cda4'
	 '0e6d963436dd23dbb45ae0f4fc9b661c'
	 '2c22bb4d4f828cb8b024f670c1ae7e45'
	 'ce8fb9593a1611ff044e8ec520024dc4'
	 '5f28dfc4c9fdb0fbfed69c8cb38659dd'
	 '5184b94a2a40216a67996999481dd9ee'
	 'c5156eddf81c8a1719b160d05a2e8d67')

build() {
  ## Unpack archive
     /bin/sh ./amd-catalyst-*.run --extract archive_files
}

package() {
##catalyst-utils section
  ## Install userspace tools and libraries
    # Create directories
      install -m755 -d ${pkgdir}/etc/ati
      install -m755 -d ${pkgdir}/etc/rc.d
      install -m755 -d ${pkgdir}/etc/profile.d
      install -m755 -d ${pkgdir}/etc/acpi/events
      install -m755 -d ${pkgdir}/etc/security/console.apps
      install -m755 -d ${pkgdir}/etc/OpenCL/vendors

      install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri
      install -m755 -d ${pkgdir}/usr/lib/xorg/modules/drivers
      install -m755 -d ${pkgdir}/usr/lib/xorg/modules/updates/extensions/fglrx
      install -m755 -d ${pkgdir}/usr/lib/xorg/modules/linux
      install -m755 -d ${pkgdir}/usr/lib/dri
      install -m755 -d ${pkgdir}/usr/lib/catalystpxp/fglrx
      install -m755 -d ${pkgdir}/usr/lib/fglrx
      install -m755 -d ${pkgdir}/usr/lib/systemd/system

      install -m755 -d ${pkgdir}/usr/bin

      install -m755 -d ${pkgdir}/usr/include/GL

      install -m755 -d ${pkgdir}/usr/share/applications
      install -m755 -d ${pkgdir}/usr/share/ati/amdcccle
      install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname}
      install -m755 -d ${pkgdir}/usr/share/man/man8
      install -m755 -d ${pkgdir}/usr/share/pixmaps

    # X.org driver
      if [ "${CARCH}" = "i686" ]; then
	cd ${srcdir}/archive_files/xpic/usr/X11R6/lib/modules
      elif [ "${CARCH}" = "x86_64" ]; then
	cd ${srcdir}/archive_files/xpic_64a/usr/X11R6/lib64/modules
      fi

      install -m755 *.so ${pkgdir}/usr/lib/xorg/modules
      install -m755 drivers/*.so ${pkgdir}/usr/lib/xorg/modules/drivers
      install -m755 linux/*.so ${pkgdir}/usr/lib/xorg/modules/linux
      install -m755 extensions/fglrx/fglrx-libglx.so ${pkgdir}/usr/lib/xorg/modules/updates/extensions/fglrx/fglrx-libglx.so
      ln -s fglrx-libglx.so ${pkgdir}/usr/lib/xorg/modules/updates/extensions/fglrx/libglx.so

    # Controlcenter / libraries
      if [ "${CARCH}" = "i686" ]; then
	cd ${srcdir}/archive_files/arch/x86/usr
	_lib=lib
      elif [ "${CARCH}" = "x86_64" ]; then
	cd ${srcdir}/archive_files/arch/x86_64/usr
	_lib=lib64
      fi

      install -m755 X11R6/bin/* ${pkgdir}/usr/bin
      install -m755 sbin/* ${pkgdir}/usr/bin

      install -m755 X11R6/${_lib}/fglrx/fglrx-libGL.so.1.2 ${pkgdir}/usr/lib/catalystpxp/fglrx
      ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib/catalystpxp/fglrx/libGL.so
      ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib/catalystpxp/fglrx/libGL.so.1
      ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib/catalystpxp/fglrx/libGL.so.1.2
      
      install -m755 X11R6/${_lib}/libAMDXvBA.so.1.0 ${pkgdir}/usr/lib/
      ln -snf libAMDXvBA.so.1.0 ${pkgdir}/usr/lib/libAMDXvBA.so.1
      ln -snf libAMDXvBA.so.1.0 ${pkgdir}/usr/lib/libAMDXvBA.so
      install -m755 X11R6/${_lib}/libatiadlxx.so ${pkgdir}/usr/lib
      install -m755 X11R6/${_lib}/libfglrx_dm.so.1.0 ${pkgdir}/usr/lib
      install -m755 X11R6/${_lib}/libXvBAW.so.1.0 ${pkgdir}/usr/lib
      ln -snf libXvBAW.so.1.0 ${pkgdir}/usr/lib/libXvBAW.so.1
      ln -snf libXvBAW.so.1.0 ${pkgdir}/usr/lib/libXvBAW.so
      install -m644 X11R6/${_lib}/*.a ${pkgdir}/usr/lib
      install -m644 X11R6/${_lib}/*.cap ${pkgdir}/usr/lib
      install -m755 X11R6/${_lib}/modules/dri/*.so ${pkgdir}/usr/lib/xorg/modules/dri
      install -m755 ${_lib}/*.so* ${pkgdir}/usr/lib

    ## QT libs (only 2 files) - un-comment 2 lines below if you don't want to install qt package
    #      install -m755 -d ${pkgdir}/usr/share/ati/${_lib}
    #      install -m755 share/ati/${_lib}/*.so* ${pkgdir}/usr/share/ati/${_lib}

      ln -snf /usr/lib/xorg/modules/dri/fglrx_dri.so ${pkgdir}/usr/lib/dri/fglrx_dri.so
      ln -snf libfglrx_dm.so.1.0 ${pkgdir}/usr/lib/libfglrx_dm.so.1
      ln -snf libfglrx_dm.so.1.0 ${pkgdir}/usr/lib/libfglrx_dm.so
      ln -snf libatiuki.so.1.0 ${pkgdir}/usr/lib/libatiuki.so.1
      ln -snf libatiuki.so.1.0 ${pkgdir}/usr/lib/libatiuki.so
      ln -snf libOpenCL.so.1 ${pkgdir}/usr/lib/libOpenCL.so


      cd ${srcdir}/archive_files/common
      msg "patch -Np2 -i ${srcdir}/arch-fglrx-authatieventsd.patch"
      patch -Np2 -i ${srcdir}/arch-fglrx-authatieventsd.patch
      install -m644 etc/ati/* ${pkgdir}/etc/ati
      chmod 755 ${pkgdir}/etc/ati/authatieventsd.sh

      install -m644 etc/security/console.apps/amdcccle-su ${pkgdir}/etc/security/console.apps

      install -m755 usr/X11R6/bin/* ${pkgdir}/usr/bin
      install -m644 usr/include/GL/*.h ${pkgdir}/usr/include/GL
      install -m755 usr/sbin/*.sh ${pkgdir}/usr/bin
      install -m644 usr/share/ati/amdcccle/* ${pkgdir}/usr/share/ati/amdcccle
      install -m644 usr/share/icons/*.xpm ${pkgdir}/usr/share/pixmaps
      install -m644 usr/share/man/man8/*.8 ${pkgdir}/usr/share/man/man8
      install -m644 usr/share/applications/*.desktop ${pkgdir}/usr/share/applications

    # ACPI example files
      install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh ${pkgdir}/etc/acpi
      sed -i -e 's/usr\/X11R6/usr/g' ${pkgdir}/etc/acpi/ati-powermode.sh
      install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* ${pkgdir}/etc/acpi/events

    # Add ATI Events Daemon launcher
      install -m755 ${srcdir}/atieventsd.sh ${pkgdir}/etc/rc.d/atieventsd
      install -m644 ${srcdir}/atieventsd.service ${pkgdir}/usr/lib/systemd/system

      #install -m755 ${srcdir}/catalyst.sh ${pkgdir}/etc/profile.d

    # License
      install -m644 ${srcdir}/archive_files/LICENSE.TXT ${pkgdir}/usr/share/licenses/${pkgname}
      install -Dm644 ${srcdir}/archive_files/common/usr/share/doc/amdcccle/ccc_copyrights.txt \
	${pkgdir}/usr/share/licenses/${pkgname}/amdcccle_copyrights.txt

    # since 11.11 : opencl files
      if [ "${CARCH}" = "i686" ]; then
	cd ${srcdir}/archive_files/arch/x86
	_arc=32
      elif [ "${CARCH}" = "x86_64" ]; then
	cd ${srcdir}/archive_files/arch/x86_64
	_arc=64
      fi

      # since 11.11: amd's vendor file for it's opencl library
      install -m644 etc/OpenCL/vendors/amdocl${_arc}.icd ${pkgdir}/etc/OpenCL/vendors

      # since 11.11: clinfo binary
      install -m755 usr/bin/clinfo ${pkgdir}/usr/bin

      # since 12.8:
      install -m755 -d ${pkgdir}/etc/modules-load.d
      install -m644 ${srcdir}/catalyst.conf ${pkgdir}/etc/modules-load.d

      # powerXpress
	install -m755 ${srcdir}/switchlibGL ${pkgdir}/usr/lib/fglrx
	install -m755 ${srcdir}/switchlibglx ${pkgdir}/usr/lib/fglrx
	# use /usr/lib/catalystpxp dir in 1st place (libGL switch)
	#install -m755 ${srcdir}/catalystpxp.sh ${pkgdir}/etc/profile.d
	# use /usr/lib/xorg/modules/updates dir in 1st place (libglx switch)
	install -m755 -d ${pkgdir}/etc/X11/xorg.conf.d
	
	# prevent X from using fglrx's libglx by default over mesa's libglx
	echo 'Section "Files"
         ModulePath   "/usr/lib/xorg/modules/extensions"
         ModulePath   "/usr/lib/xorg/modules"
EndSection' > ${pkgdir}/etc/X11/xorg.conf.d/00-libglxModulePath.conf
	
	#install -m644 ${srcdir}/20-catalystpxp.conf ${pkgdir}/etc/X11/xorg.conf.d
	# switching script: switch xorg.conf + aticonfig --px-Xgpu + switchlibGL + add/remove fglrx into MODULES
	install -m755 ${srcdir}/pxp_switch_catalyst ${pkgdir}/usr/bin

      #workaround for the high io bug , thanks to lano1106 for finding this ugly bug! https://bbs.archlinux.org/viewtopic.php?pid=1279977#p1279977
	install -m755 ${srcdir}/temp_links_catalyst ${pkgdir}/usr/bin
	install -m644 ${srcdir}/temp-links-catalyst.service ${pkgdir}/usr/lib/systemd/system

##catalyst-hook section
      cd ${srcdir}/archive_files
      msg "patch -Np1 -i ../makefile_compat.patch"
      patch -Np1 -i ../makefile_compat.patch
#      msg "patch -l -Np1 -i ../kolasa_fglrx_3.10.patch"
#      patch -l -Np1 -i ../kolasa_fglrx_3.10.patch
#      msg "patch -Np1 -i ../kolasa_fglrx_fixing_ttys.patch"
#      patch -Np1 -i ../kolasa_fglrx_fixing_ttys.patch
      msg "patch -Np1 -i ../lano1106_fglrx_intel_iommu.patch"
      patch -Np1 -i ../lano1106_fglrx_intel_iommu.patch
      msg "patch -Np1 -i ../lano1106_kcl_agp_13_4.patch"
      patch -Np1 -i ../lano1106_kcl_agp_13_4.patch

    # Prepare modules source files
      _archdir=x86_64
      test "${CARCH}" = "i686" && _archdir=x86
      install -m755 -d ${pkgdir}/usr/share/ati/build_mod
      install -m644 common/lib/modules/fglrx/build_mod/*.c \
                ${pkgdir}/usr/share/ati/build_mod
      install -m644 common/lib/modules/fglrx/build_mod/*.h \
                ${pkgdir}/usr/share/ati/build_mod
      install -m644 common/lib/modules/fglrx/build_mod/2.6.x/Makefile \
                ${pkgdir}/usr/share/ati/build_mod
      install -m644 arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a \
                ${pkgdir}/usr/share/ati/build_mod
      install -m755 -d ${pkgdir}/usr/bin
      install -m755 ${srcdir}/catalyst_build_module ${pkgdir}/usr/bin

    # modified ati's make.sh script
      install -m755 ${srcdir}/ati_make.sh ${pkgdir}/usr/share/ati/build_mod

    # hook fglrx
      install -m755 -d ${pkgdir}/usr/lib/initcpio/install
      install -m644 ${srcdir}/hook-fglrx ${pkgdir}/usr/lib/initcpio/install/fglrx

    # systemd service to perform fglrx module build at shutdown
      install -m755 -d ${pkgdir}/usr/lib/systemd/system
      install -m644 ${srcdir}/catalyst-hook.service ${pkgdir}/usr/lib/systemd/system


##lib32-catalyst-utils-pxp section
      if [ "${CARCH}" = "x86_64" ] && [[ `cat /etc/pacman.conf | grep -c "#\[multilib]"` = 0 ]]; then
	cd ${srcdir}
	#install -D -m755 lib32-catalyst.sh ${pkgdir}/etc/profile.d/lib32-catalyst.sh
	#install -D -m755 lib32-catalystpxp.sh ${pkgdir}/etc/profile.d/lib32-catalystpxp.sh

	cd ${srcdir}/archive_files/arch/x86/usr
	install -dm755 ${pkgdir}/usr/lib32/catalystpxp/fglrx
	install -dm755 ${pkgdir}/usr/lib32/xorg/modules/dri
	install -m755 lib/*.so* ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/fglrx/fglrx-libGL.so.1.2 ${pkgdir}/usr/lib32/catalystpxp/fglrx
	ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib32/catalystpxp/fglrx/libGL.so
	ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib32/catalystpxp/fglrx/libGL.so.1
	ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib32/catalystpxp/fglrx/libGL.so.1.2
	
	install -m755 X11R6/lib/libAMDXvBA.so.1.0 ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/libatiadlxx.so ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/libfglrx_dm.so.1.0 ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/libXvBAW.so.1.0 ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/modules/dri/*.so ${pkgdir}/usr/lib32/xorg/modules/dri
	ln -snf /usr/lib32/xorg/modules/dri ${pkgdir}/usr/lib32/dri

	cd $pkgdir/usr/lib32
	ln -sf libfglrx_dm.so.1.0 libfglrx_dm.so.1
	ln -sf libAMDXvBA.so.1.0 libAMDXvBA.so.1
	ln -sf libXvBAW.so.1.0 libXvBAW.so.1
	ln -sf libatiuki.so.1.0 libatiuki.so.1
	ln -sf libatiuki.so.1.0 libatiuki.so
	ln -sf libOpenCL.so.1 libOpenCL.so

	install -m755 -d ${pkgdir}/etc/OpenCL/vendors
	install -m644 ${srcdir}/archive_files/arch/x86/etc/OpenCL/vendors/amdocl32.icd ${pkgdir}/etc/OpenCL/vendors
      fi
}
md5sums=('9aa4508f8a89b6bfc09fea71e354336a'
         'f75ad119618ed37bc4b344a3b924aab1'
         'af7fb8ee4fc96fd54c5b483e33dc71c4'
         'bdafe749e046bfddee2d1c5e90eabd83'
         '9d9ea496eadf7e883d56723d65e96edf'
         '90a37e010f4e5f45e270cd000894d553'
         '3e19c2285c76f4cb92108435a1e9c302'
         '4ec9ba4440ec5a320ed3987c1d3b417d'
         '9126e1ef0c724f8b57d3ac0fe77efe2f'
         '62239156a9656c6f41e89a879578925c'
         '3e1b82bd69774ea808da69c983d6a43b'
         'f98cd932f56fdc4da73ba383926f1ade'
         '52e20085e141c1ff48dff4496bdae889'
         '003d6620ccedde9a3b40e6798e80df24'
         'aa0bbfca2c4b32aa25bbf8024af68978'
         '6b8d659b62442c962b4f3cc0efa19845'
         'a6f2f8c17484624ab36fc3c820bbcb4f'
         'a64e2eae5addc6d670911ccf94b8cda4'
         '0e6d963436dd23dbb45ae0f4fc9b661c'
         '2c22bb4d4f828cb8b024f670c1ae7e45'
         'ce8fb9593a1611ff044e8ec520024dc4'
         '5f28dfc4c9fdb0fbfed69c8cb38659dd'
         '5184b94a2a40216a67996999481dd9ee'
         'c5156eddf81c8a1719b160d05a2e8d67')

With that I can use this as the "primusrun" script:

export LD_LIBRARY_PATH="/usr/lib/primus:/usr/lib32/primus:$LD_LIBRARY_PATH"
export PRIMUS_libGL=/usr/lib/primus
export PRIMUS_libGLa=/usr/lib/catalystpxp/fglrx/fglrx-libGL.so.1.2:/usr/lib32/catalystpxp/fglrx/fglrx-libGL.so.1.2
export PRIMUS_libGLd=/usr/lib/libGL.so.1.2.0:/usr/lib32/libGL.so.1.2.0
export PRIMUS_SYNC=1
#export vblank_mode=0
exec "$@"

The vblank_mode=0 would disable vsync, you can test if it helps anything.
PRIMUS_SYNC is interesting because with it set to 0 many games freeze for me. The performance with it set to 1suffers sometimes.

The gputest benchmark http://www.geeks3d.com/gputest/ runs overwhelmingly better with primus than with bumblebee/virtualgl, but every real game I tried runs worse.

If anyone is experienced in tracking down performance bottlenecks, this github thread needs you.

Offline

#5700 2013-09-12 12:06:40

ivdok
Member
From: Abu Dhabi
Registered: 2013-07-17
Posts: 60

Re: The AMD/ATI Bar & Grill

haagch wrote:

People with hybrid intel/amd gpus might be interested in (very hacky) primus:

If you want to test it you'll need
1. primus-git (and lib32-primus-git) with that patch: https://github.com/amonakov/primus/issu … t-21398865
2. breaking some symbols in fglrx-libGL.so.1.2 and fglrx_dri.so for 64 and 32 bit each: https://github.com/amonakov/primus/issu … t-24177917
Pretty much only

for tfile in /usr/lib/xorg/modules/dri/fglrx_dri.so /usr/lib32/xorg/modules/dri/fglrx_dri.so /usr/lib/catalystpxp/fglrx/fglrx-libGL.so.1.2 /usr/lib32/catalystpxp/fglrx/fglrx-libGL.so.1.2; do
  cp $tfile ${tfile}.bak
  sed -i s/_glapi_/_glaoy_/g $tfile
done

For personal use I commented out some stuff in the catalyst-total-pxp PKGBUILD and added some symlinks:

pkgname=catalyst-total-pxp
pkgver=13.8
pkgrel=1
_amdver=13.8
pkgdesc="AMD/ATI drivers. catalyst-hook + catalyst-utils + lib32-catalyst-utils with testing powerXpress support. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED"
arch=('i686' 'x86_64')
url="http://www.amd.com"
license=('custom')
depends=('linux>=3.0' 'linux<3.12' 'linux-headers' 'xorg-server>=1.7.0' 'xorg-server<1.15.0' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'gcc>4.0.0' 'make' 'patch' 'libxinerama')
optdepends=('qt: to run ATi Catalyst Control Center (amdcccle)'
	    'libxxf86vm: to run ATi Catalyst Control Center (amdcccle)'
	    'opencl-headers: headers necessary for OpenCL development'
	    'acpid: acpi event support  / atieventsd'
	    'linux-headers: to build the fglrx module for the linux kernel'
	    'linux-lts-headers: to build the fglrx module for the linux-lts kernel')
conflicts=('catalyst-test' 'nvidia-utils' 'nvidia' 'catalyst' 'catalyst-daemon' 'catalyst-generator' 'catalyst-hook' 'catalyst-utils' 'libcl' 'catalyst-total' 'catalyst-dkms')
provides=("libatical=${pkgver}" "catalyst=${pkgver}" "catalyst-utils=${pkgver}" "catalyst-hook=${pkgver}" 'libcl' 'dri' 'libtxc_dxtn')

if [ "${CARCH}" = "x86_64" ]; then
 warning "x86_64 system detected"
 warning "[multilib] repository must be uncommented in /etc/pacman.conf to add lib32-catalyst-utils into the package"
  if [[ `cat /etc/pacman.conf | grep -c "#\[multilib]"` = 0 ]]; then
    warning "OK, lib32-catalyst-utils will be added to the package"
    depends+=('lib32-libxext' 'lib32-libdrm')
    conflicts+=('lib32-nvidia-utils' 'lib32-catalyst-utils')
    provides+=('lib32-libgl-pxp' "lib32-catalyst-utils=${pkgver}" 'lib32-dri' 'lib32-libtxc_dxtn')
      else
	warning "lib32-catalyst-utils will NOT be added to the package"
  fi
fi

install=${pkgname}.install

#   http://www2.ati.com/drivers/beta/amd-catalyst-13.15.100.1-linux-x86.x86_64.zip
source=(
    https://www2.ati.com/drivers/beta/amd-catalyst-13.8-beta2-linux-x86.x86_64.zip
    catalyst_build_module
    lib32-catalyst.sh
    catalyst.sh
    atieventsd.sh
    atieventsd.service
    catalyst.conf
    arch-fglrx-authatieventsd.patch
    hook-fglrx
    ati_make.sh
    makefile_compat.patch
    switchlibGL
    switchlibglx
    catalystpxp.sh
    20-catalystpxp.conf
    pxp_switch_catalyst
    lib32-catalystpxp.sh
    catalyst-hook.service
    temp_links_catalyst
    temp-links-catalyst.service
    kolasa_fglrx_3.10.patch
    kolasa_fglrx_fixing_ttys.patch
    lano1106_fglrx_intel_iommu.patch
    lano1106_kcl_agp_13_4.patch)

md5sums=('1a6527ac6de2032317a4d658ba560f79'
	 'f75ad119618ed37bc4b344a3b924aab1'
	 'af7fb8ee4fc96fd54c5b483e33dc71c4'
         'bdafe749e046bfddee2d1c5e90eabd83'
         '9d9ea496eadf7e883d56723d65e96edf'
	 '90a37e010f4e5f45e270cd000894d553'
	 '3e19c2285c76f4cb92108435a1e9c302'
	 '4ec9ba4440ec5a320ed3987c1d3b417d'
         '9126e1ef0c724f8b57d3ac0fe77efe2f'
	 '62239156a9656c6f41e89a879578925c'
	 '3e1b82bd69774ea808da69c983d6a43b'
         'f98cd932f56fdc4da73ba383926f1ade'
         '52e20085e141c1ff48dff4496bdae889'
         '003d6620ccedde9a3b40e6798e80df24'
         'aa0bbfca2c4b32aa25bbf8024af68978'
         '6b8d659b62442c962b4f3cc0efa19845'
         'a6f2f8c17484624ab36fc3c820bbcb4f'
	 'a64e2eae5addc6d670911ccf94b8cda4'
	 '0e6d963436dd23dbb45ae0f4fc9b661c'
	 '2c22bb4d4f828cb8b024f670c1ae7e45'
	 'ce8fb9593a1611ff044e8ec520024dc4'
	 '5f28dfc4c9fdb0fbfed69c8cb38659dd'
	 '5184b94a2a40216a67996999481dd9ee'
	 'c5156eddf81c8a1719b160d05a2e8d67')

build() {
  ## Unpack archive
     /bin/sh ./amd-catalyst-*.run --extract archive_files
}

package() {
##catalyst-utils section
  ## Install userspace tools and libraries
    # Create directories
      install -m755 -d ${pkgdir}/etc/ati
      install -m755 -d ${pkgdir}/etc/rc.d
      install -m755 -d ${pkgdir}/etc/profile.d
      install -m755 -d ${pkgdir}/etc/acpi/events
      install -m755 -d ${pkgdir}/etc/security/console.apps
      install -m755 -d ${pkgdir}/etc/OpenCL/vendors

      install -m755 -d ${pkgdir}/usr/lib/xorg/modules/dri
      install -m755 -d ${pkgdir}/usr/lib/xorg/modules/drivers
      install -m755 -d ${pkgdir}/usr/lib/xorg/modules/updates/extensions/fglrx
      install -m755 -d ${pkgdir}/usr/lib/xorg/modules/linux
      install -m755 -d ${pkgdir}/usr/lib/dri
      install -m755 -d ${pkgdir}/usr/lib/catalystpxp/fglrx
      install -m755 -d ${pkgdir}/usr/lib/fglrx
      install -m755 -d ${pkgdir}/usr/lib/systemd/system

      install -m755 -d ${pkgdir}/usr/bin

      install -m755 -d ${pkgdir}/usr/include/GL

      install -m755 -d ${pkgdir}/usr/share/applications
      install -m755 -d ${pkgdir}/usr/share/ati/amdcccle
      install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname}
      install -m755 -d ${pkgdir}/usr/share/man/man8
      install -m755 -d ${pkgdir}/usr/share/pixmaps

    # X.org driver
      if [ "${CARCH}" = "i686" ]; then
	cd ${srcdir}/archive_files/xpic/usr/X11R6/lib/modules
      elif [ "${CARCH}" = "x86_64" ]; then
	cd ${srcdir}/archive_files/xpic_64a/usr/X11R6/lib64/modules
      fi

      install -m755 *.so ${pkgdir}/usr/lib/xorg/modules
      install -m755 drivers/*.so ${pkgdir}/usr/lib/xorg/modules/drivers
      install -m755 linux/*.so ${pkgdir}/usr/lib/xorg/modules/linux
      install -m755 extensions/fglrx/fglrx-libglx.so ${pkgdir}/usr/lib/xorg/modules/updates/extensions/fglrx/fglrx-libglx.so
      ln -s fglrx-libglx.so ${pkgdir}/usr/lib/xorg/modules/updates/extensions/fglrx/libglx.so

    # Controlcenter / libraries
      if [ "${CARCH}" = "i686" ]; then
	cd ${srcdir}/archive_files/arch/x86/usr
	_lib=lib
      elif [ "${CARCH}" = "x86_64" ]; then
	cd ${srcdir}/archive_files/arch/x86_64/usr
	_lib=lib64
      fi

      install -m755 X11R6/bin/* ${pkgdir}/usr/bin
      install -m755 sbin/* ${pkgdir}/usr/bin

      install -m755 X11R6/${_lib}/fglrx/fglrx-libGL.so.1.2 ${pkgdir}/usr/lib/catalystpxp/fglrx
      ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib/catalystpxp/fglrx/libGL.so
      ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib/catalystpxp/fglrx/libGL.so.1
      ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib/catalystpxp/fglrx/libGL.so.1.2
      
      install -m755 X11R6/${_lib}/libAMDXvBA.so.1.0 ${pkgdir}/usr/lib/
      ln -snf libAMDXvBA.so.1.0 ${pkgdir}/usr/lib/libAMDXvBA.so.1
      ln -snf libAMDXvBA.so.1.0 ${pkgdir}/usr/lib/libAMDXvBA.so
      install -m755 X11R6/${_lib}/libatiadlxx.so ${pkgdir}/usr/lib
      install -m755 X11R6/${_lib}/libfglrx_dm.so.1.0 ${pkgdir}/usr/lib
      install -m755 X11R6/${_lib}/libXvBAW.so.1.0 ${pkgdir}/usr/lib
      ln -snf libXvBAW.so.1.0 ${pkgdir}/usr/lib/libXvBAW.so.1
      ln -snf libXvBAW.so.1.0 ${pkgdir}/usr/lib/libXvBAW.so
      install -m644 X11R6/${_lib}/*.a ${pkgdir}/usr/lib
      install -m644 X11R6/${_lib}/*.cap ${pkgdir}/usr/lib
      install -m755 X11R6/${_lib}/modules/dri/*.so ${pkgdir}/usr/lib/xorg/modules/dri
      install -m755 ${_lib}/*.so* ${pkgdir}/usr/lib

    ## QT libs (only 2 files) - un-comment 2 lines below if you don't want to install qt package
    #      install -m755 -d ${pkgdir}/usr/share/ati/${_lib}
    #      install -m755 share/ati/${_lib}/*.so* ${pkgdir}/usr/share/ati/${_lib}

      ln -snf /usr/lib/xorg/modules/dri/fglrx_dri.so ${pkgdir}/usr/lib/dri/fglrx_dri.so
      ln -snf libfglrx_dm.so.1.0 ${pkgdir}/usr/lib/libfglrx_dm.so.1
      ln -snf libfglrx_dm.so.1.0 ${pkgdir}/usr/lib/libfglrx_dm.so
      ln -snf libatiuki.so.1.0 ${pkgdir}/usr/lib/libatiuki.so.1
      ln -snf libatiuki.so.1.0 ${pkgdir}/usr/lib/libatiuki.so
      ln -snf libOpenCL.so.1 ${pkgdir}/usr/lib/libOpenCL.so


      cd ${srcdir}/archive_files/common
      msg "patch -Np2 -i ${srcdir}/arch-fglrx-authatieventsd.patch"
      patch -Np2 -i ${srcdir}/arch-fglrx-authatieventsd.patch
      install -m644 etc/ati/* ${pkgdir}/etc/ati
      chmod 755 ${pkgdir}/etc/ati/authatieventsd.sh

      install -m644 etc/security/console.apps/amdcccle-su ${pkgdir}/etc/security/console.apps

      install -m755 usr/X11R6/bin/* ${pkgdir}/usr/bin
      install -m644 usr/include/GL/*.h ${pkgdir}/usr/include/GL
      install -m755 usr/sbin/*.sh ${pkgdir}/usr/bin
      install -m644 usr/share/ati/amdcccle/* ${pkgdir}/usr/share/ati/amdcccle
      install -m644 usr/share/icons/*.xpm ${pkgdir}/usr/share/pixmaps
      install -m644 usr/share/man/man8/*.8 ${pkgdir}/usr/share/man/man8
      install -m644 usr/share/applications/*.desktop ${pkgdir}/usr/share/applications

    # ACPI example files
      install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh ${pkgdir}/etc/acpi
      sed -i -e 's/usr\/X11R6/usr/g' ${pkgdir}/etc/acpi/ati-powermode.sh
      install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* ${pkgdir}/etc/acpi/events

    # Add ATI Events Daemon launcher
      install -m755 ${srcdir}/atieventsd.sh ${pkgdir}/etc/rc.d/atieventsd
      install -m644 ${srcdir}/atieventsd.service ${pkgdir}/usr/lib/systemd/system

      #install -m755 ${srcdir}/catalyst.sh ${pkgdir}/etc/profile.d

    # License
      install -m644 ${srcdir}/archive_files/LICENSE.TXT ${pkgdir}/usr/share/licenses/${pkgname}
      install -Dm644 ${srcdir}/archive_files/common/usr/share/doc/amdcccle/ccc_copyrights.txt \
	${pkgdir}/usr/share/licenses/${pkgname}/amdcccle_copyrights.txt

    # since 11.11 : opencl files
      if [ "${CARCH}" = "i686" ]; then
	cd ${srcdir}/archive_files/arch/x86
	_arc=32
      elif [ "${CARCH}" = "x86_64" ]; then
	cd ${srcdir}/archive_files/arch/x86_64
	_arc=64
      fi

      # since 11.11: amd's vendor file for it's opencl library
      install -m644 etc/OpenCL/vendors/amdocl${_arc}.icd ${pkgdir}/etc/OpenCL/vendors

      # since 11.11: clinfo binary
      install -m755 usr/bin/clinfo ${pkgdir}/usr/bin

      # since 12.8:
      install -m755 -d ${pkgdir}/etc/modules-load.d
      install -m644 ${srcdir}/catalyst.conf ${pkgdir}/etc/modules-load.d

      # powerXpress
	install -m755 ${srcdir}/switchlibGL ${pkgdir}/usr/lib/fglrx
	install -m755 ${srcdir}/switchlibglx ${pkgdir}/usr/lib/fglrx
	# use /usr/lib/catalystpxp dir in 1st place (libGL switch)
	#install -m755 ${srcdir}/catalystpxp.sh ${pkgdir}/etc/profile.d
	# use /usr/lib/xorg/modules/updates dir in 1st place (libglx switch)
	install -m755 -d ${pkgdir}/etc/X11/xorg.conf.d
	
	# prevent X from using fglrx's libglx by default over mesa's libglx
	echo 'Section "Files"
         ModulePath   "/usr/lib/xorg/modules/extensions"
         ModulePath   "/usr/lib/xorg/modules"
EndSection' > ${pkgdir}/etc/X11/xorg.conf.d/00-libglxModulePath.conf
	
	#install -m644 ${srcdir}/20-catalystpxp.conf ${pkgdir}/etc/X11/xorg.conf.d
	# switching script: switch xorg.conf + aticonfig --px-Xgpu + switchlibGL + add/remove fglrx into MODULES
	install -m755 ${srcdir}/pxp_switch_catalyst ${pkgdir}/usr/bin

      #workaround for the high io bug , thanks to lano1106 for finding this ugly bug! https://bbs.archlinux.org/viewtopic.php?pid=1279977#p1279977
	install -m755 ${srcdir}/temp_links_catalyst ${pkgdir}/usr/bin
	install -m644 ${srcdir}/temp-links-catalyst.service ${pkgdir}/usr/lib/systemd/system

##catalyst-hook section
      cd ${srcdir}/archive_files
      msg "patch -Np1 -i ../makefile_compat.patch"
      patch -Np1 -i ../makefile_compat.patch
#      msg "patch -l -Np1 -i ../kolasa_fglrx_3.10.patch"
#      patch -l -Np1 -i ../kolasa_fglrx_3.10.patch
#      msg "patch -Np1 -i ../kolasa_fglrx_fixing_ttys.patch"
#      patch -Np1 -i ../kolasa_fglrx_fixing_ttys.patch
      msg "patch -Np1 -i ../lano1106_fglrx_intel_iommu.patch"
      patch -Np1 -i ../lano1106_fglrx_intel_iommu.patch
      msg "patch -Np1 -i ../lano1106_kcl_agp_13_4.patch"
      patch -Np1 -i ../lano1106_kcl_agp_13_4.patch

    # Prepare modules source files
      _archdir=x86_64
      test "${CARCH}" = "i686" && _archdir=x86
      install -m755 -d ${pkgdir}/usr/share/ati/build_mod
      install -m644 common/lib/modules/fglrx/build_mod/*.c \
                ${pkgdir}/usr/share/ati/build_mod
      install -m644 common/lib/modules/fglrx/build_mod/*.h \
                ${pkgdir}/usr/share/ati/build_mod
      install -m644 common/lib/modules/fglrx/build_mod/2.6.x/Makefile \
                ${pkgdir}/usr/share/ati/build_mod
      install -m644 arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a \
                ${pkgdir}/usr/share/ati/build_mod
      install -m755 -d ${pkgdir}/usr/bin
      install -m755 ${srcdir}/catalyst_build_module ${pkgdir}/usr/bin

    # modified ati's make.sh script
      install -m755 ${srcdir}/ati_make.sh ${pkgdir}/usr/share/ati/build_mod

    # hook fglrx
      install -m755 -d ${pkgdir}/usr/lib/initcpio/install
      install -m644 ${srcdir}/hook-fglrx ${pkgdir}/usr/lib/initcpio/install/fglrx

    # systemd service to perform fglrx module build at shutdown
      install -m755 -d ${pkgdir}/usr/lib/systemd/system
      install -m644 ${srcdir}/catalyst-hook.service ${pkgdir}/usr/lib/systemd/system


##lib32-catalyst-utils-pxp section
      if [ "${CARCH}" = "x86_64" ] && [[ `cat /etc/pacman.conf | grep -c "#\[multilib]"` = 0 ]]; then
	cd ${srcdir}
	#install -D -m755 lib32-catalyst.sh ${pkgdir}/etc/profile.d/lib32-catalyst.sh
	#install -D -m755 lib32-catalystpxp.sh ${pkgdir}/etc/profile.d/lib32-catalystpxp.sh

	cd ${srcdir}/archive_files/arch/x86/usr
	install -dm755 ${pkgdir}/usr/lib32/catalystpxp/fglrx
	install -dm755 ${pkgdir}/usr/lib32/xorg/modules/dri
	install -m755 lib/*.so* ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/fglrx/fglrx-libGL.so.1.2 ${pkgdir}/usr/lib32/catalystpxp/fglrx
	ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib32/catalystpxp/fglrx/libGL.so
	ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib32/catalystpxp/fglrx/libGL.so.1
	ln -s fglrx-libGL.so.1.2 ${pkgdir}/usr/lib32/catalystpxp/fglrx/libGL.so.1.2
	
	install -m755 X11R6/lib/libAMDXvBA.so.1.0 ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/libatiadlxx.so ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/libfglrx_dm.so.1.0 ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/libXvBAW.so.1.0 ${pkgdir}/usr/lib32
	install -m755 X11R6/lib/modules/dri/*.so ${pkgdir}/usr/lib32/xorg/modules/dri
	ln -snf /usr/lib32/xorg/modules/dri ${pkgdir}/usr/lib32/dri

	cd $pkgdir/usr/lib32
	ln -sf libfglrx_dm.so.1.0 libfglrx_dm.so.1
	ln -sf libAMDXvBA.so.1.0 libAMDXvBA.so.1
	ln -sf libXvBAW.so.1.0 libXvBAW.so.1
	ln -sf libatiuki.so.1.0 libatiuki.so.1
	ln -sf libatiuki.so.1.0 libatiuki.so
	ln -sf libOpenCL.so.1 libOpenCL.so

	install -m755 -d ${pkgdir}/etc/OpenCL/vendors
	install -m644 ${srcdir}/archive_files/arch/x86/etc/OpenCL/vendors/amdocl32.icd ${pkgdir}/etc/OpenCL/vendors
      fi
}
md5sums=('9aa4508f8a89b6bfc09fea71e354336a'
         'f75ad119618ed37bc4b344a3b924aab1'
         'af7fb8ee4fc96fd54c5b483e33dc71c4'
         'bdafe749e046bfddee2d1c5e90eabd83'
         '9d9ea496eadf7e883d56723d65e96edf'
         '90a37e010f4e5f45e270cd000894d553'
         '3e19c2285c76f4cb92108435a1e9c302'
         '4ec9ba4440ec5a320ed3987c1d3b417d'
         '9126e1ef0c724f8b57d3ac0fe77efe2f'
         '62239156a9656c6f41e89a879578925c'
         '3e1b82bd69774ea808da69c983d6a43b'
         'f98cd932f56fdc4da73ba383926f1ade'
         '52e20085e141c1ff48dff4496bdae889'
         '003d6620ccedde9a3b40e6798e80df24'
         'aa0bbfca2c4b32aa25bbf8024af68978'
         '6b8d659b62442c962b4f3cc0efa19845'
         'a6f2f8c17484624ab36fc3c820bbcb4f'
         'a64e2eae5addc6d670911ccf94b8cda4'
         '0e6d963436dd23dbb45ae0f4fc9b661c'
         '2c22bb4d4f828cb8b024f670c1ae7e45'
         'ce8fb9593a1611ff044e8ec520024dc4'
         '5f28dfc4c9fdb0fbfed69c8cb38659dd'
         '5184b94a2a40216a67996999481dd9ee'
         'c5156eddf81c8a1719b160d05a2e8d67')

With that I can use this as the "primusrun" script:

export LD_LIBRARY_PATH="/usr/lib/primus:/usr/lib32/primus:$LD_LIBRARY_PATH"
export PRIMUS_libGL=/usr/lib/primus
export PRIMUS_libGLa=/usr/lib/catalystpxp/fglrx/fglrx-libGL.so.1.2:/usr/lib32/catalystpxp/fglrx/fglrx-libGL.so.1.2
export PRIMUS_libGLd=/usr/lib/libGL.so.1.2.0:/usr/lib32/libGL.so.1.2.0
export PRIMUS_SYNC=1
#export vblank_mode=0
exec "$@"

The vblank_mode=0 would disable vsync, you can test if it helps anything.
PRIMUS_SYNC is interesting because with it set to 0 many games freeze for me. The performance with it set to 1suffers sometimes.

The gputest benchmark http://www.geeks3d.com/gputest/ runs overwhelmingly better with primus than with bumblebee/virtualgl, but every real game I tried runs worse.

If anyone is experienced in tracking down performance bottlenecks, this github thread needs you.

That would be kind of hard to use, IMO. But with every solution found and released to public, FOSS drivers & tools gain stability, features and support. So, I guess, that hack might be very, very fascinating. Not usable by me, but even still - I might give it a kick when I feel bored.

Offline

Board footer

Powered by FluxBB