No more random crashes on my MythTV machine…

The machine that MythTV runs on has had a lot of ‘vague’ crashes over the last few months. Starting Firefox for instance, and dragging the window slowed down the system severely and even crashes it. I had always assumed this having to do with the NVIDIA driver, as *not* loading that driver prevented the crashes. But, for reasonable performance I really had to load that driver… with one or two crashes a week being ‘normal’.

So that’s not good at all… not ideal anyway. So yesterday I took the plunge and updated my MythTV machine [which was running Slackware 13.0 at the time] to 13.1 using the ‘slackpkg’ tool. I read that some people were succesful using that tool, so that was enough for me. (I did have to edit the /etc/slackpkg/mirrors list a couple of time to force it to point to the new 13.1 repository though, and I had some other ‘minor’ issues [device files for hard-drives not created upon boot among other things].)

Anyhoo, when finally up and running I decided to boot up Firefox, I noticed it DID NOT CRASH.

It was a problem with, I guess, the X server all along, or some other library being included.

Me = happy now. I don’t have to browse Wikipedia or Google with my mobile anymore if I want to look up something while in the living-room… :-)

Woops, I forgot my password (or: “*Sigh*, again that unsafe INPUT TYPE=”PASSWORD” thing!)

It happens to each and everyone of us at least every once in a while: you hit a website you only scarcely visit and you need to type your password again.

But you forgot it in the meanwhile…

Usually, you used Firefox’s “Remember my password for this site” to remember stuff *for* you. This works out, most of the time…. until you change your computer and you do not have access to the cached passwords anymore.

Likewise, simply copying the “signons.sqlite” file to the new machine will not work, the passwords are encrypted with the master password.

Luckily, I *do* still have access to the old Firefox running on the old laptop…

So, I visited the website I wanted to log into and lo and behold, it filled in the cached username and password… Firebug is an excellent tool that can help out here — find the input that contains the password field and remember its ID. Then, in the location bar, type the following, et voila, that’s your password right there:
javascript:alert( document.getElementById( 'password_field_id' ).value );

I hear you say, “there’s nothing spectaculair about this, this is a very old and known trick”. Yes, I know — all the more reason to find it ridiculous that this still works!

Amazing that such an unsafe ‘feature’ like the password field still exists nowadays.

Fear Whitey (Obama)

Obama apparently backs ACTA.

And all other so-called “laws” that ought to protect “intellectual property”.

To prevent other people from stealing it and putting it on the market with cheaper labour.

So that’s saying: we want to protect intellectual property. Because we are so smart and innovative.

But you must pay the full price that we put to that crap we produce. Can’t have any fair competition giving everybody the change to market it…. :P

(Ironically, USA wouldn’t have been there if all that criminal scum didn’t leave Europe, so factually, all your base belongs to us *anyway*.)

Obama: you’s the white man’s new bitch. The biggest one ever. Oh my god how many people you must put to shame with your “white” behaviour. Bitch is worse than the KKK….

Haha, damn criminals, each and every one of those politicians. :-D

Oh fuck, it’s not even funny.

I feel really sorry for the people that thought the world was seriously going to change for the better when that clown took that post.

But hey, you /could’ve/ seen this shit coming.

FoxFilter so easily defeated it’s ridiculous ;)

I was tinkering with Firefox, trying to get something to work. I wanted to do something between certain events, rather that on those specific events.

Anyway, deciding I’d take a little peek in the first random Firefox filtering plugin that I could find, downloaded it from “some site”, and unpacked the XPI.

This immediately caught my eye, and any coders should see the obvious error:

    //don't hide page if within FoxFilter mgmt pages
    if(aURI.spec.indexOf("chrome://foxfilter") != -1)
        return;

That is definitely not the way to check for such an URL. Quite a “beginners” error actually. I wanted to confirm this makes the whole filter useless, but was incorrectly thinking that I had to register first before using the plugin — so closed the browser and deleted the add-on.

Later I thought differently, and couldn’t resist finding it again and re-installing it. This time I downloaded it from the Mozilla Add-On site; and an agreement I had to agree to. Oh well…

There this caught my eye though: “The FoxFilter Team has spent HUNDREDS of hours in development, maintenance and support of FoxFilter. We are very proud of our product and are very happy that is helping protect children, teens AND adults from inappropriate content on the Internet.“.

