Adventures in not actually frying my USB bus

Well, that was exciting. I had an unplanned adventure in technical troubleshooting today.

The symptom: USB isn’t working properly. Low-speed 1.1 devices work, but USB 2.0 appears busted. Rebooting doesn’t fix the problem. Trying other kernels doesn’t fix the problem. The problem also exists in Windows. All googling indicates possible hardware failure. Shit.

I really didn’t want to call tech support, so I actually ran the Dell Diagnostic help tree that comes with their installation of windows. Some of the questions are obvious, like, are the ports physically damaged, but as you drill down it makes a very helpful suggestion: Try running the diagnostics program that came with your computer!

In my case, Dell has a program that will burn a bootable CD. That CD will test the entire system, including the USB subsystem. Interestingly, the diagnostic came back clean. How can USB be busted if the tests are ok?

Ultimately, I have no idea, because when I rebooted into Windows the problem was gone. Booting back into linux, the problem was fixed there too. And here I thought I would have to replace the motherboard because of a burnt-out usb system.

The first moral of the story: It is possible for linux to fuck up USB so bad, a reboot and power-cycle won’t fix it.

The second moral of the story: It’s really nice to have windows around when you want to see if a problem is linux-specific, or hardware-specific. (The same goes the other way. If you have windows installed, it’s nice to have a linux installation, or at least a boot disc, so you can try stuff out.)

The third moral of the story: Even if you think you are technically able, don’t jump to the conclusion that a problem is fucked hardware. Go through the motions of troubleshooting the problem, and who knows, it might actually be fixable without mailing your part in for service. I was this close to calling Dell, and there would have been no need.

Edit:
Hrm. Well, the usb died again. This time the dell diagnostic didn’t bring it back. Time to call tech support

Edit 2:
Double hrm. Spent an hour on the phone and screen sharing with Dell tech support, who proved completely immune to my evidence that this was a hardware issue, not a software issue. They installed some driver and the problem went away, but I think it’s just like last time — it randomly fixed itself and the problem still remains. The best part was when the tech support person suddenly decided to become a sales rep and asked me why I hadn’t bought dell’s extra Accidental Protection Plan or some shitty tuneup software. Way to put progressbar time to good use, assholes.

More Audio 4 DJ tricks

In my DJ setup, I use the JACK sound server to link my mixing program to a bunch of fun effects. It is possible to get JACK to perform at extremely low latencies (~6ms and less) but it’s hard to get all the options just right. For the benefit of others who don’t want to go through the same trial and error I did, here is the command line I’m using to launch jack:

jackd -R -P 99 -p128 --timeout 4500 -d alsa -d AUDIO4DJ -p $size -n $periods -i 4 -o 4 -r 44100

Here’s what all that means:

  • -R: Realtime mode
  • -P 99: Realtime Priority value (maxed out)
  • -p 128: max jack ports
  • –timeout 4500: client timeout in ms. This is very important, because Mixxx might hang for longer than the default 500ms when it’s loading tracks. If that happens, JACK kicks out Mixxx and playback stops
  • -d alsa: Use ALSA backend

