Ratonland Menu
Login
|
| Multi-clip | | Posted by bleader -- Sunday 21st of June 2009 10:47:25 AM | Language: Shell Script
Dependancies: xclip, dmenu
Version: 0.2
This tool was inspired by xclipboard and GNU screen's readreg feature.
The objective is to allow one to switch easily between multiple X clipboards content easily. You can store what is in your current clipboard by using the put command, give it a name, and it will be stored in the folder you specified. Through the use of the get command you can switch back to older buffers you saved. As it's using files to do so, you can find back things after reboot, or even edit them through your favorite text editor.
>>> Download | | -- 0 comments -- |
| Linux Open Source Radeon driver | | Posted by bleader -- Thursday 21st of May 2009 12:21:31 PM | For those of you who are just interested in the explanation and configuration just jump to the next part :)
Last month, ATI released their 9.4 catalyst drivers with one new thing for me: they dropped the support for most card up to radeon 1950. This means no new drivers for these cards, the 9.3 is the legacy support. Sad thing in this story ? Xorg is constantly changing, the kernel too, changing APIs between releases, thus the new Xorg server isn't compatible with older releases.
Of course all new distribution are switching to this Xorg version. Ubuntu (which I'm running on my main computer) switched to it in 9.04, therefore to update my linux and keep something running I had 3 possibilities:
- Use vesa driver
- Change my video card
- Switch to open source driver
Of course vesa isn't a solution at the resolution I'm using the display will be reaaaaaaaally slow. I already spent enough money lately not to feel like changing graphic card (well, of course I had a look and was thinking about it, but I'd rather not).
So the only option left was to get rid of the fglrx (ati proprietary driver), and use the open source one.
That's where it became tricky.
Switching from fgrlx to radeon(4).
Unfortunatelly I fiddled quite a bit to make this happen and didn't write down every steps I did, but I'll try to write down as many information as I can. One main problem I encountered is that all tutorial to do this out there are assuming you're using fglrx packages from your distribution. I've never done this, got used to build it myself from ATI installer and that's it.
So first things first, you can't have loaded the fglrx kernel module at any time, otherwise the radeon driver won't get you accel. Therefore you need to make sure that every single place in /etc/modules /etc/modprobe.d aren't loading fglrx at boot time (check /etc/rc.conf in Arch, modules section may load it too).
I actually blacklisted it in /etc/modprobe.d/blacklist.conf.
The next problem is that the libGL.so used is the one from the fglrx driver.
Some people are saying you can just remove those in /usr/lib/xorg and this will do, unfortunately, it didn't for me, those in /usr/lib were also from fglrx. Note that this may be coming from older installation, the original installation of this ubuntu goes back 3 years, and I've always installed fglrx manually, one can hope this won't be needed for most people.
To resolve this issue, I have to reinstall mesa packages to be sure it would overwrite this file, now that everything is find I can use dpkg to find out where this is coming from:
bleader ~ % locate libGL.so
/usr/lib/FGL.renamed.libGL.so.1.2
/usr/lib/libGL.so
/usr/lib/libGL.so.1
/usr/lib/libGL.so.1.2
bleader ~ % sudo dpkg -S /usr/lib/libGL.so.1.2
libgl1-mesa-glx: /usr/lib/libGL.so.1.2
In order to reinstall this I issued:
sudo aptitude reinstall libgl1-mesa-glx
To check that things are working just issue:
glxinfo | grep -i direct
If you get a No, you can run:
LIBGL_DEBUG=verbose glxinfo
And try to debug it for yourself, that's how I found that libGL.so was trying to load unknown symbols, meaning in my case that it was fglrx version. At this point patience, luck and google are your best friends to get around this issue.
This being done you can change your /etc/X11/xorg.conf, by replacing:
Driver "fglrx"
By:
Driver "radeon"
Now for the options of the radeon(4) driver, I played around a bit and ended up with these:
Option "AccelMethod" "EXA"
Option "ColorTiling"
Option "EXAVSync"
Using theses let me get Xv video smooth without tearing, even with 1080p in fullscreen. While reading around the web about the configuration I also saw people advertising these options:
# Option "XAANoOffscreenPixmaps"
# Option "AccelDFS" "off"
# Option "EnablePageFlip"
I cannot recall exactly all details, but AccelDPS off was getting my X some kind of laggish rendering, like switching from one window to another was actually done as usual, but the visual feedback that it happened was taking some time, and one or both of the other was making my Xv video playing horribly slow. That's why I left the # in front of the line to avoid.
Well I hope this little piece may someday help someone switching to radeon(4) too!
| | -- 2 comments -- |
| Sound strangeness | | Posted by bleader -- Sunday 08th of March 2009 18:31:03 PM | A few "tags" if I can call them like this so google index help people with this kind of trouble finding this post:
alsa raw decode no sound fix asound.state iec958
--
I don't use it very often on my main computer, but sometimes, to watch DVD when I have trouble with mplayer crashing, or want to use the menu, I use XBMC.
As my sound system is able to decode AC3 and DTS sound stream, I switch XBMC to raw output so the sound system will decode the stream itself. The main problem is that XBMC isn't stable at all here, and it does crash most of the time when playing around with DVD (which I should try to remember for next time, no use in trying something that won't work anyway).
The main problem here, is that XBMC does change something in my ALSA settings and when it crashes, I end up with no sound because music, online videos and such are not in these formats, and should be encoded before being sent to the sound system... It seems that these settings are NOT all possible to change using the tools to configure your sound card, and it then become impossible to get sound except if I can overwrite alsa's sound states with a backup that I do have at hand...
The main point of this post is for myself to have a place to find out where this file is on ubuntu:
/var/lib/alsa/asound.state
I always end up searching for .conf files, or *alsa* and so on and spend half an hour pulling my hairs out searching "how did I fix this last time it happened?"
And maybe this can be handy to someone getting in the same kind of troubles as me. | | -- 1 comments -- |
| PV: Pipe Viewer | | Posted by bleader -- Saturday 31st of January 2009 11:14:53 AM | When you're copying a file on a network share for example, it tends to be slow, you'd sometimes like to know where you are.
Well even if the basic idea is just to monitor the speed of writing to a pipe in shell, you can actually use it to copy a file and monitor it's progress. It's quite nice and will avoid me to start Midnight Commander just to be able to see the speed of a copy.
pv source > /mnt/srv/destination
4.14GB 0:07:07 [8.96MB/s] [======> ] 52% ETA 0:06:26
PV's homepage.
Note for my dad: No, this has nothing to do with what you're thinking about... Unfortunately. | | -- 0 comments -- |
| Random I am | | Posted by bleader -- Thursday 22nd of January 2009 16:56:58 PM | Named after the Millecolin song, this post is about avoiding to make decisions by yourself and let a random number generator do it for you... So now when you'll be wondering "what shall I eat this evening ?" you can just type "choose pizza kebab guiness^W steack paella chilli" and just go for the one randomly chosen.
The funny part with this is that you'll quickly realize that the "random" choice you make yourself in this kind of situation, are absolutely not random but well chosen based on your feeling, and you'll end up choosing something else than what the script felt on.
It comes in 3 flavors!
Perl:
#!/usr/bin/perl
my $choice = int(rand(scalar(@ARGV)));
print("$ARGV[$choice]\n");
Python (thanks to JP for this one):
#!/usr/bin/python
import random
import sys
print random.choice(sys.argv[1:])
Shell:
#!/bin/sh
choice=$RANDOM
let "choice %= $#"
args=("$@")
echo ${args[$choice]}
| | -- 0 comments -- |
| Setting up the server | | Posted by bleader -- Saturday 20th of December 2008 13:05:44 PM | Now that's I've moved in with Kraken, we obviously needed a server to store data in a centralized place and avoid duplicating thing everywhere across our computers.
We already had most of the parts we needed for this box, we just had to buy a mother board and hard drives. Unfortunately we took the best price/features ratio we found quickly (w0rst was parked outside of and waiting for us). And that's where things are getting fun.
1- IDE chipset
We had a harddrive for the system, with an arch linux already installed, but it wasn't booting up, unable to find rootfs. Arch live CD wasn't starting. Yes that's true: we managed to buy the one motherboard that wasn't working at all with the OS we had all setup before... An older ubuntu CD was booting ok, and after some research we found out that linux kernels from 2.6.25 up to 2.6.27 have a regression and that the IDE chipset isn't working... So we built a custom kernel 2.6.28-rc8 and finally got it to boot. I've speed up the explanation because this step was really an annoying one and took a while...
2- Fglrx kernel module
We've bought ourselves a nice Full HD TV, and this computer in addition to be a server will be used as a mediabox too, so we had to setup Xorg properly to watch movies and eventuelly play a few games (Frets on Fire and Mame).
I had the bright idea to compile the linux kernel in an unconventionnal place, therefore the build script of ATI wasn't able to build the kernel module. I didn't see the error message being too busy ranting about everything not working and me being pissed off... The bad point is that Xorg and the fglrx driver didn't even warn about this, X was simply freezing at boot time, no warning no nothing.
On a hinch I checked if the module was loaded and found the problem. The fix itself was a quick one.
3- Black borders
We spent a large amount of our evening trying to find out why the hell we had a black border around the screen instead of being completely fullscreen.
The problem wasn't showing with radeonhd driver, but we had other troubles with it so we stayed focused on fglrx fix. I played with modelines and tried a lot of things. It happens to be that the problem is only present when connected through a dvi->hdmi adapter, the driver place the screen at some strange position. I found the solution over at phoronix
[root@pouet linux-2.6]# cat /usr/local/bin/fglrx-pos-fix.sh
#!/bin/sh
aticonfig --set-dispattrib=tmds1,positionX:0
aticonfig --set-dispattrib=tmds1,positionY:0
aticonfig --set-dispattrib=tmds1,sizeX:1920
aticonfig --set-dispattrib=tmds1,sizeY:1080
aticonfig --set-dispattrib=tmds2i,positionX:0
aticonfig --set-dispattrib=tmds2i,positionY:0
aticonfig --set-dispattrib=tmds2i,sizeX:1920
aticonfig --set-dispattrib=tmds2i,sizeY:1080
4- Bluetooth
We were planning on playing Frets on Fire with the wii guitar hero 3 controller, which obviously is using the bluetooth to connect.
Of course we lacked the kernel module for this... I built it, installed it and... nothing I had no clue why the hell we weren't getting the device, the driver was there, loaded and all I could see it in another computer with the same driver, but no, nothing. /etc/rc.d/dbus start and we were ready to go. That's quite frustrating.
5- XPad
We were willing to play in two player mod too, as we have only one wii gh3 guitar, we needed my playstation 2 gh2 guitar. with the adapter, of course once again we were missing the driver, but this one was painless to install.
So we finally have something almost working straight away, there's still the issue of wminput (the userland driver to get the wiimote to be recognized), the main problem is as long as the wiimote is within range it will stay sync, given the battery consumption of the wiimote this can be quite a problem... But things start to get in shape and I'm confident that it will be working as we expect it to in a little while either this weekend or the next one.
Incoming fun:
- lvm stripping test (with the 2 brand new sata2 hard drives), to have a look at performances.
- samba and nfs
- ftp
- switching to gigabit network
And that's should be it. Let's hope these steps will go smoothly. | | -- 0 comments -- |
| Update | | Posted by bleader -- Saturday 20th of December 2008 12:38:48 PM | I battled quite a bit with the server we're setting up here, but before talking about this, I may as well define "here" and take some time to update people that may know me and are not aware of the latest changes. Get ready for the blog time.
Well, first I got back from UK early october, then I started searching for a job, which went pretty well and within a short span of time I ended up working at 6WIND, and I'm really happy about it. Given the commute time it was from home, I recently (beginning of december) moved in with Kraken, in Boulogne, and I think that's about it about my life.
I'm just missing my mom's food, but I like to cook, so that's fine.
I'll stop here and jump to the next topic in another post. | | -- 0 comments -- |
| Denmark pictures | | Posted by bleader -- Sunday 31st of August 2008 15:49:13 PM | I uploaded the pictures at the beginning of the week and completely forgot to post the links here, so here we go:
Copenhagen, the weather was awful, but the trip very nice anyway. But because of the light the pictures are really not great...
Helsingør and Helsibörg, a nice little trip in Sweden, nice weather, nice place, a suprising unplanned car show in the middle. The picture are ok thanks to the light, but I was too lazy to process them properly, should be better than this with some cropping and improvement.
Anyway enjoy ! | | -- 0 comments -- |
| Wow orange! | | Posted by bleader -- Saturday 23rd of August 2008 10:55:37 AM | As you may or may not know if you're not french, orange is what was previously France Telecom, merge in mutliple section, mobile phone, internet provider etc... So in addition to borke my connection for no reason an taking 3 days to repair their mistake, here we go:
- Paying people to line up for the release of the iPhone in Poland
Wow.
- Filtering outgoing mails (and you cannot escape it easily as they refuse connection to others SMTP servers):
Only with orange !
They're overdoing themselves these days. | | -- 1 comments -- |
|