Hundreds of hours missed that obvious error? Took me barely 5 seconds… ;-) OK enough with the being cocky already…

Anyway, downloaded the thing again; re-installed it and confirmed filtering was succesful when I went to “http://www.playboy.com”.

And, confirmed that it horribly failed on “http://www.playboy.com/?chrome://foxfilter“.

Yep, it is that easy. Then to think people pay for something it cannot really do (well until it is patched of course):

Premium Features

In addition to all of the great filtering features that have always been free of charge, we also offer security features as part of our premium service. Security features provide you with the ability to secure your settings with a password and prevent FoxFilter from being bypassed, uninstalled or disabled. A small support fee is required to obtain a registration code which enables the security features.

I’ve always thought that one should never, ever, trust software to do things that they claim to do properly. Even the most advanced logic could be bypassed by a silly mistake before it even reaches your advanced logic. If you got the chance to check it out, you should — just to prevent surprises in the future…

OK back into my lair…

Script to disable the OOM killer on certain processes

My LinuxSampler set-up was having odd crashes lately. Took a while to figure to they were caused by the OOM killer killing the process. (Granted, not weird if you only have 256MB of RAM…)

Quite annoying, I do not want that process to die (nor the “jackd” process).

After having stumbled upon this page about the OOM killer, I wrote this little script, which I run just after jackd and linuxsampler have set-up (as root of course).

It’ll write the value -17 (OOM_DISABLE) to /proc/<pid>/oom_adj for selected process-names and this ought to prevent the OOM killer from ever targeting that process.

Haven’t seen it crashing on me since — but of course, your mileage may very… :)

Woot! :-)

In recent months I’ve been taking up my old “audio hobby”… I’m Dutch, so, it shouldn’t cost much — the reason I’m using open-source only.

The hardware collection is slowly growing (still in the process of acquiring all the basics though). The most recent addition was a 61-keys USB MIDI keyboard. I always wanted to have a velocity-sensitive keyboard since I was a young kid. Back in the days those things were awfully expensive and now they are very reasonably priced! (Next obstacle: actually learn to play the damn thing. :D )

Anyway, almost everything in the set-up works fine. I could play back my compositions — but the ‘jackrec’ utility was inserting static after 10 or 15 seconds (always at about the same time, but it depended on the buffer size that I used).

This prevented me from getting a whole piece olayed back and recorded into a file. Kind of a bummer, that being the most essential part of the process…

Before debugging it myself, I tried compiling a more recent version which “just works” perfectly. So that was cool. :)

Having updated LinuxSampler recently as well, today I have been testing out the complete set-up of “new” audio software to get to grips with the “mastering process” to get Rosegarden compositions into a portable format like WAV and MP3.

My Rosegarden app is running on a real-time kernel and it uses MIDI (over network transport with JACK) to talk to my LinuxSampler running on another machine (also a real-time kernel)… Latency isn’t that bad at all. (But I do have the machines on a seperate switch so they don’t have to deal with all the other network traffic.)

I free-styled a short little piece with, at times, a hideously out-of-tune accompaniment (I didn’t care to re-do it or to tweak it). I did care about the even more hideous percussion track — which I have muted in the final file below.

The Reverb and EQ-ing is done real-time with ‘jack-rack’, but that is something that I really need to do later in the process. Not only would it reduce load and latency; doing it later would allow me access to some non-realtime LADSPA plugins (with Audacity).

BTW, speaking of Audacity, one of the most cool features is, when zoomed in at a high level, you can use a draw tool to polish away clicks and pops.

The original recording of the “mastered” file had one distinct click that I could get rid of in such a way.

Check it out — it’s free “music”! (Yeh, you get what you pay for ;-) )

That’s Microsoft, allright…

Sickening stuff: How to Get Your Platform Accepted as a Standard – Microsoft Style

Next time somebody believes your usage of the dollar sign when typing “MS” is childish, re-direct those people to that article….

‘Nuff said… :P

Sean, have you read this?

Soylent Green is coming.

Ouch, McKinnon extradition emminent…

Who the fuck were they trying to kid anyway — trying to prevent the USA from getting their scapegoat: Gary McKinnon is to be extradited to US.

