Archive for August, 2007

Whine whine whine

Thursday, August 23rd, 2007

So, any self respecting geek, linux idiot or whatever have probably stumbled upon openmoko and their first phone, the Neo 1973. So the little freak I am decided, heck, I must have one.

Easier said than done.

When the first day was over, me and two colleagues had finally decided what we wanted and placed our order. Sadly, we we’re a bit slow, so we weren’t sure we would get a phone from the first batch. 2 weeks after we placed the order, the phones started getting shipped to the lucky bastards who were quick enough to order when the store went live. Sure enough, this was the first time they had done this and problems were apparent, you can always read about the chaos over at Harald Weltes blog. When we finally received confirmation it came in the form of a mail stating they couldn’t bill my CC. One quick reply to make sure it wasn’t just my bank acting up I receive this reply.

Hi Thomas,

I just tried, the 3rd times, but still it can’t go through the system. I think you should call your bank to release this transaction. Don’t worry, I’ll reserve the phones for your order.

Two more emails sent back and forth, and two calls to my bank. The only reply I get from my bank is “there is information missing.” OK, cute. A couple of more emails sent back and forth and finally a second call to my bank where some suit finally called me back to explain to me that it’s for my protection they require the full security protocol to be implemented.

It’s my money, I WANT TO GIVE THEM AWAY.

Had to argue with the suit for 15 minutes until he finally caved in and told me what mysterious field were missing. Fine, I send this off to FIC who were handling the openmoko orders (and also produce the phones in question). I get ignored and instead they tell me to send them another CC. I ask for instructions and receive them. Send off the CC and then, silence.

More silence, only silence. I read on planet.openmoko.org that they’re finally done with all the orders. So I end up having to email one of the people handling the orders personal email to get them to attend to my ticket, and I get this:

Dear Thomas,

We still have Neo Advance Black in stock. But we are temporarily short of stock for Neo Base Black, we soon will have more Neo Base coming. ETA is two weeks.

Please advise how we should do now.

ARGH. Seriously, what does “reserve” mean to you guys? This is not funny. I ask them what they mean, what they meant when they said reserve, tell them “We can take the orange ones”, and I this is the response…

Hi Thomas,

Yes, we will arrange your order on our next batch in September. As of today, we are just running out of both Base- and Advanced- phones.

Appreciate your undestanding and supporting.

GNAAAAH.

Pivot

Tuesday, August 7th, 2007

Found myself bored one day on my vacation and thought, hey, I can switch the orientation of my screen, why the heck don’t my software behave the way I want? My screen is a Samsung SyncMaster 215TW and it’s very nice. Actually, this automatic switching of orientation did work when I was toying with it in windows, all I had to to was to install a 36MB package plus a 78MB package for it to switch the orientation in windows. EXCELLENT. (Samsung, you guys suck)

So, how hard can it be for someone who hasn’t gotten the slightest clue about this crap to fix this in linux?

Fairly trivial for this extremely ugly solution, first of all I had to enable randr support for my nvidida card by inserting option "randrrotation" "true" in /etc/X11/xorg.conf for my graphics card. Second, I wanted to know what information was available to me about my monitor. I grabbed ddccontrol and probed for my little monitor.

$ ddccontrol -p
thumper:~# ddccontrol -p
ddccontrol version 0.4.2
Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)
Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)
This program comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of this program under the terms of the GNU General Public License.

Probing for available monitors..........
Detected monitors :
 - Device: pci:04:00.0-1
   DDC/CI supported: Yes
   Monitor Name: Samsung SyncMaster 215TW (DVI)
   Input type: Digital
  (Automatically selected)
Reading EDID and initializing DDC/CI at bus pci:04:00.0-1...

EDID readings:
        Plug and Play ID: SAM0214 [Samsung SyncMaster 215TW (DVI)]
        Input type: Digital

