Sunday, September 12, 2010

Radeon 5830 watermark issue

Since first install, as soon as I used the Hardware Drivers manager (used to install proprietary drivers after you install Ubuntu) to enable the "ATI/AMD proprietary FGLRX graphics driver" for full functionality of my Radeon 5830, I had an annoying watermark in the bottom right corner of my monitor.  It was always on top of everything, even when my power settings made my screen blank after x minutes of inactivity.  Not a serious problem, just gave me that dirty feeling of something being not quite the way it should.  I followed these instructions that I got from the official Ubuntu forums  (thanks to user Temujin) to fix the problem.  Some of these instructions I have paraphrased and some are taken verbatim.  I can not take credit for ANY of it and have simply reposted it in hopes to help someone else.


  1. Download this file to your home directory (~/) or move it there.  This is the control file from Catalyst 10.05.  Others might work, and I don't really know too much about control files.  I just know this one fixed my problem.
  2. Plug these commands into your console blindly.  I know this is generally ill-advised, but I'm telling you it worked for me under Lucid x86 with this particular video card so if you have the same setup and situation, it should probably work for you.
    • cd ~ This changes your working directory to be your home directory, where you have presumably placed the file you just downloaded.
    • tar xzf control.tar.gz This extracts the control file from the tar archive.
    • sudo cp /etc/ati/control ~/control.bak This is just you creating a backup of your original control file.
    • sudo cp control /etc/ati This overwrites the old control file (which you just made a backup of) with the one you've just downloaded.
  3. Log out and log back in to restart the X server.  No watermark?  Hooray!  Watermark still there or all hell broke loose?  Sorry!  Move on to the otherwise unnecessary next step.
  4. If you broke something in following these instructions, then be glad you made a backup because it's a simple fix.  From the command line, type sudo cp ~/control.bak /etc/ati and you're back to the drawing board, watermark and all unless god has intervened.
    The original post can be found here.

    Tuesday, September 7, 2010

    Cleaning, Sorting, and Tagging Your Music Library

    I think people with big collections would agree with me that if you're not fastidious about keeping everything perfect, you end up with albums missing one track, with an incomplete download or two, with no tags at all or with fields left blank, with goofy and confusing filenames, etc.  You may start a download and then just cancel it, or it may never finish.  Then, you forget it ever started and a week goes by and it's joined the ranks of your meticulously tagged and named mp3s.

    If you're like me, you also may like to have all of your albums and tracks to have a uniform scheme.  This is where a cross-platform called MusicBrainz Picard comes in.

    In case you haven't heard, Picard works alongside a database of full albums on their website which have ID3 tags corresponding with individual tracks, which live on the database as a part of an album.  Taken from the official website, "When tagging files, Picard uses an album oriented approach. This approach allows it to utilize the MusicBrainz data as effectively as possible and correctly tag your music. For more information, see the illustrated quick start guide to tagging.". 


    I like to change the settings in Picard before I start sorting and renaming my files.  In my particular situation, I have all of my music downloads automatically moved to a directory that I have named 'unorganized' (Deluge does this for me.  Here's how.).  So, once Picard does its magic, I want them moved into a parallel directory which I've named 'Full Albums'.  To achieve this, from Picard choose the Options menu and then the submenu also called Options.  Here you may as well enter your account info if you haven't, which is under General, and then move on to the Moving Files tab on the left.  I believe the only reason you need an account is if you want to change their database (for example, if some of their tags are wrong or you want to add an album that's not currently submitted.  This is the kind of stuff that you can do if you want to help make it even more useful, and it's actually kind of fun).  From here, just select where you want the files to go after they're all pretty.

    Next, under File Naming, I ticked the "Rename files when saving" box.  What this will do is change the actual file name based on the format you provide and the ID3 tags that it fetches from the MusicBrainz database.  Herein lies the convenience and awesome power of MusicBrainz Picard.  In the text box labeled "Name files like this", I came up with the following:

    %artist% - %album%/%artist% - %album% - $num(%tracknumber%,2) - %title%




















    which will get you a file that looks like this:









    .../Full Albums/The Beatles - Help!/The Beatles - Help! -  07 - Ticket to Ride.mp3


    and under "Name multiple artist albums differently" I came up with:

    $if2(%albumartist%,%artist%) - %album%/%artist% - $num(%tracknumber%,2) - %title%

    for a file that looks like:
    .../Full Albums/Various Artists - Explosive Doowops, Volume 4/ The Fantasys - 05 - Why Oh Why.mp3

    If you're up for the challenge, create your own file naming scheme using Picard scripting.  It's not that difficult, really, and official documentation can be found here. And is quite rewarding if you're the type of person that likes uniformity in filenames like myself [read: ocd]

    Edit: Note that if you have any non-audio files in the original (pre-Picard beautified) directories that hold your albums, Picard will not delete the directories after renaming/tagging/relocating the mp3s because they still hold files to which you may, but probably will not, want to hang on.  So, if you're moving albums from a directory of stuff you haven't fixed yet to a directory of pristinely-tagged and renamed files, you might want to just ditch the left over stuff such as album art and .nfo files.  If you're like me and prefer to ditch most of the remaining garbage, this can be done with a few commands.
    Things I opted to delete included album art (Picard will attach album art to the mp3's tags anyway and the most popular music library managers/music players fetch album art, so it becomes redundant), .txt files, .nfo files, thumbs.db's, etc.
    Here's how I did it from the command line.
    First, make sure you are in the proper directory, which for me was ~/Music/unorganized/.  Next, type any or all of the following (but be warned, it indiscriminately and recursively deletes all files that fit the description you give it.  If you have accidentally forgotten that you have a directory with all of your family photos in it hidden in a subdirectory of your music directory, you will irreversibly lose all of them.  Use with caution, and be sure none of the file extensions in the following commands are files you may want to keep such as playlist files!  These things you will have to relocate manually.).

    find . -iname *.jpg -exec rm {} ';'
    find . -iname *.m3u -exec rm {} ';'
    find . -iname *.nfo -exec rm {} ';'
    find . -iname *.sfv -exec rm {} ';'
    find . -iname *.txt -exec rm {} ';'
    find . -iname *.log -exec rm {} ';'
    find . -iname *.db -exec rm {} ';'

    find . -iname *.url -exec rm {} ';'
    find . -iname *.ini -exec rm {} ';'
    find . -iname *.dat -exec rm {} ';'
    find . -iname *.gif -exec rm {} ';'
    find . -iname *.jpeg -exec rm {} ';'
    find . -iname *.pls -exec rm {} ';'

    If you want to save yourself some time, you can just do this all in one line by chaining the commands together using && (again, this is very powerful so use your brain and be sure you're in the right directory meaning one that should only contain music, and that you actually want to ditch all files with the listed formats).






    find . -iname *.jpg -exec rm {} ';' && find . -iname *.m3u -exec rm {} ';' && find . -iname *.nfo -exec rm {} ';' && find . -iname *.sfv -exec rm {} ';' && find . -iname *.txt -exec rm {} ';' && find . -iname *.log -exec rm {} ';' && find . -iname *.db -exec rm {} ';' && find . -iname *.url -exec rm {} ';' && find . -iname *.ini -exec rm {} ';' && find . -iname *.dat -exec rm {} ';' && find . -iname *.gif -exec rm {} ';' && find . -iname *.jpeg -exec rm {} ';' && find . -iname *.pls -exec rm {} ';'



    Replacing -exec with -ok as in the command below will provide you with control over each file to be deleted.  It will prompt you to respond with a Y/N for every individual file.  It's more time-consuming, but it's more safe.  Below's an example of what that command would look like for jpegs.
    find . -iname *.jpg -ok rm {} ';'


    Once you're done with all of this you may wish to delete empty directories that may be left over from before you ran the command(s) if you have already used Picard.  For example, when I ran the above commands, I forgot the one for *.jpeg, which caused Picard to move all of the tracks and leave the folder containing just the album art.  So once I ran that command, rather than hunt for all of the now-empty directories that used to contain only .jpeg files, I did a little Googling and found the following command to delete empty directories.

    find -type d -empty -delete

    Don't say I never did nothin' for ya!