Category Archives: Linux

yeah, it’s linux.

sox soxio: Failed reading : unknown file type

I got this error on my Ubuntu system. It stuck me as odd because the script I had made, ran just fine previously.

sox soxio: Failed reading `hello-thank-you-for-calling.wav': unknown file type `raw'

Upon searching, I found that for some reason sox lost all it’s available formats.

$ sox
...
SUPPORTED FILE FORMATS: pls m3u

The following installed all the available file formats.

$ sudo apt-get install libsox-fmt-all
...
$ sox
...
SUPPORTED FILE FORMATS: 8svx aif aifc aiff aiffc al alsa ao au auto avi avr caf cdda cdr cvs cvsd dat dvms fap ffmpeg flac fssd gsm hcom ima ircam la lpc lpc10 lu m3u m4a mat mat4 mat5 maud mp2 mp3 mp4 mpg nist nul null ogg oss ossdsp paf pls prc pvf raw s1 s2 s3 s4 sb sd2 sds sf sl smp snd sndfile sndt sou sph sw txw u1 u2 u3 u4 ub ul uw vms voc vorbis vox w64 wav wmv wve xa xi

Here is the command my script was running to convert a text2wav file into a GSM encoded file for my Asterisk setup.

sox --show-progress -V1 hello-thank-you-for-calling.wav -r 8000 -c 1 -t gsm hello-thank-you-for-calling.gsm resample -ql

Firefox 3.0b4 under Ubuntu

It’s pretty easy to try out the latest beta for users.  I’m sure it’s just as easy to try it out on other Linux distributions that are up to date.

2008.03.11 ^ Screenshot

Simply choose your language from the Firefox beta download page to begin your download.  Once completed open up a terminal and run the following commands.

# create a temporary directory if you do not already have one.
mkdir -p ~/tmp
cd ~/tmp
# un package the tar ball.
tar -jxvpf /path/to/firefox-3.0b4.tar.bz2

Once the tar process completes

cd firefox
# Launch Firefox
./firefox

Or close your terminal session and launch via the ALT-F2 Run Application method.

~/tmp/firefox/firefox

This new instance of Firefox does not use any plugins which may be already installed on your system. You will need to download any plugins you use such as the Adobe Flash player to

~/tmp/firefox/plugins/libflashplayer.so

a switch to ubuntu.

A couple days ago I accidentally(and I did the first step of it on accident, truthfully. ) switched the on my ’s laptop from Windows XP Home*barf*, to . In that process I later decided to try out the encrypted drive option on the alternative install CD. With little hesitation after I decided on moving my ~/ stuff over from my Gentoo system running on a to the new Ubuntu system I easily setup for my dad. I was running a drive over usb which is only practical for so long, it really makes the drive feel slower to me. The only major configuration issue I had with the move was that not all my buttons were working the way I like them to. With a quick edit, by adding a new Input Device section to my xorg.conf, I was content.

Section "InputDevice"
    Identifier     "USBMouse0"
    Driver         "mouse"
    Option         "SendCoreEvents" "true"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "ZAxisMapping" "4 5 8 9"
    Option         "ButtonMapping" "1 2 3 6 7 10 11"
EndSection

I wonder why this isn’t standard info for the Microsoft Intelimouse Optical USB/PS2 when it’s found plugged into my system.
I also gave him the Windows XP Home in a innotek virtualbox so he can run a certain proprietary piece of software which he needs.

article submission for GWN

I had read the previous GWN, and the request for help summarizing topics sounded interesting. A couple days later while browsing the forums, I decided to start reading a long thread. By page 3 I knew that I had something to try writing about. With my eyes already straining, the already heavily discussed ideas of possible political systems of relationships between those related in how Gentoo “lives” began to seem petty. After reading the entire thread, and numerous other pieces to the discussion at hand a trend was forming. I know it is not a 50 to 250 word summary, but that would be quite difficult to do. It’s more of an essay of how I see things, and partial summaries of how others view the current state.

Attached is something I would like to submit for the GWN. I’m not much of a writer, and I’m sure it could use some editing, but I feel it’s subject is quite important.

gentoo-article-idea.txt (download)

gentoo-article-idea.txt

Pocket PC Windows Tax

