Hi, I used the ati-drivers-8.542.ebuild as basis. Kernel 2.6.27 is supported now, so the 2.6.27 support patch can be dropped, and BASE_DIR="${S}/x710" has to be changed to BASE_DIR="${S}/x740" after that the new driver works very well with 2.6.27.5. xorg-server 1.5.2 and xorg-x11 7.4 Reproducible: Always
Created attachment 171688 [details] the edited ebuild
This ebuild fails for me, any clue what's going on? In file included from /var/tmp/portage/x11-drivers/ati-drivers-8.552/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:36: include/linux/sysrq.h: In function '__reterr': include/linux/sysrq.h:66: error: 'EINVAL' undeclared (first use in this function) include/linux/sysrq.h:66: error: (Each undeclared identifier is reported only once include/linux/sysrq.h:66: error: for each function it appears in.) make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-8.552/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /var/tmp/portage/x11-drivers/ati-drivers-8.552/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function '__ke_vm_phys_addr_str': /var/tmp/portage/x11-drivers/ati-drivers-8.552/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3206: warning: return makes pointer from integer without a cast /var/tmp/portage/x11-drivers/ati-drivers-8.552/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3207: warning: return makes pointer from integer without a cast /var/tmp/portage/x11-drivers/ati-drivers-8.552/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3208: warning: return makes pointer from integer without a cast /var/tmp/portage/x11-drivers/ati-drivers-8.552/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3210: warning: return makes pointer from integer without a cast make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-8.552/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.27-gentoo-r2' make: *** [kmod_build] Error 2
hm, no - it built for me with vanilla 2.6.27.5 sources.
have the same error, same kernel
same kernel as me or Andreas?
gentoo-sources-2.6.27-r2
(In reply to comment #3) > hm, no - it built for me with vanilla 2.6.27.5 sources. > Well maybe it's a kernel setting, just which...
Created attachment 171701 [details] working kernel config I attach my kernel config, maybe it can give you a hint.
Simply bumping the ebuild worked here as well. I'll try to dig a bit this evening and hopefully commit something tonight
(In reply to comment #8) > Created an attachment (id=171701) [edit] > working kernel config > > I attach my kernel config, maybe it can give you a hint. > It does ;) Looks like CONFIG_MAGIC_SYSRQ (in "Kernel Hacking") has to be set for compilation to succeed. Works fine here after I changed that.
ah. That makes sense! Amd introduces its own key with its driver. AFAIR it started with 8.10. When it is loaded 'g' gives you fglrx debug stub on serial port - I found that accidentally yesterday ;)
there is a problem with the driver. from Xorg.0.log: (EE) AIGLX error: fglrx exports no extensions (/usr/lib64/dri/fglrx_dri.so: undefined symbol: __driDriverExtensions) (EE) AIGLX: reverting to software rendering I didn't notice earler, because most of the time I don't use composite.
Yah, I only got a blank screen w/ this driver. (Xorg.0.log attached)
Created attachment 171795 [details] log. Screen turns black. I can switch back to virtual terminal
(In reply to comment #11) > ah. That makes sense! Does it? Seems to me that include/linux/sysrq.h in the kernel is broken, using EINVAL without defining it first. Either that, oder kcm_debug.c in the fglrx driver should define EINVAL before including sysrq.h. There really is no reason that fglrx shouldn't compile with CONFIG_MAGIC_SYSRQ disabled.
Hong Hao, what are the rights of /dev/dri/card0?
So I went back to mesa 7.0.3, xorg-server 1.4.2, xorg-x11 7.3 - and of course aiglx works again *sight* - the 740 in the ebuild had to be changed back to 710 of course. I did either something wrong, there is something else f* up or the 8.11 release is partially brocken.
A plain bump ebuild now is in portage (p.masked for now) I'll play with the xorg 1.5 support to see how broken it is.
(In reply to comment #16) > Hong Hao, what are the rights of /dev/dri/card0? > hmm...There is no /dev/dri/* if I switch to fglrx.
thanks Luca. Hong Hao - that is very strange.
(In reply to comment #18) > A plain bump ebuild now is in portage (p.masked for now) I'll play with the > xorg 1.5 support to see how broken it is. > Luca the ebuild in portage of the version 8.552 is the same of version 8.542. I don't know if it is what you want for now, but i think this will be very confusing for users..
ok now it's hard masked..
soon the -r1 (xorg 1.5) and a proper -r0 (xorg 1.4) will appear
(In reply to comment #23) > soon the -r1 (xorg 1.5) and a proper -r0 (xorg 1.4) will appear > I'm going to test the -r1 now..
Wouldn't it be nicer (and cleaner) to have just one ebuild that installs the right blobs depending on which version of xorg-x11 is installed (and maybe put in a ewarn message that the package needs to be remerged when switching from <1.5 to 1.5 or vice versa)?
Hi, I read -r1 ebuild on the gentoo-page. You still have: # Only support xorg-server >=1.1 BASE_DIR="${S}/x740" in it. Which is ok with Xorg 7.4 (you will just loose AIGLX and compositing), but with Xorg 7.3 X won't even start.
It's true. In xorg 7.4 the AIGLX extension does not work.It runs in software render. From Xrg.0.log: (EE) AIGLX error: fglrx exports no extensions (/usr/lib64/dri/fglrx_dri.so: undefined symbol: __driDriverExtensions) (EE) AIGLX: reverting to software rendering
I threw together a patch against the ati-drivers-8.552 ebuild in portage that would do what I proposed.
Created attachment 171878 [details, diff] Patch against ati-drivers-8.552.ebuild _from portage_ (see comment 25/28)
Now the problem is have aiglx to work. Any ideas?
Michael I'd rather get the next version deps to require xorg-server 1.5 and the older one to stick with xorg-server 1.4
(In reply to comment #30) > Now the problem is have aiglx to work. Any ideas? > Hi, I found on the web Phoronix that copy of the file: x740_64a/usr/X11R6/lib64/modules/extensions/libdri.so could help. So I copied it and replaced the original one and AIGLX is working now. (I copied libglx.so too) br, Tibor
(In reply to comment #32) > (In reply to comment #30) > > Now the problem is have aiglx to work. Any ideas? > > > > Hi, > > I found on the web Phoronix that copy of the file: > x740_64a/usr/X11R6/lib64/modules/extensions/libdri.so > could help. So I copied it and replaced the original one and AIGLX is working > now. (I copied libglx.so too) > > br, > Tibor > I can confirm that replacing the Xorg libdri.so and libglx.so fixes AIGLX (and a few other issues for that matter). However, you need both. Just libdri.so on it's own didn't change anything.
/usr/lib/opengl/ati/extensions is made to be a symlink to /usr/lib/opengl/xorg-x11/extensions in src_install-libs(). Since ati-drivers seems to provide all the files found in there, this really should not be a symlink anymore, should it? Also, /usr/lib/xorg/modules/extensions/libdri.so, in contrast to libglx.so, is _not_ a symlink and belongs to xorg-server - am I right assuming that this might be issue, as this can't be overridden with eselect opengl right now? :/
(In reply to comment #34) I can confirm that copying the driver's extensions directory instead of symlinking to xorg's fixes aiglx and suppresses a few warnings in xorg log.
Created attachment 172417 [details, diff] avoid extensions symlink
-r2 released and xorg-server block lifted. I hope it works fine for everybody
(In reply to comment #37) > -r2 released and xorg-server block lifted. I hope it works fine for everybody > I've downloaded the ebuild from cvs and tried to emerge it with --nodeps (to avoid being blocked by the already installed xorg-server-1.5.2). * Detected file collision(s): * * /usr/lib/opengl/ati/extensions/libglx.so Is it to be expected?
yes, you must emerge -C the older drivers, the depchain should make portage do that for you hopefully
(In reply to comment #39) > yes, you must emerge -C the older drivers, the depchain should make portage do > that for you hopefully > portage-2.2_rc12 doesn't do it automagically, but cleaning it manually and then emerging ati-drivers worked for me. Thanks. Now, let's see how this new version works.
and I get: !!! Cannot write to '/usr/lib32/opengl/ati/extensions'. >>> Failed to install x11-drivers/ati-drivers-8.552-r2,
(In reply to comment #41) Hi, If you will make a ls -l /usr/lib32/opengl/ati/ you will see that "extensions" is just a link to nonexistent: ../xorg-x11/extensions I have just deleted this link and have created a folder /usr/lib32/opengl/ati/extensions The same I have made for /usr/lib64/opengl/ati/extensions To get read of "collisions" error. I do not know how good is this solution, but it looks like it works (at least now). -- Best regards, Andrei.
(In reply to comment #41) > and I get: > > !!! Cannot write to '/usr/lib32/opengl/ati/extensions'. > > >>> Failed to install x11-drivers/ati-drivers-8.552-r2, > As stated before, emerge -C ati-drivers && emerge ati-drivers fixes it.
IMO if the package only supports >=xorg-server-1.5 as stated in the ebuild # Only support xorg-server >=1.5 BASE_DIR="${S}/x740" Then the RDEPEND should be changed to >=x11-base/xorg-server-1.5* and not the generic x11-base/xorg-server who permits the installation using <1.5 and ends with a broken install.
(In reply to comment #44) > IMO if the package only supports >=xorg-server-1.5 as stated in the ebuild > > # Only support xorg-server >=1.5 > BASE_DIR="${S}/x740" > > Then the RDEPEND should be changed to >=x11-base/xorg-server-1.5* and not the > generic x11-base/xorg-server who permits the installation using <1.5 and ends > with a broken install. > Is the >=xorg-server-1.5 required to install ati-drivers-8.552? The system requirements listed on ATI Linux site are "X.Org 6.7, 6.8, 6.9, 7.0, 7.1, 7.2, 7.3, or 7.4". That means xorg-server-1.3 should work. But i get an error that fglrx_drv cannot be loaded and no screens found. The older version 8.543 works.
(In reply to comment #45) > Is the >=xorg-server-1.5 required to install ati-drivers-8.552? The system > requirements listed on ATI Linux site are "X.Org 6.7, 6.8, 6.9, 7.0, 7.1, 7.2, > 7.3, or 7.4". That means xorg-server-1.3 should work. > But i get an error that fglrx_drv cannot be loaded and no screens found. > The older version 8.543 works. > As stated in the ebuild yes, but the package can support <xorg-server-1.5 using the patch in comment #28. In comment #31 prefer to drop support for <1.5 (which is bad) in favour of avoiding a binary dep with xorg-server? (which is good). Anyway the solution is a)implement the patch to support those xorg versions, or b)update the RDEPEND to avoid install in xorg <1.5
(In reply to comment #37) > -r2 released and xorg-server block lifted. I hope it works fine for everybody ati-drivers-8.552-r2 installs libdri.so to /usr/lib64/opengl/ati/extensions/, but xorg-server installs libdri.so to /usr/lib64/xorg/modules/extensions/. This causes 'eselect opengl set ati' to replace /usr/lib64/xorg/modules/extensions/libdri.so with a symlink to /usr/lib64/opengl/ati/extensions/libdri.so (deleting the old libdri.so file). 'eselect opengl set xorg-x11' the fails to restore the xorg-server libdri.so (how could it) and leaves the symlink to /usr/lib64/opengl/ati/extensions/libdri.so Any chance of changing the xorg-server ebuild to put the libdri.so in /usr/lib64/opengl/xorg-x11/extensions/?
Hmm... Also, I get this when I emerge ati-drivers: * Building fgl_glxgears In file included from fgl_glxgears.c:70: /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/usr/include/GL/glATI.h:3153:1: warning: "GL_ATI_texture_env_combine3" redefined In file included from /usr/include/GL/gl.h:2150, from /usr/include/GL/glu.h:38, from fgl_glxgears.c:59: /usr/include/GL/glext.h:6606:1: warning: this is the location of the previous definition /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lGL collect2: ld returned 1 exit status * * ERROR: x11-drivers/ati-drivers-8.552-r2 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3287: Called die * The specific snippet of code: * "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU -I"${S}"/common/usr/include fgl_glxgears.c -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"; * The die message: * fgl_glxgears build failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/temp/environment'. * >>> Failed to emerge x11-drivers/ati-drivers-8.552-r2, Log file:
(In reply to comment #48) > Hmm... Also, I get this when I emerge ati-drivers: > ... You might want to try % emerge -C ati-drivers % eselect opengl set xorg-x11 % emerge ati-drivers
(In reply to comment #47) > (In reply to comment #37) > > -r2 released and xorg-server block lifted. I hope it works fine for everybody > ati-drivers-8.552-r2 installs libdri.so to /usr/lib64/opengl/ati/extensions/, > but xorg-server installs libdri.so to /usr/lib64/xorg/modules/extensions/. > > This causes 'eselect opengl set ati' to replace > /usr/lib64/xorg/modules/extensions/libdri.so with a symlink to > /usr/lib64/opengl/ati/extensions/libdri.so (deleting the old libdri.so file). > > 'eselect opengl set xorg-x11' the fails to restore the xorg-server libdri.so > (how could it) and leaves the symlink to > /usr/lib64/opengl/ati/extensions/libdri.so > > Any chance of changing the xorg-server ebuild to put the libdri.so in > /usr/lib64/opengl/xorg-x11/extensions/? > Shouldn't the ebuild be rewritten because of this? I tried everything stated here and even after all the advises I had to re-merge the 8.543 version along with xorg-server because this ebuild broke every link. This ebuild should be masked. It has a poorly written programming, especially for amd64.
(In reply to comment #50) > Shouldn't the ebuild be rewritten because of this? The current ebuild works correctly. the former ones were using symlinks and that can get overly annoying since leads to bogus conditions. > I tried everything stated > here and even after all the advises I had to re-merge the 8.543 version along > with xorg-server because this ebuild broke every link. This ebuild should be > masked. It has a poorly written programming, especially for amd64. Just switch to xorg-x11, emerge -C ati-drivers, emerge ati-drivers.
(In reply to comment #51) > (In reply to comment #50) > > Shouldn't the ebuild be rewritten because of this? > > The current ebuild works correctly. the former ones were using symlinks and > that can get overly annoying since leads to bogus conditions. > > > I tried everything stated > > here and even after all the advises I had to re-merge the 8.543 version along > > with xorg-server because this ebuild broke every link. This ebuild should be > > masked. It has a poorly written programming, especially for amd64. > > Just switch to xorg-x11, emerge -C ati-drivers, emerge ati-drivers. > Well, I get this error: No dri, no screens found and X won't start.
(In reply to comment #52) > Well, I get this error: No dri, no screens found and X won't start. > Be sure you eselect'ed opengl set ati && the fglrx module is loaded. Then, be sure that you have a DefaultDepth 24 in your Screen session (I was missing that). Then, X didn't work for me anyway with the new module, and hence I'm using the ati 6.9.0 free module :-) Discussion about other bugs that are not related to problems in the ebuild could probably be better in a new bug.
(In reply to comment #53) > (In reply to comment #52) > > > Well, I get this error: No dri, no screens found and X won't start. > > > > Be sure you eselect'ed opengl set ati && the fglrx module is loaded. Then, be > sure that you have a DefaultDepth 24 in your Screen session (I was missing > that). Then, X didn't work for me anyway with the new module, and hence I'm > using the ati 6.9.0 free module :-) Discussion about other bugs that are not > related to problems in the ebuild could probably be better in a new bug. > eselect opengl ati... done! Section "Screen" Identifier "aticonfig-Screen[0]" Device "aticonfig-Device[0]" Monitor "aticonfig-Monitor[0]" DefaultDepth 24 SubSection "Display" #virtual 1280 1024 Viewport 0 0 Depth 24 EndSubSection EndSection Section "DRI" Mode 0666 EndSection dmesg shows that the module is there with no problems and still getting the same error.
This version of the drivers didn't work for me probably because I am at kernel 2.6.25 and xorg 7.2. When I switched back to a 8.542 version of the ATI drivers, 3 links got broken. "eselect opengl set ati" did not fix them. Neither did "eselect opengl set xorg-x11". I deleted the links by hand (sorry I don't remember them, but they showed up as broken in the directory where "libdri.so" lives. As I recall "libdri.??" was one of them. Be sure to edit /etc/portage/package.keywords get the ati-drivers version that works for you, then: eselect opengl set xorg-x11 emerge ati-drivers eselect opengl set xorg-x11
The ebuild depends on xorg 1.5, blocks previous version of ati-drivers. Please sync and tell me if the procedure of eselect opengl set xorg-x11 emerge -C ati-drivers emerge ati-drivers doesn't lead to a working system (should)
There are errors in my Comment #55 The version of ati-drivers that works for me is 8.532 not 8.542. The last line of my suggestions should read: eselect opengl set xorg-x11 Retest Summary: Three bad links still exist when I convert back to ati-drivers 8.532 after installing ati-drivers 8.552: /usr/lib/xorg/modules/extensions/libdri.so /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/libGL.so Emerging did not correct the problems. I had to delete the above links. I took a lot of detours to get ati-drivers back to 8.532. Some were probably unnecessary. The rest of this comment lists my trials and tribulations. I assumed that I should repeat my previous attempt to emerge the 8.552 ati-drivers. I have moved to linux-2.6.26-gentoo-r3 from linux2.6.25-gentoo-r9 where I first encountered the error. I still didn't work, but I was forced to also emerge 27 additional masked versions of packages due to some improvements in the the ati-drivers dependencies. With all the updates I had hopes it would work. Nope. Still crashes everything - some disk files don't get updated, keyboard dead - just like before. That is not what this bug is about. I was more careful about the errors. Exactly 2 files links are broken (they blink red too) in the following: # ls -l /usr/lib/xorg/modules/extensions total 2674 -rwxr-xr-x 1 root root 2466086 Nov 28 15:05 libGLcore.so -rwxr-xr-x 1 root root 23741 Nov 28 15:05 libdbe.so lrwxrwxrwx 1 root root 42 Nov 28 15:20 libdri.so -> //usr//lib/opengl/ati/extensions/libdri.so -rwxr-xr-x 1 root root 153068 Nov 28 15:05 libextmod.so lrwxrwxrwx 1 root root 42 Nov 28 15:20 libglx.so -> //usr//lib/opengl/ati/extensions/libglx.so -rwxr-xr-x 1 root root 33366 Nov 28 15:05 librecord.so -rwxr-xr-x 1 root root 45349 Nov 28 15:05 libxtrap.so Note: The double slashes "//usr//". I don't know if that matters or not. I tried your suggestion without deleting the links. Reboot. It didn't work. I deleted the links and tried you suggestion. Reboot. It didn't work. # eselect opengl list Available OpenGL implementations: [1] ati [2] xorg-x11 * Humm - need to set ati # eselect opengl set ati Switching to ati OpenGL interface... done # eselect opengl list Available OpenGL implementations: [1] ati * [2] xorg-x11 Reboot. It didn't work # rm -r /usr/lib/opengl/ati Fails to compile. # rm -r /var/tmp/portage/x11-drivers/ati-drivers-8.532/ # emerge ati-drivers Emerge failed. This is supposed to fix emerge failure, but eselect fails Switching to xorg-x11 OpenGL interface...ln: creating symbolic link `./libGL.so': File exists !!! Error: Failed to create /usr/lib/libGL.so Killed Remove another broken link and try again: # rm /usr/lib/libGL.so # eselect opengl set xorg-x11 # emerge ati-drivers # eselect opengl list Available OpenGL implementations: [1] ati [2] xorg-x11 * # eselect opengl set ati Switching to ati OpenGL interface... done Reboot. SUCCESS!!
for some reason I get this: (EE) AIGLX error: drmGetMagic failed (EE) AIGLX: reverting to software rendering
hm, ok, I solved it by cleaning up in /usr/lib64/xorg again, after unmerging an re-emerging the drivers. eselect really needs a 'overwrite broken symlinks' mode ....