If he is prevented from committing suicide, and if he’s technically any good, he is most probably going to end up working for the US army.

Either way, good bye Gary, and do whatever you got to do…

<rant>
I know your story shall not be forgotten. In fact, this is surely going to cause more agression towards the USA — which, of course, is exactly the plan: the more people upset with the US, the more people organise — which means that more groups of people can be targeted as “sleeper cells” and end-up as so-called non-combatants in some foreign prison getting humiliated…

The more we look at this and get used to it, the easier this excuse can be used to take out any voices of freedom. (Freedom != democracy — you could be called a non-thinking idiot to think otherwise.) From terrorists to the non-violent political groups — people arrested and never to be heard of again. This “movement” has been happening for almost a decade now — it started since that 9/11-facade and has been speeding up ever since.

Speeding items shall definitely run into a wall at some point, but I sincerely hope it won’t do too much damage to the not-so-guilty. (We’re all responsible for baking this global shitcake, actually…)
</rant>

nekobee — mapping the controls to the M-Audio X-Session Pro

I was tinkering with Nekobee today and wanted it to respond to the top two rows of 4 knobs each on my M-Audio X-Session Pro MIDI controller. This, so I can easily tweak the sound using those knobs rather than using the mouse…

I had to use ‘midimon’ to find the correct values and changed the defines in nekobee_synth.h.

After doing this, I found that the Volume knob was not responding correctly (it was not updating while I twisted it, nor did the sound change). I had to mess around in another file as well…

If you also want to be able to use the X-Session Pro mixer controller as a musical instrument: here is the patch.

I was pleasantly surprised to notice that Rosegarden nicely records those tweaks as well, so if I play back my composition, the knobs in the interface turn, too. Nice ;-)

One word of warning though: this patch locks the controls to the X-Session Pro. In the event of other hardware and having changed these mappings again, all your old compositions in your favourite MIDI sequencer shall no longer play back like it sounded before. Keep this in mind…

The Art Of Noise feat. RAKIM

Wow, under what stone have I been living? :)

As a young kid I bought almost all the Art Of Noise’s music. Likewise, Rakim (of Eric B and Rakim fame) has been an inspiration as well…

And I only just now discovered they once did a collaboration together… Sweet! :-)

knobs-20091116 (Mixxx)

I once decided to create new skin for Mixxx a long time ago.

But never gotten further than the actual script that generates all the different states of a “volume knob”:

As I never shall get around to finishing my own skin anyway, I have posted a sample of these knobs to the Mixxx mailing list for comments as I believe they can make Mixxx look better.

Since then, some comments have been applied and a seperate ‘balance knob’ is now rendered.

These buttons can be used as replacement buttons for the outlineNetbook skin, or any other skin that uses 29×29 size buttons.

Updated: The balance knob, when centered shows a single green led and the marker line is now darker.

If you want to use them as well: here it is.

Native Instruments AUDIO4DJ & jackd & mixxx

I’ve been trying to optimise my laptop so I could get Mixxx, an open source DJ-ing application, to run on it smoothly. The only thing I hadn’t tried yet was using the JACK Audio Connection Kit, i.e. JACK. Word is that audio applications using JACK have very low latency.

The best I could get Mixxx to run using ALSA devices was with 32 ms latency. And even then, audio still occasionally popped and cracked (worse even when the Nvidia driver was still using agpgart).

Popping and cracking kinda ruins the whole experience, so the potential performance benefit of a functioning JACK set-up is something that I “needed”.

Not working :(
For some reason though, initially, I could not get Mixxx and JACK work nicely together with my AUDIO4DJ audio interface.

This USB audio interface has 2 stereo in- and outputs; and I could only get either 1 output and 1 input. Without a headphone output and a 2nd input for vinyl control using JACK would render the whole set-up useless…

Some Googling did reveal some hints, like modifying the /etc/asound.conf file. I thought I had already done that earlier; but apparently this does not work with JACK.

See, my “old” asound.conf split the audio device up to two devices (I used one for the Master, and the other one for the Headphone output in Mixxx.) JACK can only handle one (or I am doing something wrong), so that had to be changed…

Solutions suggested in this thread on the NI forums did not work for me either, I ended up with the same problem basically: only one input and one output.

Working! :)
That thread did give me a hint to the solution — the following /etc/asound.conf, works for me like it should: it exposes a single “AUDIO4DJ” device, which binds stereo channels A and B to it:
pcm.AUDIO4DJ {
    type multi
    # bind hardware devices
    slaves.a.pcm "hw:0,0,0"
    slaves.a.channels 2
    slaves.b.pcm "hw:0,0,1"
    slaves.b.channels 2
    # bind channels to virtual device
    bindings.0.slave a
    bindings.0.channel 0
    bindings.1.slave a
    bindings.1.channel 1
    bindings.2.slave b
    bindings.2.channel 0
    bindings.3.slave b
    bindings.3.channel 1
}