I read something the other day about the “Windows Tax” via [linux-watch.com] basically a method for getting a refund on the OEM version of MS Windows you are “Forced” to buy with a PC from some manufacturers. I wonder if this method will also work when purchasing a Pocket PC with Microsoft Software on it. I’m thinking about this because I just read on the this weeks GWN, that a member of the Russian Gentoo Community managed to get E17 running on his HP iPAQ hx4700. Obviously users have managed to get Linux running on their PDA’s for quite some time, but my brain didn’t really put the one and two together. Why should you have to buy the Pocket PC OS when your just going to put Linux on it anyway? Does Palm have the same terms in their license I wonder?

Now I wonder how difficult this could be mostly because I don’t think I’ve ever seen the Pocket PC OS sold separately. In the Linux.com article the person uses the Microsoft Windows Home Edition as a baseline for his requested refund amount.

Perhaps the refund amount will be more substantial since the cost of a sweet PDA is almost twice as much as the run of the mill PC.

FreeNAS vmware install.

I downloaded the latest FreeNAS 0.68 vmware image. After I unzipped the file, and put the guest OS where I wanted it, I came across an error.

Unable to connect to the MKS: You need execute access in order to connect with the VMware Server Console.  Access denied for config file: /mnt/sda1/virtual machines/FreeNAS 0.68/FreeBSD.vmx.

After searching google for the error, nothing came up. Fortunately it seemed like an easy fix after a few thoughts. Of course zip files do not retain file permissions. But of course, it could have been created on a windows machine. Either way, the fix was easy.

The Fix:

$ chmod 755 *.vmx
$ ls -la *.vmx
-rw-r--r-- 1 px users 1224 2006-12-16 14:24 FreeBSD.vmx
$ chmod 755 *.vmx
$ ls -la *.vmx
-rwxr-xr-x 1 px users 1224 2006-12-16 14:24 FreeBSD.vmx

Now the guest OS starts up just fine.

mega changer

I wonder if this works with linux.

Sony VGP-XL1B2
200 Disc Changer; CD, DVD, etc.
Firewire connection.

Maybe once these are around $200 I’ll put it on my wish list.
:)

DIY Jukebox.

pci config space bits.

[disclaimer]THE FOLLOWING CAN DAMAGE STUFF[/disclaimer]

My laptop has a SiS5513, well atleast linux thinks it is.  It’s really a SiS962.  I’ve had my laptop for a few years now, and I wish I would have “figured” this out sooner.

/*
* The original SiS5513 comes from a SiS5511/55112/5513 chipset. The original
* SiS5513 was also used in the SiS5596/5513 chipset. Thus if we see a SiS5511
* or SiS5596, we can assume we see the first MWDMA-16 capable SiS5513 chip.
*
* Later SiS chipsets integrated the 5513 functionality into the NorthBridge,
* starting with SiS5571 and up to SiS745. The PCI ID didn't change, though. We
* can figure out that we have a more modern and more capable 5513 by looking
* for the respective NorthBridge IDs.
*
* Even later (96x family) SiS chipsets use the MuTIOL link and place the 5513
* into the SouthBrige. Here we cannot rely on looking up the NorthBridge PCI
* ID, while the now ATA-133 capable 5513 still has the same PCI ID.
* Fortunately the 5513 can be 'unmasked' by fiddling with some config space
* bits, changing its device id to the true one - 5517 for 961 and 5518 for
* 962/963.
*/

In order to fix this, I need to use pcitweak to change some bits.  There isn’t a whole lot of information around the internet about pcitweak, so I have no idea if this is permanent.  Hopefully if it works it is, and if it does not work, then it was merely temporary.

px@pmobilex ~ $ sudo pcitweak -r 00:02:5 -h 02
0x5513
px@pmobilex ~ $ sudo pcitweak -r 00:02:5 0x0
0x55131039
# 5513 is the device ID, 1039 is the Vendor ID
 
px@pmobilex ~ $ sudo pcitweak -w 00:02:5 0x0 0x55181039
px@pmobilex ~ $ sudo pcitweak -r 00:02:5 0x0
0x55131039
px@pmobilex ~ $ sudo pcitweak -w 00:02:5 0x0 0x55181039
px@pmobilex ~ $ sudo pcitweak -r 00:02:5 0x0
0x55131039

When I write the information I get no output.
I can’t for the life of me figure out why pcitweak won’t actually write the values.  Using su, or sudo makes no difference.

