0

Alrighty, here's the problem:

I am installing linux on a sony VAIO that has a:

01:00.0 WGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64)

I have tried installing the drm module "mach64" (after discovering that this is a mach64 chipset, I think) along with the xf86 driver "ati" (compiled with the mach64 module existing and modprobe'd), as according to a tutorial I found here:
http://ubuntuforums.org/showthread.php?t=406389

I used the "script" of sorts in post 6, debugged - I'll attach it for you (had to change to format ".txt", just take that off. If you're running it it needs root access to resolve the dependency issues I found).

After all that, I still get direct rendering: No (If you want to know why, try setting LIBGL_DEBUG=verbose) , but I see a problem here...

$ glxinfo |grep "direct rendering"
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb7bd7767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb7bd78b1]
#2 /usr/lib/libX11.so.6 [0xb7c6d421]
#3 /usr/X11R6/lib/libGL.so.1(__glXInitialize+0x596) [0xb7ea33cc]
#4 /usr/X11R6/lib/libGL.so.1 [0xb7e9ffc8]
#5 /usr/X11R6/lib/libGL.so.1(glXChooseVisual+0x29) [0xb7ea1124]
#6 glxinfo [0x8049448]
#7 glxinfo [0x8049b23]
#8 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7d2b450]
#9 glxinfo [0x8048d51]
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)

If I knew what a locking assertion failure was, I'd fix it... But I don't.

So, I guess it comes down to this:
What is a locking assertion failure, why is it occurring, and how can I fix it?
Secondly, how can I get direct rendering on this card? If fixing this won't fix it, I'm outta ideas. My /etc/X11/xorg.conf is one from online posted by someone who has it working with dr enabled, so it can't be that, unless I need to drop the colors down to 16 bit instead of 24.

Thanks for any help you can give me, I'd really appreciate it.
I'm about ready to wash my hands of this project, which will hopefully get another person learning how to use linux, and give me somewhere to go to play stepmania on a pad for free. ^_^

Attachments
# ati_mobility_pm_dri_install_nonfree
#  A script to be used on a ATI 3D Rage Mobility P/M (rev 64) video card...
#  to enable direct rendering.

# **********************NOTE*******************************************************************************
# It's not working for me yet, even though all commands now execute the way they're supposed tox
#   direct rendering is still a no-go.

# This is a script I got off ubuntuforums.org/showthread.php?t=406389
#  I modified it pretty heavily, taking care of some bogus logic and adding some extra dependancies
#  It was originally written by dougfractal, I'm trying to see if it will get this card working.



#!/bin/bash

DRIVER_VS="6.11.0"

apt-get install linux-headers-generic build-essential autoconf-archive xorg-dev mesa-common-dev git git-core

SRCPATH=`pwd` 
cd $SRCPATH 
if [ -d 'src' ];
   then
	echo -n "";
   else
	mkdir src ;
fi

cd src

if [ ! -d 'drm/linux-core' ] ;
   then
	git clone git://anongit.freedesktop.org/git/mesa/drm ;
fi

cd drm/linux-core
make DRM_MODULES="mach64" 
if [ -f mach64.ko ] ;
   then
	echo -e "\nSuccess\n" ;
	cp *.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/;
	depmod -a;
	modprobe mach64;
   else
	echo -e '\nIn a previous error I needed to comment out "/*  .... */" function static int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,  unsigned long pfn) in drm/linux-core/drm_compat.c  lines 189-198 \n If this is the same error then do it.\nnano src/drm/linux-core/drm_compat.c\n'; 
	cd $SRCPATH;
	sleep 5;
fi

# part two
cd $SRCPATH/src
if [ -f 'xf86-video-ati-$DRIVER_VS.tar.bz2' ]; then echo "already have xf86-video-ati"; else
	wget http://xorg.freedesktop.org/archive/individual/driver/xf86-video-ati-$DRIVER_VS.tar.bz2 ;
	tar xvjf xf86-video-ati-$DRIVER_VS.tar.bz2  ;
fi
cd xf86-video-ati-$DRIVER_VS
./configure --prefix=/usr
make clean
make
make install
cd $SRCPATH
printf "\nASSUMING there were no errors above, restart X, and everything should be toasty.\n"
printf "This script courtesy of dougfractal on ubuntuforums.org\n\n"
1
Contributor
3
Replies
4
Views
8 Years
Discussion Span
Last Post by FireSBurnsmuP
0

Alright! I found a fix for the locking assertion failure (although I don't fully understand what happened, I wasn't paying all that much attention...).

It turns out that libx11-6 has a conflict with the older and un-updated libGL.so.1, that causes an incompatibility if libx11-6 is too new. The fix is basically to downgrade libx11-6 from 1.1.3 to 1.1.1. Here's the link to the .deb in the ubuntu 7.10 repositories: http://packages.ubuntu.com/gutsy/i386/libx11-6/download

