Tuesday, September 20, 2005

Breezy DRI fix

FINALLY found this. Will try it out when i get home. Basically, theres a bad libdri.a in breezy, but a good one in hoary. someone tried copying the hoary version over, and it pretty much seems to work for everyone. linkage

Friday, September 09, 2005

How I got 3d accel for the ati drivers in ubuntu

Had a bitch of a time, until i found some guide that suggested doing this. since then, ive had no problems. make sure that you "sudo apt-get install build-essential kernel-headers" if you havnt already. (note: at the moment, dri is broken in breezy, so even a correct install of the ati drivers wont give 3d acceleration. currently doing a massive update, hopefully it was fixed)

1. Download the binary installer off of ati.com. run it with "sudo ./ati-driver-installer-8.16.20-i386.run" do an automatic install. (note to breezy users: breezy uses gcc 4 which isnt what the kernel was compiled with. make sure gcc 3.4 is installed, and before doing the previous command, do "export CC=gcc-3.4" or the installer wont compile the driver, even though the gui says its successful)

2. Do "sudo modprobe fglrx" to load the driver into the kernel. If theres no output, it was successful (hopefully). to check, type "sudo lsmod | grep fglrx". if you see something like "fglrx 258664 0", the driver was loaded successfully.

3. Back up your xorg.conf (something like "sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak"). now do "sudo perl -pi -e 's/Driver.*ati/Driver \"fglrx\"\nOption \"UseInternalAGPGART\" \"no/' /etc/X11/xorg.conf". this will change the device section of the config file to use the new driver.

if that doesnt work (or you dont trust my leet regex skillz), open the xorg.conf (sudo gedit /etc/X11/xorg.conf), scroll to the Device section, and change the driver from "ati" (or whatever it is currently) to fglrx, and add "Option "UseInternalAGPGART" "No"" so it looks something like this:

Section "Device"
Identifier "ATI Technologies, Inc. Radeon 9600 (RV350 AS)"
Driver "fglrx"
Option "UseInternalAGPGART" "no"
BusID "PCI:2:0:0"
EndSection

(if your identifier or busid is different it doesnt matter)

4. this is what took me FOREVER to find. copy these lines and paste them into a terminal. turns out that some things just dont know where to look for the accelerated opengl driver, and x is one of them. these commands will copy the driver to every place that things would be looking for it.

cd /lib/modules/fglrx sudo
sudo cp fglrx.ko /lib/modules/`uname -r`/
sudo cp fglrx.`uname -r`.ko /lib/modules/`uname -r`/
sudo mkdir /lib/modules/`uname -r`/kernel/video
sudo cp fglrx.ko /lib/modules/`uname -r`/kernel/video
sudo cp fglrx.`uname -r`.ko /lib/modules/`uname -r`/kernel/video
sudo cp fglrx.ko /lib/modules/`uname -r`/kernel/drivers/video
sudo cp fglrx.`uname -r`.ko /lib/modules/`uname -r`/kernel/drivers/video
sudo mkdir /lib/modules/`uname -r`/kernel/drivers/video/fglrx
sudo sudo cp fglrx.ko /lib/modules/`uname -r`/kernel/drivers/video/fglrx
sudo cp fglrx.`uname -r`.ko /lib/modules/`uname -r`/kernel/drivers/video/fglrx
sudo mkdir /lib/modules/`uname -r`/kernel/drivers/misc
sudo cp fglrx.ko /lib/modules/`uname -r`/kernel/drivers/misc
sudo cp fglrx.`uname -r`.ko /lib/modules/`uname -r`/kernel/drivers/misc
sudo mkdir /lib/modules/`uname -r`/kernel/drivers/misc/video
sudo cp fglrx.ko /lib/modules/`uname -r`/kernel/drivers/misc/video
sudo cp fglrx.`uname -r`.ko /lib/modules/`uname -r`/kernel/drivers/misc/video
sudo mkdir /lib/modules/`uname -r`/kernel/drivers/misc/fglrx
sudo cp fglrx.ko /lib/modules/`uname -r`/kernel/drivers/misc/fglrx
sudo cp fglrx.`uname -r`.ko /lib/modules/`uname -r`/kernel/drivers/misc/fglrx

5. restart the xserver. you can do this gracefully with "sudo /etc/init.d/gdm stop". that command will drop you to the command line. login, and type "sudo /etc/init.d/gdm start" to return to the graphical login. either that, or ctrl-alt-backspace will kill X, and gdm will restart automatically.

6. open a terminal, and run glxgears. if those gears arent spinning blindingly fast, something is wrong. either there is a different problem then the ones i encountered, or i havnt typed this up properly. in either case, feel free to ask me for help.