(Note, after this argument, the rest of the arguments are ALSA-specific

  • -d AUDIO4DJ: use the AUDIO4DJ alsa device (see my previous post)
  • -p $size -n $periods: These two options are what determines the size of the sound buffer. The first number is the frame size, in bytes (I think). The second is the number of frames. Multiply the two together to get the total size. With a special realtime kernel, I can set this to 64 and 4 (total: 256, or about 6ms). With a standard kernel, it has to be 128 and 3 (total: 384, 9ms). The idea is you want to get the total multiplied number as small as possible without inducing the dreaded XRUN, which happens when your computer can’t feed audio to the sound card fast enough.
  • -i 4 -o 4: 4 inputs, 4 outputs
  • -r 44100: CD-rate audio

Yeah, I know, if I just bought a mac and Traktor or Serato I wouldn’t have to deal with this shit, but I’m cheap and can’t resist a challenge.

Native Instruments Audio 4 DJ on linux

The Native Instruments Audio4DJ is a professional-quality USB soundcard for DJing that is also supported under linux. Like mode devices that are “supported” under linux, however, it can be tricky to set up correctly. In my case, I need the device to work with the JACK sound server, and I needed to do a little extra work.

The first trick is setting up ALSA so that JACK works happily with the card. The problem is that the drivers don’t supply any regular mixer controls for the Audio4DJ, which makes jackd unhappy. So when creating a .asoundrc, it’s necessary to substitute the internal soundcard as the mixer elements for that device. Putting this text in ~/.asoundrc does the trick:

pcm.AUDIO4DJ {
    type multi;
    # bind hardware devices
    slaves.a.pcm "hw:1,0,0";
    slaves.a.channels 2;
    slaves.b.pcm "hw:1,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;
}

# JACK will be unhappy if there is no mixer to talk to, so we set
# this to card 0. This could be any device but 0 is easy. 
#note that audio4dj is actually card 1 -- we are faking mixer elements so JACK is happy:

ctl.AUDIO4DJ {
        type hw;
        card 0;
}

The second question is how to change the input mode of the Audio4DJ from phono to line and back. Normally this type of setting would be found in the alsamixer program, but for some reason it’s hidden away. This script makes it easy:

#!/bin/bash

if [ "$1"x == "x" ] ; then
	echo "$0 [phono|line|timecode]"
	exit 1
fi

dev=`aplay -l  | grep Audio4DJ | grep "device 0" | cut -d\  -f 2 | cut -d: -f 1`
if [ "$dev"x == "x" ] ; then
	echo "Audio 4 DJ not connected"
	exit 1
fi

result=0
if [ "$1" == "phono" ] ; then
	amixer -c $dev cset numid=1 2 > /dev/null
	result=$?
elif [ "$1" == "line" ] ; then
	amixer -c $dev cset numid=1 1 > /dev/null
	result=$?
elif [ "$1" == "timecode" ] ; then
	amixer -c $dev cset numid=1 0 > /dev/null
	result=$?
else
	echo "$0 [phono|line|timecode]"
	exit 1
fi

if [ $result -ne 0 ] ; then
	echo "Error setting Audio 4 DJ input"
	exit $result
fi

Black Friday Mixxx Session

This is my mix for November. Black Cat, White Cat is a crazy, awesome track.

  1. Luca Cazzoni & Naila`kil – High spirit (Original Mix)
  2. Catstayslow – bumba
  3. Steve Bug – Look Who’s Stalking
  4. Alyn Sclosa – Organo
  5. Riva Starr – Black Cat, White Cat feat. Noze – Original Mix
  6. Damolh33 – A straw hat
  7. James Wyatt – She’s Got Nic
  8. hermetico – parabolica
  9. Joel – Laufen (Live)
  10. alec troniq – 03 i`m the foolaloof [agaric rmx]
  11. Claude VonStroke – Vocal Chords – Original Mix
  12. JuanMP – Double Block (Bubbaloop Remix)
  13. andre lanine – harp (crispmeister warp mix)
  14. Luca Lozano – Berlinetta – Original Mix
  15. Damolh33 – Innocence
  16. Sis – Dim Dim
  17. alec troniq – 05 i`m the foolaloof [tim susa vs. jan yang rmx]

Black Friday Mixxx Session by ywwg

Ideas for GNOME Shell

GNOME Shell is an interesting project that is trying to redefine how users interact with their applications, windows, and documents. The project shows a lot of promise, and works quite nicely in practice. While I like the overall design, I dislike the current system for launching common applications. Right now, the “activated” mode of GNOME Shell looks like this:

Current GNOME Shell mockup
Current GNOME Shell mockup

Nine spaces for commonly-used programs? Not enough. Furthermore, if I just want to launch a program, I have to reveal dozens of UI controls that I’m uninterested in, including the search box, workspace manager, and all sorts of devices, places, and documents.

On my personal GNOME desktop, I have a panel of quick-launch icons on my desktop arranged on the left side of the screen like this:

My Current Panel (click for big)
My Current Panel (click for big)

It’s similar to an OSX Dock — it is normally hidden, but a simple mouse hover anywhere on the left edge of the screen reveals the launchers. This makes it very quick to launch programs. Since the current GNOME Shell design already makes use of the left side of the screen, it should be possible to combine the efficiency of a launcher panel with the power of the full shell. Clicking on the Activities button or moving the mouse to the top left corner of the screen would open the full view like it does now, but hovering on the left edge of the screen would just pop up a panel of application launchers.

I made a very simple mockup based on the one by William Jon McCann:

My GNOME Shell mockup (click for big)
My GNOME Shell mockup (click for big)

The launcher panel becomes a sort of sneak-peak of the full view. If you just want to launch a program, just the left edge of the panel slides into view. If you want the rest of the controls, the rest of the UI slides out. With the right animation, this could be a really cool effect.

This mockup is far from perfect. The part that needs the most attention is the full view:

gnome-shell-owen-a-1

There are a lot of details that are easy to criticize here. The “Applications” heading is quite small, and very crowded. The ugly [+] button at the bottom is an afterthought to provide some way of adding more launchers. The launchers are still too big, especially with the application name text underneath each one.

Despite these layout flaws, I think the concept holds up. In its completely collapsed mode, the slight visible edge of the launcher panel acts as a hint to new users that there is functionality to the left side of the screen. The half-revealed launcher panel is efficient and usable. And the full view provides the screen real estate necessary to customize the more compact view.

Launching programs needs to be super-simple for new users, and super-quick for advanced users. This design satisfies both these requirements. I would also argue that it leads users from familiar territory, a launcher bar, to a new UI concept that’s a little strange at first. Introducing a brand new interface is scary for users, so providing this path would make adoption easier.

Here are the three states for the new shell:

gnome-shell-owen-c-1 gnome-shell-owen-b-1 gnome-shell-owen-a-1

Spooooky Mixxx Session 091031

Some of the more weird, spooky, dark tracks in my collection

1. Dintun – Llano (Sr Replicante Remix)
2. Julien Piacentino – Kosmonote
3. Kaive – Smile
4. Trinity & Beyond – The Fat Man
5. JPLS, Ambivalent – Frontstab – Original Mix
6. Danny Costa – Hellishness
7. Jan Hendez – Processing
8. Jan Hendez – C’est Dur a Dire
9. Gabriel Damen – Toy
10. Justin Martin, Claude VonStroke – Beat That Bird – Original Mix
11. Noid – La Otra Cara de la Moneda
12. Colombe Beau – Basification Des Acides
13. Schniner – llega en el momento menos pensado
14. Winx – Don’t Laugh – Extended Mix

Spooooky Mixxx Session 091031 by ywwg

Mixxx Session 091027

More beats. I always listen to my mixes the day after I make them, because how am I going to know what I’m doing wrong unless I check my work? Often, while actively mixing, something will sound ok, but listening to it later it’ll sound forced or messy. Lives, unexamined and otherwise, relative worth w.r.t. living, etc etc.

Most people do a spooooky halloween special mix, but this isn’t that, really. huh. Maybe I’ll do one today.

  1. Stefny – Flight
  2. Navy b. – S P
  3. Rodrigo Rivera – Despegue programado N2
  4. nemecek – vindaloo jones
  5. Insanek – My last brain (Original Mix)
  6. Ricardo Serapio – Onche
  7. alec troniq – i`m the foolaloof [agaric rmx]
  8. Steve Bug – Swallowed Too Much Bass feat. Paris The Black Fu – Joris Voorn Remix
  9. London Fm – Urbansound – Original Mix
  10. Sis – Nesrib
  11. Drugstore – Nemesis
  12. Hay Dios Mio (Splatter Remix)
  13. Eggbox – Wrongway
  14. Ambivalent – Nineteen – Original Mix
  15. Gabriel Damen – Toy
  16. JuanMP – Double Block
  17. Dintun – Runge Mufasin (Pablo Denegri Remix)
  18. Dennis Shoker – Three In One Apartment

Mixxx Session 091027 by ywwg

Mixxx Session 090918

This one came out pretty well, although there were two stupid mistakes that I covered up with a little post-editing and there a couple transitions that sound sloppy. I’m now hosting files on SoundCloud, which has a really nice interface for listening to tracks and commenting on them.

Tracklist:

  1. unfound43_04_-_minimorph_-_real_place
  2. ldo_benitez_rota_de_nuevo_btb_mix
  3. Tino Boa – Dreisamkeit live
  4. Uniquex_down-draftLabel
  5. Justin Martin, Claude VonStroke – Beat That Bird – Original Mix
  6. Aka Aka – Woody Woodpecker – Original Mix
  7. SIBEGG_FREE
  8. Wighnomy Brothers – Exvola Stupp – Original Mix
  9. SCHUMACHER, Thomas – Sunset
  10. Chris Lake, LYS – La Tromba – Original Mix
  11. unfound40_05_ – unfound40_05_-_olene kadar_-_noflik_bank_sitten
  12. Kaive – Smile
  13. unfound43_02_ – unfound43_02_-_minimorph_-_cubanito
  14. Sis – Nesrib
  15. Jan Hendez – 03 – Orgazmo (Zhao rmx)
  16. Dintun – Runge Mufasin (Pablo Denegri Remix)
  17. Dak_-_Rainmaker_II

090918 by ywwg

(To download, click the little down-pointing arrow on the right, or if you go to the soundcloud web page, click on “More Options,” then “Download”)

Mixxx Session 090825

Here’s another DJ mix I made recently. I think this one came out quite well, with a minimum of mistakes and much better beat-matching than usual. “Yes Ma’am” is one of my favorite tracks right now. Comments welcome.

Tracklist (about an hour):

  1. david bernabe – alflolol
  2. licuadora system – playing with sticks
  3. monokao – destruccion masiva
  4. DJ Chus, Carlos Manaca, Pablo Ceballos – The Strong Rhythm – D-Unity Remix
  5. NDKj – Main Course – Minicoolboyz Remix
  6. Marc Houle – Dirty Dirty – Original Mix
  7. DJ Baldino – Jumping – Original Mix
  8. Ricky Ambilotti – Construkt – Original Mix
  9. Thega – Hay Dios Mio (Sergio Soroa Remix)
  10. Mark Knight, Funkagenda – Flauta Magica – Original Mix
  11. Visti & Meyland – Yes Maam (All Night Long) (Trentemoeller Remix)
  12. Navy b. – Popisowa
  13. david bernabe – palmero inc. (felipe valenzuela remix)
  14. RichVomDorf – Momento A

Mixxx Session 090825 on archive.org

Mixxx Session 090825 mp3 download

Do you not like glitchy, thumpy, electronic music? Sorry, can’t help it. The first CD I ever bought that I really, actually wanted for myself was Rave ‘Til Dawn, because I eagerly wanted to own the track “Fuck You.”