[update]
OK, maybe this can help me. I found another program called setpci. why it took me so long to find i’ll never know. On Gentoo you’ll need to have >=sys-apps/pciutils-2.2.0-r1 installed.
I’ll explain the options I’m using first.
-v be verbose
-D Don’t actually do anything, just list it.

px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 0
00:02.5:00 = 39
px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 1
00:02.5:01 = 10
px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 2
00:02.5:02 = 13
px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 3
00:02.5:03 = 55
[/bash
 
We only need to change registers 2 and 3, well really only 2 in my case.
# You can also ask for multiple registers in one command.
px@pmobilex ~ $ sudo setpci -v -D -H1 -d 1039:5513 0 1 2 3
00:02.5:00 = 39
00:02.5:01 = 10
00:02.5:02 = 13
00:02.5:03 = 55
px@pmobilex /etc/portage $ sudo setpci -v -H1 -d 1039:5513 device_id.W=0x5518
00:02.5:02 5518
px@pmobilex /etc/portage $ sudo setpci -v -D -H1 -d 1039:5513 device_id
00:02.5:02 = 5513

Grrr, still won’t change. What’s the point of these tools if they don’t work?

# as root.
pmobilex px # setpci -v -H1 -s 0:02.5 device_id
00:02.5:02 = 5513
pmobilex px # setpci -v -H1 -s 0:02.5 device_id.W=0x5518
00:02.5:02 5518
pmobilex px # setpci -v -H1 -s 0:02.5 device_id
00:02.5:02 = 5513

OK, it works, but not for what I need? argh.

pmobilex px # setpci -v -d *:* latency_timer
00:00.0:0d = 40
00:01.0:0d = 40
00:02.0:0d = 00
00:02.1:0d = 00
00:02.3:0d = 40
00:02.5:0d = 80
00:02.6:0d = 40
00:02.7:0d = 40
00:03.0:0d = 40
00:03.1:0d = 40
00:03.2:0d = 40
00:03.3:0d = 40
00:04.0:0d = 40
00:08.0:0d = a8
00:0a.0:0d = a8
01:00.0:0d = f8
pmobilex px # setpci -v -d *:* latency_timer=b0
00:00.0:0d b0
00:01.0:0d b0
00:02.0:0d b0
00:02.1:0d b0
00:02.3:0d b0
00:02.5:0d b0
00:02.6:0d b0
00:02.7:0d b0
00:03.0:0d b0
00:03.1:0d b0
00:03.2:0d b0
00:03.3:0d b0
00:04.0:0d b0
00:08.0:0d b0
00:0a.0:0d b0
01:00.0:0d b0
pmobilex px # setpci -v -d *:* latency_timer
00:00.0:0d = b0
00:01.0:0d = b0
00:02.0:0d = 00
00:02.1:0d = 00
00:02.3:0d = b0
00:02.5:0d = b0
00:02.6:0d = b0
00:02.7:0d = b0
00:03.0:0d = b0
00:03.1:0d = b0
00:03.2:0d = b0
00:03.3:0d = b0
00:04.0:0d = b0
00:08.0:0d = b0
00:0a.0:0d = b0
01:00.0:0d = b0

I guess I’ll see if I can patch the sis5513.c to be always be hard coded as a sis5518.

resources:
http://lkml.org/lkml/2003/6/20/208
file:///usr/src/linux/drivers/ide/pci/sis5513.c
http://www.linux-hacker.net/cgi-bin/UltraBoard/UltraBoard.pl?Action=ShowPost&Board=technical&Post=2489
http://www-128.ibm.com/developerworks/library/l-hw2.html
http://www.daniel.nofftz.net/linux/Athlon-Powersaving-HOWTO.html
http://www.fedoraforum.org/forum/showthread.php?p=556644
http://www.mail-archive.com/linux-ide@vger.kernel.org/msg01794.html

chipmunks.

I’m trying to listen to dave winer’s podcast in google reader using their flash player, and wow.

the timing is all messed up, and he sounds like a chipmunk.

I’m doing some software updates, and lots of the cpu is in use, so flash + Firefox + gcc = not enough juice. Well the flash player is also beta and so far this is the only issue I’ve had with it. My compiling is nice 19. hmm.

gentoo toolchain notes

A few critical packages in gentoo were released from ~ to stable recently, and through the upgrade I expericend a couple bumps.

After the upgraded packages were installed in order for things to compile after you will need to select the newer environment. YMMV

sudo binutils-config -l
 
sudo binutils-config 2
 
sudo gcc-config -l
 
sudo gcc-config 6

resources

GF20: C compiler cannot create executables
http://forums.gentoo.org/viewtopic.php?t=294109

my vmware installation notes.

I installed VMware Server on my Gentoo box this morning. Because it’s fairly new to the tree, and I’ve been wanting to try it out for while, and now it’s free. I had a couple simple issues too outlined below, but outside of that it works great.

The first task after the quick 100mb download, and emerge of a few missing dependancies was to add my user to the vmware group so that I will be able to use it.

If your VMware Server is located on another machine like myself, you will most likely need to also remember to add a few lines to your xinetd.conf. As it comes out of the box, it is only accessible to your local machine. You will need to modify your /etc/xinetd.conf/vmware-authd so that it contains;

only_from = xxx.xxx.xxx.xxx/24

Otherwise your VMware Console client will hang and you will have this error in your syslog on the remote machine.

Aug 28 08:32:24 mywhiz xinetd[29408]: FAIL: vmware-authd address from=xxx.xxx.xxx.xxx
Aug 28 08:32:24 mywhiz xinetd[12288]: START: vmware-authd pid=29408 from=xxx.xxx.xxx.xxx
Aug 28 08:32:24 mywhiz xinetd[12288]: EXIT: vmware-authd status=0 pid=29408 duration=0(sec)

Soon after something else was in my way of VMware Server working. While running the console had no errors, the syslog on my remote machine had something.

Aug 28 09:44:09 mywhiz vmware-authd[32121]: The "/opt/vmware/server/lib/bin/vmware-vmx" process did not start properly.  Exit 0xed00

Searching through google revealed nothing of note, just a couple seamingly old unlrelated items. Luckilly there is a debug mode option you can set in Vmware Server. I opened my VM, and then performed this. Edit Virtual Machine Settings -> Options -> Advanced -> Run with debugging information

Note: Gentoo does not install the debugging version of the vmware-vmx binary with setuid permissions.

$ ls -al /opt/vmware/server/lib/bin-debug/vmware-vmx
-rwxr-xr-x 1 root root 5143312 2006-08-28 07:23 /opt/vmware/server/lib/bin-debug/vmware-vmx
 
$ sudo chmod u+s /opt/vmware/server/lib/bin-debug/vmware-vmx
 
$ ls -al /opt/vmware/server/lib/bin-debug/vmware-vmx
-rwsr-xr-x 1 root root 5143312 2006-08-28 07:23 /opt/vmware/server/lib/bin-debug/vmware-vmx

Oddly VMware Console will be nice enough and it will tell you this error quite verbosely.

VMware Server Error:
VMware Server must be set-UID root, "/opt/vmware/server/lib/bin-debug/vmware-vmx" is not. Are you running /opt/vmware/server/lib/bin-debug/vmware-vmx from its distribution directory? That copy of the program is not set-UID root.
 
Press "Enter" to continue...
End of error message.

Attempting to run the VM this time produced a better error message. It wasn’t able to access my ~/.vmware directory on the remote machine for some reason. So I;

rm -rf ~/.vmware

The problem is gone when I power on the VM again. I think VMware could have saved me the trouble of all that by telling me they couldn’t access the directory without that much extra hassle of a debug mode, but at least it was easy enough to fix.
Hurray for errors! Well no boo errors, ehh who cares. While writing this, another one rears it’s ugly head.

My VMware Console is unable to connect to my remote machine with this error.

"Unable to connect to the remote host: 511 Error connecting to /opt/vmware/server/sbin/vmware-serverd process.."
Running htop shows the issue is quite simple.
PID USER     PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
31337 root      25   0  115M  111M  4352 R 98.7  7.0 30:00.98 /opt/vmware/server/sbin/vmware-server
On my remote machine I perform;
sudo /etc/init.d/vmware-server restart

All is well when it starts back up again. Now to turn off debug mode in the options and take away setuid on the debug binary.

resources:

http://diaryproducts.net/about/operating_systems/unix/installing_vmware_server_on_gentoo_linux.vm

http://gentoo-wiki.com/HOWTO_Install_VMWare_Server

both of these are out of date technically, but they were still helpful to me.