= Samsung SyncMaster 215TW (DVI)
> Color settings
        > Brightness and Contrast
                > id=magicbright, name=Magic Bright Mode, address=0xdc, delay=-1ms, type=2
                  Possible values:
                        > id=text - name=Text, value=1
                        > id=internet - name=Internet, value=2
                        > id=game - name=Game, value=3
                        > id=sport - name=Sport, value=4
                        > id=entertain - name=Entertain, value=5
                        > id=custom - name=Custom, value=6
                  supported, value=1, maximum=6
                > id=brightness, name=Brightness, address=0x10, delay=-1ms, type=0
                  supported, value=11, maximum=100
                > id=contrast, name=Contrast, address=0x12, delay=-1ms, type=0
                  supported, value=63, maximum=100
        > Color maximum level
                > id=red, name=Red maximum level, address=0x16, delay=-1ms, type=0
                  supported, value=50, maximum=100
                > id=green, name=Green maximum level, address=0x18, delay=-1ms, type=0
                  supported, value=50, maximum=100
                > id=blue, name=Blue maximum level, address=0x1a, delay=-1ms, type=0
                  supported, value=50, maximum=100
        > Various color settings
                > id=colorpreset, name=Color Preset, address=0xe0, delay=-1ms, type=2
                  Possible values:
                        > id=normal - name=Normal, value=3
                        > id=custom - name=Custom, value=0
                        > id=warm - name=Warm, value=1
                        > id=cool - name=Cool, value=2
                  supported, value=3, maximum=3
> Others
        > Restore defaults
                > id=defaults, name=Restore Factory Defaults, address=0x4, delay=2000ms, type=1
                  Possible values:
                        > id=default - name=Restore Factory Defaults, value=1
                  supported, value=3, maximum=3
                > id=defaultluma, name=Restore Brightness and Contrast, address=0x5, delay=2000ms, type=1
                  Possible values:
                        > id=default - name=Restore Brightness and Contrast, value=1
                  supported, value=3, maximum=3
                > id=defaultcolor, name=Restore Factory Default Color, address=0x8, delay=2000ms, type=1
                  Possible values:
                        > id=default - name=Restore Factory Default Color, value=1
                  supported, value=3, maximum=3
                > id=settings, name=Settings, address=0xb0, delay=1000ms, type=1
                  Possible values:
                        > id=default - name=Settings, value=1
                  supported, value=0, maximum=2
        > OSD
                > id=osd2, name=On Screen Display (Samsung), address=0xf5, delay=-1ms, type=2
                  Possible values:
                        > id=disable - name=Disable, value=1
                        > id=enable - name=Enable, value=0
                  supported, value=0, maximum=2
        > Input settings
                > id=autosource, name=Autoselect Input Source, address=0xe2, delay=-1ms, type=2
                  Possible values:
                        > id=auto - name=Automatic, value=0
                        > id=manual - name=Manual, value=1
                  supported, value=0, maximum=2
                > id=inputsource, name=Input Source Select, address=0x60, delay=-1ms, type=2
                  Possible values:
                        > id=analog - name=Analog, value=1
                        > id=digital - name=Digital, value=3
                  supported, value=3, maximum=3
        > Power control
                > id=dpms, name=DPMS Control, address=0xd6, delay=-1ms, type=2
                  Possible values:
                        > id=on - name=On, value=1
                        > id=standby - name=Standby, value=4
                  supported, value=1, maximum=4
                > id=power, name=Power control, address=0xe1, delay=-1ms, type=2
                  Possible values:
                        > id=off - name=Off, value=0
                        > id=on - name=On, value=1
                  supported, value=1, maximum=1

Ok, so apparently there’s a lot of knobs and gauges available in the database, but not what I needed. Fine, I dump all values in landscape mode and compare them to the values I get when in portrait mode with ddccontrol -d pci:04:00.0-1 and after switching around a couple of times finally decided that Control 0xf8: +/1/1 C [???] was the orientation value.

So a quick and rather ugly script was born

#!/bin/sh
dev=pci:04:00.0-1
ctr=0xf8
while sleep 1s; do
        val=$(ddccontrol -r $ctr -f $dev 2>/dev/null | awk '/^Control/{FS="/";split($3,m);print m[2]}')
        if (( val == 0 )); then
                echo "normal" >/tmp/orientation
        elif (( val == 1 )); then
                echo "left" >/tmp/orientation
        fi
done

I start this as root and quickly forget about it. I run this script as my user

#!/bin/sh
while sleep 1s; do
        [[ -f /tmp/orientation ]] && xrandr -o $(cat /tmp/orientation)
done

Now, whenever I turn my screen, X follows. Sadly ion3 doesn’t know, and frankly, I don’t know if it should care, about my current orientation.