any suggestions/critisms/flames are welcome. i apologize for the lack of capitalizations, crappy grammer, etc. sometime in the near future ill clean all this up, if anything is unclear, feel free to drop me a line.

Gnome 2.12 pwnz j00


heres a screenie of my desktop after a dist-upgrade to breezy

Monday, September 05, 2005

Mental Giants on slsk

This is what I love about the internet. unimark enters the room convinced the application sucks, the people who wrote it are retards, and noone knows more about anything then him. SeeSchloss tries to help, and Schee is a bot that SeeSchloss is writing.




0:28:33 [unimark] nicotine sucks, i'v ebeen using it for a week and it just doesn't work
20:28:38 [SeeSchloss] anyway unimark, I suggest fixing your network configuration
20:28:38 [xsvenx] hrm... works fine for me
20:28:56 [Xero] yeah
20:28:56 [SeeSchloss] your port 2234 is not even filtered, it's *closed*
20:28:56 [Xero] if you don't have your ports forwarding
20:29:14 [Xero] oh shit
20:29:14 [Xero] the bot didn't catch it!
20:29:18 [Xero] why can't i browse?
20:29:22 [Xero] doesn't that work
20:29:33 [SeeSchloss] oh, no
20:29:33 [Xero] how do i route?
20:29:40 [Xero] damn
20:29:45 [Xero] i forgot the commands already
20:29:58 [unimark] ports are forwarded, it still sucks ass
20:30:01 [SeeSchloss] ports, man, how do I route *ports*
20:30:04 [Schee] The ports are 2234-2239, you can see how to route them at http://testic.demon.co.uk/slsk-howto/
20:30:33 [SeeSchloss] unimark: maybe they are forwarded, but your nicotine does not listen on port 2234
20:30:47 [unimark] i know how to forward ports, but it still doesn't connect
20:30:47 [Schee] The ports are 2234-2239, you can see how to forward them at http://testic.demon.co.uk/slsk-howto/
20:30:52 [SeeSchloss] I SAID YOUR PORT 2234 IS CLOSED
20:30:57 [SeeSchloss] do you understand better ?
20:30:57 [Xero] ok
20:31:04 [unimark] i have nicotine set to listen on 2241 to 45, and those ports areforwarded on my router
20:31:04 [Xero] i think he's trying to say that he portscanned you
20:31:17 [unimark] okay listen i'm a network admin, and i know how to forward a port.
20:31:24 [Schee] Is the record broken ?
20:31:44 [unimark] the program itself is sucky. i can't download an entire folder. half the time it doesn't even connect to people on my buddy list.
20:31:44 [Xero] wait he didn't scan 2241 or 2245 though
20:31:44 [unimark] this is a useless client
20:31:55 [SeeSchloss] haha that was funny from Schee
20:32:03 [SeeSchloss] anyway, the point is the server thinks you're using port 2234
20:32:33 [SeeSchloss] (even though it wasn't because it's the second time someone says he's a network admin)
20:32:40 [unimark] so setting the listening port to something else doesn't do shit? wow. thats a great functionality decision.
20:32:55 [unimark] did lemurs write this program?
20:32:59 [Xero] haha what
20:33:33 [Xero] unimark's IP: 68.196.253.187 Port: 2234
[unimark] diggity dicks
20:34:54 [Xero] what now
20:35:17 [SeeSchloss] magic, the server has now understood
20:35:42 [Xero] indeed it has
20:35:54 [Xero] however a pingless port scan on his ip still shows 2241 as filtered
20:35:54 [unimark] still doesn't download folders
20:35:54 [Xero] aka not responding
20:36:04 [Xero] and 2234 is shown as closed
20:36:04 [Xero] which is curious
20:36:22 [Xero] as all other ports in that area are filtered
20:36:22 [SeeSchloss] I won't say anything
20:36:32 [Xero] 2234 through 2240 are all "closed"
20:36:32 [unimark] plz don't bruteforce my router
20:36:40 [Xero] 2233 and 2241 are filtered.
20:36:46 [SeeSchloss] (but you know what I think, Xero)
20:36:46 [Google-Ninja] you mean DOS
20:36:50 [Xero] indeed
20:37:04 [Xero] i am not dosing your router
20:37:08 [unimark] dose me instead
20:37:08 [Xero] 2233/tcp filtered unknown
20:37:08 [Xero] 2234/tcp closed unknown
20:37:08 [Xero] 2235/tcp closed unknown
20:37:08 [Xero] 2236/tcp closed unknown
20:37:08 [Xero] 2237/tcp closed unknown
20:37:08 [Xero] 2238/tcp closed unknown
20:37:08 [Xero] 2239/tcp closed unknown
20:37:08 [Xero] 2240/tcp closed unknown
20:37:09 [Xero] 2241/tcp filtered ivsd
20:37:23 [Xero] that explains it better.
20:37:23 [SeeSchloss] once again, this man is a network admin
20:37:31 [Google-Ninja] mcse?
20:37:43 [Xero] well i think even a network admin could figure that one out.
20:37:43 [unimark] hah. no.
(20:40:30) hyuga.citan@gmail.com/Gaim: hehe
(20:41:35) hyuga.citan@gmail.com/Gaim: 20:38:04 [Xero] why is 2241 filtered then?
20:38:25 [Xero] it seems like the forward going to the box you're on now is busted
20:38:34 [unimark] how so
20:38:45 [Xero] because it wouldn't show up as filtered if it was forwarded properly
20:39:04 [unimark] define "forwarded properly" mr ping scan
20:39:23 [Xero] i didn't use a ping scan
20:39:23 [SeeSchloss] okay listen he's a network admin, and he knows how to forward a port.
20:39:28 [Xero] that was a pingless syn stealth scan
20:39:33 [Xero] haven't you ever used nmap ?
20:39:34 [newg] i've found what someone is claiming to be satellite anthem icarus from the new boc album
20:39:36 [newg] http://s16.yousendit.com/d.aspx?id=2AKAUFQ9H2PC030AQ1ZYOXL7A4
20:39:40 [SeeSchloss] it doesn't matter if the port is obviously not forwarded, he knows how to forward a port
20:39:44 [unimark] your nmap is strong

Sunday, September 04, 2005

Generate a generic cue from a bin

Downloaded sim city 4 last night, and some joker didnt include the .cues. for those of you who dont know, mounting isos in linux is a breeze (mount -t iso9660 -o loop ). mounting a cue/bin is something resembling hell, usually involving some flakey daemon tools clone that will take down your system half way through an install. so what most linux people do is convert cue/bins to isos using bchunk. bchunk however, demands a cue, even though its not too hard to have a "generic" cue that has no chapters or anything. since ive gone searching for what to stick in it every time i run accross this problem, i just did a small script to generate it for me.


#!/usr/bin/perl

$name = $ARGV[0];
$name =~ s/\.bin$/\.cue/i;

`echo \"FILE \\"$ARGV[0]\\" BINARY\nTRACK 01 MODE1/2352\nINDEX 01 00\:00\:00\" > $name`;

Saturday, September 03, 2005

Transcoding Ogg to MP3

Wrote a small perl script to convert oggs to mp3s in linux. you need vorbiscomment, lame, and oggdec:

#!/usr/bin/perl

foreach $file (@ARGV) {
if (!($file =~ /\.ogg$/)) {
print "Skipping $file\n";
next;
}
undef $year;
undef $artist;
undef $comment;
undef $album;
undef $title;
undef $genre;
undef $tracknum;

$id3args = "";

$year = `vorbiscomment -l "$file" | grep -i date`;
$year =~ s/^date=//i;
chomp($year);
$id3args = "$id3args --ty $year" if ($year);

$artist = `vorbiscomment -l "$file" | grep -i artist`;
$artist =~ s/^artist=//i;
chomp($artist);
$id3args = "$id3args --ta \"$artist\"" if ($artist);

$comment = `vorbiscomment -l "$file" | grep -i comment`;
$comment =~ s/^comment=//i;
chomp($comment);
$id3args = "$id3args --tc \"$comment\"" if ($comment);

$album = `vorbiscomment -l "$file" | grep -i album`;
$album =~ s/^album=//i;
chomp($album);
$id3args = "$id3args --tl \"$album\"" if ($album);

$title = `vorbiscomment -l "$file" | grep -i title`;
$title =~ s/^title=//i;
chomp($title);
$id3args = "$id3args --tt \"$title\"" if ($title);

$tracknum = `vorbiscomment -l "$file" | grep -i tracknumber`;
$tracknum =~ s/^tracknumber=//i;
chomp($tracknum);
$id3args = "$id3args --tn $tracknum" if ($tracknum);

chomp($year, $artist, $comment, $album, $title, $genre, $tracknum, $id3args);
$tracknum = sprintf("%2.2d", $tracknum);

if (($artist) && ($title) && ($tracknum)) {
$outfile = "$tracknum" . " - " . "$title.mp3";
`oggdec -o - "$file" | lame --add-id3v2 -q 2 -b 192 $id3args - "$outfile"`;

} else {
$outfile = $file;
$outfile =~ s/\.ogg$/.mp3/;
`oggdec -o - "$file" | lame lame --add-id3v2 -q 2 -b 192 $id3args - "$outfile"`;
}
}