(Note that slaves.b.pcm “hw:0,0,1″ — which points it to the B channel.)

That way, I can now use that “AUDIODJ4″ as a device-name in qjackctl as Input- and Output Device, each giving 4 channels (2 stereo channels).

If I now go into the Audio preferences in Mixxx, I can select channels 1-2 for the Master output and channels 3-4 for the Headphones. Similarly, for Vinyl Control, the first input deck can be put on channels 1-2 and the second on channels 3-4..

It took a bit of tinkering but, again, it was worth it!

Now that JACK is properly working and Mixxx can use it, vinyl control response is amazing and the audio playback is exceptional — I haven’t heard a pop or crack since!

NVIDIA nvagp/agpgart module woes…

So I was trying to optimise a laptop for audio playback and wanted the NVIDIA driver to use the its own NvAGP rather than the linux supplied ‘agpgart’ module. The reason being that the performance may be better, and I have this obsession with optimisation… :)

This wasn’t as easy as it seemed as for some reason, blacklisting the ‘agpgart’ module did not seem to have any effect.

Why is it still loading the agpgart driver?
Running “modprobe -nv nvidia” it showed that it kept depending on the ‘agpgart’ module somehow.

A quick Google only showed other people having the problem, but alas, no solution.

Further poking around, I noticed when doing a “depmod -v” — which outputs module dependencies to standard out — that the nvidia module indeed depended on it.

Aha!
Hmmm… So I dove into the NVIDIA driver source (which I had to modify for a real-time kernel anyways, so the unpacked nvidia installer package was still on my system), and noticed the culprit.

The nv-linux.h file contains the following lines:
#if defined (CONFIG_AGP) || defined (CONFIG_AGP_MODULE)
#define AGPGART
#include <linux/agp_backend.h>
#include <linux/agpgart.h>
#endif

The CONFIG_AGP and CONFIG_AGP_MODULE it gets from your kernel configuration and presumably, this is what compiles in stuff that makes it depend on the ‘agpgart’ module. I put those lines in as /* comments */ and tried loading the module.

Indeed, it now does not depend on ‘agpgart’ anymore and shall use ‘nvagp’ now. And the time spent on it was worth it: I even got about 200 frames per second increase with glxgears. :-P

NG-BASIC is moving!

Hi there people!

Interesting times ahead for my pet project NG-BASIC!

After long deliberation I have decided to transfer the ownership; transfer the ownership to a new owner that is going to breathe fresh life into the project.

It shall be actively developed on — something which I can’t do anymore as I seem to be wasting more and more spare time on work. :P

I must say it feels weird to let go of it… I guess it’s similar to what an artist feels when he sells a painting (well I like to think so anyway).

When I initially wrote it I never expected anyone to be interested at all. Perhaps one or two like-minded people — I did not expect more for a “toy” programming language.

The emails I got and the amount of downloads over the years show differently: there’s still quite an interest in BASIC, be it because of the geekiness of it running in a browser; to quickly get some calculations done; to explain somebody the basics of a programming concept; or — for people born in the 70s and 80s — just out of pure nostalgia.

So, that’s all very cool and I’m glad that people enjoyed it and hope they will do so in the future.

I believe it will be in good hands at its new home. In a different context (read: not on my personal weblog with, for perhaps some people some non-subtle opinions) it can even reach a broader audience…

It will surely be interesting to see how it’ll develop, literally. :-)

Farewell — may it be in for a nice ride!

© 2005-. All remarks and opinions on this site are the intellectual property of Navaho Gunleg, unless specified otherwise. If you find anything offensive or otherwise insulting, just close the damn window; there are far more serious issues in this world to get upset about.