Also, here's the faq I found that describes the problem and solutions: http://forum.tuxx-home.at/viewtopic.php?f=10&t=565

...
However, that doesn't fix my direct rendering: No , unfortunately.

But, I'll keep digging... If nothing else, as usual, I'll document the problem, causes, and solutions here so no-one else has to deal with all this.

0

ALRIGHT... The script I have is to enable drm support in the kernel. What that is, I don't know, but it ISN'T Direct Rendering, and if it is, it isn't all of it. I finally figures out how to pass LIBGL_DEBUG=verbose to glxinfo... check it out:

~$ LIBGL_DEBUG=verbose glxinfo |grep rendering
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
raziel@nosgoth:~$ LIBGL_DEBUG=verbose glxinfo |grep rendering
libGL: XF86DRIGetClientDriverName: 6.7.0 mach64 (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/mach64_dri.so
libGL error: dlopen /usr/X11R6/lib/modules/dri/mach64_dri.so failed (/usr/X11R6/lib/modules/dri/mach64_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to find driver: mach64_dri.so

I figured this would help out any out there, at least as an update. I think I know how to dri... so I'll be back in a little bit.

/me comes back...
^_^
http://cassianoleal.wordpress.com/2008/03/08/one-more-try-on-the-mach64/
I now have direct rendering: Yes .

to basically sum up the problem I had, I had a "missing shared object file" error. These happen to me all the time, believe it or not, and I usually don't have to download anything.
I tried downloading the package libgl1-mesa-dri - the one that has this file in it - but that didn't work for me. (because of the earlier problem with the whole mis-matched versions)
However - I already had the package on my computer. It turns out that the package installs to /usr/lib/dri and not /usr/X11R6/lib/modules/dri . So I added a symlink (after making sure /usr/X11R6/lib/modules/dri was empty):

~# rm -R /usr/X11R6/lib/modules/dri
~# ln -s /usr/lib/dri /usr/X11R6/lib/modules/dri

I'm updating the script (the one I attached above) to also include all this non-sense (I LOVE it when all I need is a symlink... sure, it pisses me off while I'm searching, but then it's so easy to fix once you figure it out.)

so Yeah, That's how we got 3d acceleration.
Just for clarity's sake:
I used Ubuntu 8.10 (2.6.24-19-generic).
I changed DRIVER_VS in the script to 1.11.0, so it got that version of the drm files for the mach64.ko kernel module.
The machine's a Sony VAIO laptop (pcg-fxa49).
The video card's an ATI Rage Mobility P/M AGP 2x (01:00:00.0 1002:4c4d) rev 64
The video card's chipset is a "mach64" (which would be a ridiculously impossible speed... if it were even plausible enough to exist ^_^),
Again, I'll post the attachment script in a while, I have to go right now though.
I'll also post my xorg.conf, in case someone needs it.

I wish I could edit all my posts here so that I could make a proper HOWTO on this. Maybe I'll ask the mods about it, or find a more appropriate place on the tubes for it.

0

Alrighty, here's the script I wrote up... I did get a lot of the code in parts 1 and 2 from dougfractal on ubuntuforums.org, but part 3 was me using the ideas I got from cassianoleal on wordpress.com (the link is in the above post). I tried to give credit where it was due.
You have to change the filename to not have the .txt, because it would really irk me to know someone out there executed a text-file. ^_^U
Also, I have included my xorg.conf, which is working with direct rendering: Yes . I don't know where I got this, anymore, but I don't think they wrote it anyway, so I don't really feel bad not listing them in my credits. The keyboard layout is "us", with no options or anything fancy like that. (I feel obligated to tell you that, cause when I downloaded it it was dvorak and I didn't know it. That was a mess to clean up.)

I hope someone finds this useful at some point! I sure would've 3 days ago.

Attachments
# ati_mobility_pm_dri_install_nonfree
#  A script to be used on a ATI 3D Rage Mobility P/M (rev 64) (1002:4c4d) video card...
#  to enable direct rendering.

# I am not sure what the liscense on this should be, so I'm just going to
#  assume that it's non-free, because of the drm/mach64 module sources being non-free,
#  but I don't know whether they are or not, to be honest.
#  Someone can tell me otherwise,
#  or just edit this file to include the proper lecture on the liscenses it is using.

# This is a script I got off ubuntuforums.org/showthread.php?t=406389
#  I modified it pretty heavily, taking care of some bogus logic and adding some extra dependancies
#  It was originally written by dougfractal, I'm trying to see if it will get this card working.

# And I did. The end section is really what did it, the drm stuff may have had an effect, and that's
#  why I'm leaving it here, but that symlink and extra apt-get at the end
#  are what pushed this project over the edge.



#!/bin/bash

# this line can be changed to include the latest version of the driver from:
# http://xorg.freedesktop.org/archive/individual/driver/
DRIVER_VS="6.11.0"

apt-get install linux-headers-generic build-essential autoconf-archive xorg-dev mesa-common-dev git git-core

SRCPATH=`pwd` 
cd $SRCPATH 
if [ ! -d 'src' ];
   then
	mkdir src ;
fi

cd src

if [ ! -d 'drm/linux-core' ] ;
   then
	git clone git://anongit.freedesktop.org/git/mesa/drm ;
fi

cd drm/linux-core
make DRM_MODULES="mach64" 
if [ -f mach64.ko ] ;
   then
	echo -e "\nSuccess\n" ;
	printf "****removing old modules (if they're there)\n";
	modprobe -r drm;
	modprobe -r mach64;
	printf "****copying new modules \"drm\" and \"mach64\"\n";
	cp -t /lib/modules/`uname -r`/kernel/drivers/char/drm/ drm.ko mach64.ko;
	printf "****loading new modules\n";
	depmod -a;
	modprobe drm;
	modprobe mach64;
   else
	echo -e '\nIn a previous error I needed to comment out "/*  .... */" function static int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,  unsigned long pfn) in drm/linux-core/drm_compat.c  lines 189-198 \n If this is the same error then do it.\nnano src/drm/linux-core/drm_compat.c\n'; 
	cd $SRCPATH;
	sleep 5;
	exit 1;
fi

# part two
cd $SRCPATH/src;
if [ -f 'xf86-video-ati-$DRIVER_VS.tar.bz2' ];
   then
	echo "already have xf86-video-ati-$DRIVER_VS";
   else
	wget http://xorg.freedesktop.org/archive/individual/driver/xf86-video-ati-$DRIVER_VS.tar.bz2 ;
	tar xvjf xf86-video-ati-$DRIVER_VS.tar.bz2  ;
fi
cd xf86-video-ati-$DRIVER_VS
./configure --prefix=/usr
make clean
make
make install
cd $SRCPATH

printf "\n\nAssuming there were ne errors above, DRM should now be active.\n\n";

#part 3 - making sure dri is where it needs to be
# and putting it there, if it isn't.

# is mach64_dri.so in /usr/X11R6/lib/modules/dri like it needs to be?
if [ "$( ls -A /usr/X11R6/lib/modules/dri/mach64_dri.so )" ] ;
   then
	printf "shared object library \"mach64_dri.so\" is already where it needs to be.\n";
	exit 0;
   # if it's not, does mach64_dri.so exist where debian/ubuntu repositories put it?
   elif [ ! "$( ls /usr/lib/dri/mach64_dri.so )" ];
	   #if not, we oughta go apt-get that, huh?
	   then
		printf "Missing libgl1-mesa-dri package - fixing...\n";
		apt-get install libgl1-mesa-dri ;

		# if it's still not there, something went wrong.
		if [ ! "$( ls /usr/lib/dri/mach64_dri.so )" ];
		   then
			echo "I didn't fix it, I hope you can figure out why. Exitting..." 1>$2 ;
			exit 1;
		   else
			printf "That should take care of that, there weren't any errors.\n";
		fi
fi

#okay, so if mach64_dri.so IS currently in /usr/lib/dri where ubuntu/debian puts it when you download it,
#  AND it doesn't already exist where we want it to be, it will have gotten to this point without 'exit'ing

#so, let's make sure that this is empty before doing this the simple way
#  (deleting the folder it SHOULD BE in and replacing said folder with a
#   symlink to the folder it IS in.)

if [ ! "$(ls -A /usr/X11R6/lib/modules/dri )" ];
   then
	rm -R /usr/X11R6/lib/modules/dri;
	ln -s /usr/lib/dri /usr/X11R6/lib/modules/dri;

   # If it isn't empty, I should probably prompt the user, asking them what they wanna do,
   #   and just in case, I'll tell them the possible consequences of doing such.
   #   Because I didn't have this problem, so I don't think anyone else will,
   #   BUT I don't wanna be responsible for breaking someone's system.
   #ALSO: It's long, so I broke it up with user input.
   else
	printf "****the directory \"/usr/X11R6/lib/modules/dri\" isn't empty...\n";
	printf "****DISCLAIMER****\n";
	printf "   I didn't have this problem, so none of these options have been tested...\n";
	printf "SO, here are the options:\n";
	printf "  I could \"copy\" all the files in \"/usr/lib/dri\"\n";
	printf "   into \"/usr/X11R6/lib/modules/dri\",\n";
	printf "   causing duplicates of the libraries in \"/usr/lib/dri\"\n";
	printf "   Although extra libraries shouldn't cause problems,\n";
	printf "   they'd only be wasting space,\n";
	printf "   if there are files with the same name in both dirs,\n";
	printf "   one could be overwritten.\n";
	printf "Press any key to continue with lecture...";
	read i;
	printf "  OR I can \"move\" everything in \"/usr/X11R6/lib/modules/dri\"\n";
	printf "   into the directory I'm going to link to that location,\n";
	printf "   which could overwrite some libraries in \"/usr/lib/dri\"...\n";
	printf "Press any key to continue with lecture...";
	read i;
	printf "  OR I could \"delete\" everything in X11R6 just in case\n";
	printf "   we would screw something up by doing that,\n";
	printf "   which could easily screw something up,\n";
	printf "   if there's something in X11R6 that some program needs.\n";
	printf "Press any key to continue with lecture...";
	read i;
	printf "ANY of these ways could have some unknown consequences.\n";
	printf "  SO: you could \"skip\" this part altogether and \n";
	printf "   figure something out on your own.\n";
	printf "   This CAN'T screw anything up, but...\n";
	printf "   this is the step that got direct rendering for me.\n";
	echo " What is your quest? (copy/move/delete/skip)  " 1>&2 ;
	read continue;
	printf "  Don't say I didn't warn you, regardless of your path...\n";
	printf "  I do not know what will happen to you now.\n";

	case $continue in
	   [Cc][Oo][Pp][Yy])#any capitalisation accepted
	     cp -R /usr/lib/dri/* /usr/X11R6/lib/modules/dri/
	   ;;
	   [Mm][Oo][Vv][Ee])
	     mv /usr/X11R6/lib/modules/dri/* /usr/lib/dri
	     rm -R /usr/X11R6/lib/modules/dri
	     ln -s /usr/lib/dri /usr/X11R6/lib/modules/dri
	   ;;
	   [Dd][Ee][Ll][Ee][Tt][Ee])
	     rm -R /usr/X11R6/lib/modules/dri 
	     ln -s /usr/lib/dri /usr/X11R6/lib/modules/dri
	   ;;
	   [Ss][Kk][Ii][Pp])
	     printf "Skipping the symlink creation that caused mine to work,\n"
	     printf "   because \"/usr/X11R6/lib/modules/dri\" is not empty.\n"
	     printf "   I'd suggest copying the files yourself if you still\n"
	     printf "   don't have \"direct rendering: Yes\" with glxinfo.\n"
	   ;;
	   *)
	     printf "invalid option. exiting.\n\n"
	     exit 1;;
	esac
fi	

printf "\nASSUMING there were no errors above, restart X, and everything should be toasty.\n"
printf "This script written by FireSBurnsmuP, with credits going to:\n"
printf "  dougfractal on ubuntuforums.org,\n"
printf "  Cassiano Leal on cassianoleal.wordpress.com/2008/03/08/one-more-try-on-the-mach64,\n\n"
# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
EndSection

Section "Module"
	Load		"i2c"
	Load		"bitmap"
	Load		"ddc"
	Load		"freetype"
	Load		"int10"
	Load		"type1"
	Load		"vbe"
	Load		"extmod"
	Load		"glx"
	Load		"GLcore"
	Load		"dri"
	Load		"v4l"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc105"
	Option		"XkbLayout"	"us"
	Option		"XkbVariant"	"us"
	Option		"XkbOptions"	""
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"	"/dev/input/mice"
	Option		"Protocol"	"ImPS/2"
	Option		"ZAxisMapping"	"4 5"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "Device"
	Identifier	"ATI Technologies Inc Rage Mobility P/M AGP 2x"
	Boardname	"ATI Rage Mobility P"
	Busid		"PCI:1:0:0"
	Driver		"ati"
	Screen	0
	Vendorname	"ATI"
	Option		"MergedFB"	"off"
EndSection

Section "Monitor"
	Identifier	"Standardbildschirm"
	Vendorname	"Plug 'n' Play"
	Modelname	"Plug 'n' Play"
  modeline  "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync
	Gamma	1.0
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"ATI Technologies Inc Rage Mobility P/M AGP 2x"
	Monitor		"Standardbildschirm"
	Defaultdepth	24
	SubSection "Display"
		Depth	24
		Modes		"1024x768" "640x480@60"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
  screen 0 "Default Screen" 0 0
	Inputdevice	"Generic Keyboard"
	Inputdevice	"Configured Mouse"
EndSection

Section "DRI"
	Mode	0666
EndSection
Section "device" # 
	Identifier	"device1"
	Boardname	"ATI Rage Mobility P"
	Busid		"PCI:1:0:0"
	Driver		"ati"
	Screen	1
	Vendorname	"ATI"
	Option		"MergedFB"	"off"
EndSection
Section "screen" # 
	Identifier	"screen1"
	Device		"device1"
	Defaultdepth	24
	Monitor		"monitor1"
EndSection
Section "monitor" # 
	Identifier	"monitor1"
	Gamma	1.0
EndSection
Section "ServerFlags"
EndSection
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.