Sunday, August 30, 2009

Sunday, July 19, 2009

#$%^# ALSA!!!!!

Surely there are other poor souls wondering why their speakers quit working on the HP Mini running ubuntu jaunty. To alleviate your suffering I offer you, THE SOLUTION:

alsamixer

Press tab to go to the "Capture" view.

Turn on CAPTURE, DAC0, and IMPORT0. Turn up the volume on each.

Viola! This probably works on plenty of other intel-hda laptops as well.

That was far more difficult to solve than it should have been.

Thursday, January 1, 2009

NVIDIA broken AGAIN

I love NVIDIA's proprietary binary driver. It gives me so many hours of troubleshooting fun. Here's the latest installment:

Ubuntu 8.10 Kernel upgrade 2.6.27-9 = No more EDID from my monitor

Without the EDID information from the monitor, NVIDIA has a meltdown and only lets me have 640x480... sometimes... Other times it just blows up.

After several hours of hacking with the xorg.conf in an attempt to replicate the modelines properly, I have an epiphany.. Why not FAKE the EDID!

Option "CustomEDID" "DFP-0:/etc/X11/edid.bin"

This allows me to give NVIDIA a bin file and tell it to use this instead of asking my monitor for the EDID... So now I just pull the EDID from the monitor and we're done, right?

Download read-edid 2.0

> sudo get-edid > edid.bin

VBE/DDC service about to be called
Read EDID

Performing real mode VBE call
Interrupt 0x10 ax=0x4f15 bx=0x1 cx=0x0
Function supported
Call failed

The EDID data should not be trusted as the VBE call failed

The EDID from get-edid on amd64 systems comes out with a bad checksum! NVIDIA won't load an EDID with a bad checksum! AGGHHH!!

But wait... read-edid provides us with another tool... parse-edid... Normally this will spit out xorg.conf like data regarding your monitor specifics.. but it also has a bit of code that reads the 8 bit checksum.... but it doesn't tell us what the checksum IS... YET.

open up parse-edid.c and navigate to line 249.

this bit:
MSG( "EDID checksum failed - data is corrupt. Continuing anyway." );
Needs to look like this:
printf( "EDID checksum failed - data is corrupt. Continuing anyway. %d", checksum );

And recompile.

Then, when we run parse-edid against the bin we got out of get-edid.. we see this:

EDID checksum failed - data is corrupt. Continuing anyway. 19


That 19 is important. The last hex value in the .bin file needs to NEGATE this number.. It needs to equal -19 as a signed 8 bit integer...

Grab your favorite hex editor and make that very last value in the file equal to the opposite of your checksum value!

wait, what's -19 in hex?

Well, it's an 8 bit checksum.. so.. add -19 to the max positive signed 8 bit value of 256 and we get 237... now convert 237 into hexadecimal..

The Lazy way

So now I stick ED into the last bit of the file, stick in in the xorg.conf, and viola. No more EDID problems. Works just like before.

Piece of cake, right?

Advice regarding my previous post

Just go here and buy this. It's much better than tora... Ok, it's not FOSS, but it's nice.

DB Visualizer

Friday, July 4, 2008

Tora w/ Oracle support on Ubuntu 7.10

Tora from the ubuntu repository doesn't include oracle support because of the license.

So, in order to get tora to work right, we have to compile it from scratch.

1. Install Oracle Instant Client

You can get it from : http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html

Grab the Basic, SDK, and sqlplus and unzip them all into /usr/local/oracle

2. soft link any libraries with a suffix that's not .so as .so (libocci.so.10.1 --> libocci.so)

3. make a bin directory and link sqlplus into it

4. copy the tnsnames.ora file from the database into it

5. Modify ~/.bashrc and export ORACLE_HOME to match the /usr/local/oracle/instantclient_XX_X directory

Export TNS_ADMIN as the same directory

7. add the instantclient directory to /etc/ld.so.conf and run ldconfig

8. try and connect to the database with sqlplus

9. Download tora from: http://tora.sourceforge.net/

10. unzip it and run autogen.sh

11. We need to apt-get install: (at least)

libqt3-mt-dev libqscintilla-dev perl5 make

12. configure the source with this cryptic command:

./configure --prefix=/usr/local --with-instant-client --without-rpath --disable-new-check --without-kde --with-oracle-includes=/usr/local/oracle/instantclient/sdk/include --with-oracle-libraries=/usr/local/oracle/instantclient --enable-libsuffix=

13. make; make install

14. that should do it!