Thursday, December 11, 2008

Using dialup with 11.1 if NetworkManager does not handle your device

In openSUSE 11.1, NetworkManager is supposed to handle all dialup stuff. But, as far as I know, it can not handle e.g. plain old phone modems or dialup via bluetooth (rfcomm).
Unfortunately, if you now try to use the old methods of kinternet, wvdial or Umtsmon, you will find out that dialup will work with these, but you won't get a working resolv.conv and thus no name resolution. The reason is that the netconfig tools, which do rewrite resolv.conf apparently refuse to do that if NETWORKMANAGER=yes is configured in /etc/sysconfig/network/config.
One solution would be to switch to the old ifup method (NETWORKMANAGER=no), but then wireless LAN will basically be unusable.
Another, dirty and hackish solution is this:

Create a /etc/ppp/ip-up.local, containing
        #!/bin/sh
echo "nameserver $DNS1
nameserver $DNS2" >> /etc/resolv.conf

and a /etc/ppp/ip-down.local, containing
        #!/bin/sh
mv /etc/resolv.conf.netconfig /etc/resolv.conf

Make both of them executable. Dial up.

How does it work? The ip-up script gets the DNS servers in its environment. Just before it exits, it calls the ip-up.local script which then appends them to resolv.conf. During ip-down, the netconfig tools notice that the resolv.conf was changed externally and they refuse to touch it. They instead create resolv.conf.netconfig. ip-down.local now just replaces resolv.conv with resolv.conf.netconfig and everybody should be fine again.

To make this hack a bit more robust, you should probably check if the $DNS[12] variables are non-empty before adding them and you should check if resolv.conf.netconfig is newer than resolv.conf before restoring, but I leave that up to the reader.

Oh - and don't forget to file a bug against NetworkManager if it cannot handle your device!

Monday, December 08, 2008

Important Privacy Notice

If you care for your privacy, make sure to always delete /var/lib/zypp/AnonymousUniqueId before using any of the package management tools (YaST2, zypper).

Setting the repeat rate on an input device (Kernel 2.4 and 2.6)

If you ever come into the situation of having to set the repeat delay/period on an input device (/dev/input/eventX), with the additional challenge of needing it to work on both 2.4 and 2.6 kernels, maybe this code snippet might help you (fd is the filedescriptor of the device, opened writable):
        #include <linux/input.h>
struct input_event ie;
ie.type = EV_REP;
ie.code = REP_DELAY;
ie.value = 1000; /* 1 second initial delay */
if (write(fd, &ie, sizeof(ie)) == -1)
perror("REP_DELAY");
ie.code = REP_PERIOD;
ie.value = 250; /* 4 events per second */
if (write(fd, &ie, sizeof(ie)) == -1)
perror("REP_PERIOD");

Looks pretty trivial, doesn't it? But it took me quite some time to realize that I needed to write a "magic" event into the device to set the properties ;)

Wednesday, December 03, 2008

WINE followup: Open Source Software Rocks!

Just a short followup to my last post about WINE and the problems it had with "Avatar - Legends of the Arena": most likely, with the next WINE version it will just work out of the box, due to this commit to the WINE git repository.

Yay! That's quick bug fixing (or actually: implementing a feature). Thanks!

Sunday, November 30, 2008

WINE makes my kids happy

Of course my kids have a Windows 2000 on their machine, used only as a "game bootloader". And of course this Windows has no internet connectivity, since I would not even know how to keep it somewhat secure.
But now my son came up with that new, apparently uber-cool game from nick.com called "Avatar - Legends of the Arena", and he really wanted me to make it work with his machine. Unfortunately this game is - of course - only available for Windows, and it needs an internet connection - something I was not willing to enable on the Windows installation.

The way out of the dilemma: WINE.
There were only minor problems, e.g. that the game would install, but then still could not connect to the game server, but a look at the console output showed

fixme:wininet:InternetSetOptionW Option 28 STUB
fixme:wininet:InternetSetOptionW Option 29 STUB


And with the help of Marcus Meissner (also here), we found out that all that was needed to get it going was that the original W2K wininet.dll had to be copied to ~/.wine/drive_c/windows/system32/ and then the game could be started with

WINEDLLOVERRIDES="wininet=n" wine AvatarMP.exe

Cool stuff, WINE developers!

Now the next thing to get going is the TomTom Software ;)

Friday, November 28, 2008

Konqueror finally got decent adblock support!

Today I finally updated my machine to openSUSE 11.1 beta6 (was still running plain beta5 before). Then I started to wonder what this small red icon in the lower right corner of Konqueror (KDE 4) could be.
Clicking on it, it popped up an adblock dialog, listing all the blockable items on the current site and showing if they are already blocked or not. It also allows to add items to the block list.

Basically that's functionality that's present in Firefox extensions since years, but it is nice to finally see it also implemented in my favorite browser.

Thanks, KDE team!

Monday, November 10, 2008

NLUUG "Mobility" Conference

Last week, I was attending the NLUUG autumn conference, themed "Mobility" (Unfortunately, there is no usable english page, but at least the programme should be available here). I was giving two talks on the topics "suspend" and "UMTS/3G", which went pretty well.
Apart from the 10+ hours train ride to and from Ede, this was a very nice event with many good talks and lots of interested and interesting people. Additionally, the ELC-E Embedded Linux Conference Europe was held simultaneously, which provided for even more interesting talks. Unfortunately I could not stay for the second day of ELC-E talks, because I had to take care of returning home in time for the weekend.

The papers are already up on the conference website, I assume that the slides will follow soon, too.

Wednesday, October 08, 2008

"smart" suspend in pm-utils

I finally implementd the "smart" suspend in our pm-utils package. This means that hopefully more machines will just suspend to RAM "out of the box" without any tweaking of configuration etc. It also leverages the quirks list in HAL which is a bit bigger than the one in s2ram (but IMVHO also of lower quality...) in case the machine is unknown to s2ram.

Give it a try in the next beta, or, if you can't wait any longer, fetch it from home:seife:Factory (the Build Service is pretty busy lately, so the packages are not built for Factory yet, just use the 11.0 version, it should work in 11.1 too).

Tuesday, October 07, 2008

First we take Manhattan,

Then he took Berlin.

This weekend, I went to Berlin with my wife to experience one of the best concerts I have seen ever. Originally, we just wanted to go there, "because it will probably be the last tour of Leonard" and we did not want to regret missing the opportunity. We did not expect it to be a great musical experience.

We could not have been more wrong.

It was simply great. Despite the location (the new, controversial "O2 World" arena in Berlin) being rather ill suited for such events - it might be good for basketball or ice hockey, but definitely not for concerts - it was really a thrilling experience.
The sound was really marvelous, and I was surprised that the Golden Voice was still as fascinating as when I last heard it live 15 years ago at the "Rock am See"-festival in Constance. Supported by an excellent band and background singers, it was not only an event for old fans, but really a musical masterpiece.

More reports can be found over at the Leonard Cohen Forum.

Everybody who lives near one of the places where the Tour still takes place: don't miss the opportunity to go, you might regret it later.

Thursday, September 18, 2008

UMTS/GPRS Image compression

While reading another of Frank's blog posts, I remembered that I had the same problem some time ago and used bmctl.pl, a perl script that I had found somewhere on the web to disable image compression on 3G connections. Maybe it is useful for someone...

Updated storage-fixup package

After reading about Frank's various problems on the Samsung Q45, I decided to help him out and updated the storage-fixup package in FACTORY, so now it includes the fix for his machine.

Frank, now you only need to start using FACTORY ;)

Friday, July 25, 2008

Bad HP, continued...

So the motherboard got exchanged. That's fine. The MAC address of the ethernet card changed as a consequence, that's unavoidable and no real problem.

But why on earth do they have to change the DMI identification strings of the machines in mid-production?

Before, the machine reported itself like that ("s2ram -n" output):

This machine can be identified by:
sys_vendor = "Hewlett-Packard"
sys_product = "HP Compaq 2510p Notebook PC"
sys_version = "F.0A"
bios_version = "68MSP Ver. F.0A"


Now it reports

This machine can be identified by:
sys_vendor = "Hewlett-Packard"
sys_product = "HP Compaq 2510p (RU537EA)"
sys_version = "F.0A"
bios_version = "68MSP Ver. F.0A"


When I entered it into the s2ram database, I of course used the full "HP Compaq 2510p Notebook PC" string, not expecting it to change within the same model.

Bah!

But I should have known better: looking at whitelist.c shows, that HP has always had the bad habit of changing those strings all the time (just look at all those different nx5000 entries).

Bad HP, bad...

My cool new machine was already sent back for warranty repair. The external display, connected to the docking station, did not get a signal anymore, so the motherboard had to be replaced. Ok, bad luck, but nothing to worry about. I had another similar machine (nc2400, the predecessor of the 2510p) to use during repair, so it was not that bad. But what really pisses me off is the fact, that i needed to boot Vista, just to reactivate the built-in UMTS card. When I first had to do it after fitting the card into the machine, I was thinking that it might be Sierra Wireless who needs the card to be "activated" or that I just had overlooked some BIOS setting in my eagerness to use the new toy, so I did not bother too much.
But today - I had of course booted Linux and wondered where the ttyUSB* devices had gone - I searched all the BIOS settings and everything, but there was just no device appearing on the USB bus. So I finally had to boot Vista, start HP's "Wireless Manager" and switch it on there.

That's 10GB of valuable harddisk space wasted, just for an UMTS activator program. I hate that.

Shame on you, HP guys. I'm really pissed.

Saturday, July 19, 2008

Cool KPowersave tip of the day

If you got a notebook where changing the backlight brightness via software is possible in linux (check the info dialog you get when left-clicking on the kpowersave icon in the systray), try this: move the mouse pointer over the kpowersave icon and roll the mouse wheel up and down.

Have fun :-)

Wednesday, July 09, 2008

Triple Dragon continued

This week is entirely dedicated to getting the Triple Dragon started with some usable software - and it is going along quite well.
I feared that I would have to dig down into DirectFB to solve my original framebuffer problems (on the first try I was unable to set the transparency - the setting, which is done with a private ioctl(), was always ignored), since the original software uses DirectFB, but in the end this is fortunately not the case.
The solution was simple: I need to issue the transparency-ioctl() after setting the framebuffer parameters, not before.
Right now, enigma is pretty usable, the "normal" TV viewing stuff is already working. I'm now refining the build system, so that I can tell people what they need to do to build the software, then I'll look at the init scripts etc, so that they can even boot it.
Next thing will be fixing the not yet working stuff - some hardware-dependent like the SCART switching stuff, some software like the media-player and record / timeshift features, but then I'll hopefully have some more people working on the project ;-)

Monday, June 09, 2008

Triple Dragon, anyone?

After a kind guy donated me a Triple Dragon satellite STB (running Linux, of course), i started hacking on it. Unfortunately, the source code to the original Application is not available, but i'm not too happy with that one anyway. With the help of another Tuxbox-pioneer, Carsten "Carjay" Juttner, i now have the enigma GUI basically running on the machine. I do have some problems with the graphics device and the framebuffer (especially the interaction between both), so if you have information or can share your programming experience on IBM STB04xxx boxes or even on the Triple Dragon hardware / API, i would be most grateful for any hints.
I want to solve those problems before moving on and porting neutrino to that beast ;-)

Thursday, June 05, 2008

Suspend to disk with low memory machines

Now this is an interesting bug report :-)

Executive summary: if your machine has less than 128MB of RAM, then please turn off the splash screen in /etc/suspend.conf

Friday, May 23, 2008

HP BIOS update madness

Say you wanted to update the BIOS on a colleague's HP nc6230. You go to the HP website to find a "ROMPaq for HP Notebook System BIOS (68DTA) – FreeDOS Bootable Diskette", which sounds exactly like what you'd want to download.
Well, follow that link and you'll get a file called sp35281.exe. Does not look like a floppy image at all.
So let's find out what it is:

~> file sp35281.exe
sp35281.exe: MS-DOS executable PE for MS Windows (GUI) Intel 80386 32-bit


Damn. A Windows executable, just to create a floppy image...
But there is always wine, so we'll start it with that...

...long story short: it is some kind of self-extracting archive, which extracts an executable (of course for Windows, not DOS...), which then will write the image to the floppy disk.

There would probably be the possibility to configure wine to use a floppy image as drive A:, but fortunately this was not necessary. Examining the rom.exe, not even too closely gives:

~> du -b .wine/drive_c/SWSetup/sp35281/rom.exe
1502208 .wine/drive_c/SWSetup/sp35281/rom.exe


Which is exactly the size of a floppy disk image (1474560 Bytes) plus 27kB.
Just guessing, i extracted the last 1440kB from the executable:

tux@d173:~> dd if=.wine/drive_c/SWSetup/sp35281/rom.exe of=floppy.img bs=1k skip=27
tux@d173:~> file floppy.img
floppy.img: DOS floppy 1440k, x86 hard disk boot sector


Voilá - a bootable floppy image. Now i only hope for HP to start recognizing that they are doing no favour to their customers by obfuscating their BIOS updates like that...

Friday, May 16, 2008

Cool new machine for me

My boss was a good easter bunny. A little bit late, but the gift he brought was all the better: a brand new HP Compaq 2510p notebook (see e.g. Notebookcheck.com for the gory technical details).

It came with the "small" 6 cell battery, which lasts for over 5 hours without any aggressive power management employed, later i got the "big" 9 cell battery which lasts well over 8 hours. Who says size doesn't matter? ;)

I additionally got the HP hs2300 HSDPA Wireless module (which is very much just a rebranded Sierra Wireless MC8775 with different USB IDs) for which i already sent patches upstream for the Linux kernel and HAL, so that it will work out of the box with openSUSE 11.0.

What can i say? This is an amazing little machine.
LED backlit 12.1" display (why do the HP marketing guys call it "illumi-lite" instead of just plain saying "LED backlight"? It has an ambient light sensor which adjusts the display brightness automatically and works very well for me, but it can be switched off with a key combination.
The internal HSDPA card has an amazingly good reception - much better than all the external PCMCIA / ExpressCard cards i had so far. This might be due to the better antenna built into the display, but i don't care why - it just works much better. Additionally, it does not consume a noticeable amount of the battery unless it is really used for transmitting data. I cannot say this of any of the external solutions.
The Ultra Low Voltage Processor is not a performance monster, but it performs at least as well as the ThinkPad X32 (Pentium M 1.8GHz) i had before, and it additionally has VT extensions nicely usable with KVM and qemu-kvm, combined with the 2GB of RAM it is more than suitable for my needs.

Everything on this machine works just fine: the intel 4965 wireless, the bluetooth adapter, suspend to RAM and suspend to disk - everything. Apart from that, it is really portable and still has a built in DVD burner - what else can you demand from your friendly easter bunny?

Thanks!

P.S.: of course, all this is with the current openSUSE Factory. There was a Vista Business installed on the machine, but after fiddling around with that for a few hours, to get it small enough to resize the Partition to less than 10GB, i never booted that again, i just was not impressed by it at all.

Tuesday, March 18, 2008

Activation Of Internal UMTS/3G Datacards

What to do if you got a brand-new ThinkPad X300, but the internal 3G data card (a SierraWireless device with the USB ID 1199:6813) simply refuses to find a network, and as a result cannot connect?
Well, maybe the card is just deactivated by default to save battery. You can enable it easily by sending:

at+cfun?
+CFUN: 0

OK
at+cfun=1
OK


to it (AT+CFUN? returns the current state, AT+CFUN=1 enables the device) with a terminal program of your choice (i always use "screen /dev/ttyUSB0" for such tasks). At least the card remembers this setting, so you don't have to repeat it every time. However, a setting somewhere in UMTSmon to automatically deactivate the card when the program exits would be cool to save some more battery power... I will have to look into that.

Friday, March 07, 2008

Cross-Distro Packaging With Build Service Rocks!

During last hackweek a few days ago, i finished one of my pet projects: to fix up and package tuxcursors. That's fine for SUSE users out there, since i guess the package will be included in the next release, however it does not help the users of other distributions directly.
So i made my first try on building packages for Fedora and Mandriva (apart from my umtsmon packages, but those worked more by accident...) and i have to say that it is pretty easy and straightforward.
So if you want cute penguins waving at you as mouse cursors, go ahead and install the tuxcursors package for your distribution from my Build Service Home, easily found via http://software.opensuse.org/search/ (search for "tuxcursors", of course).
And if you think about packaging your project for more than one distribution, the openSUSE Build Service is definitely worth a look.

Tuesday, March 04, 2008

A warm welcome to the planetsuse.org readers

I finally got my act together and got syndicated on Planet SUSE which will probably multiply the number of readers of my ramblings by quite a big amount.
For those who don't know me already: i'm one of the guys of the fabulous Team Mobile Devices, located in the Nürnberg facility.
If i don't do things related to bluetooth, power management, UMTS/3G, suspend or other portable-computing stuff, i quite often hack on some small digital TV set-top-boxes, of course running Linux.
There will be the odd post in german on my blog, usually for stuff of local interest only. I hope you all can stand that.

So let's have a lot of fun...

P.S. if you want to reply on my blog, make sure not to have the string "http:" in your comment, or i will not even see it for moderation. Thanks, spammers!

Wednesday, January 16, 2008

KDE 4.0.0

It's out, so i tried it: KDE 4.0. It made huge progress since i last tried it about 8 weeks ago. I can, for example, now use two displays at different resolutions, and still get the Desktop right for both (i need to set them up manually in my .xsession, since the kde RandR applet cannot do that, but that's no problem).

However, as long as basic functionality like "moving and resizing the task bar" is not possible at all, i don't care about the excuses that the developers find for releasing this hunk of code, i'll just go back to 3.5 and use some selected KDE4 apps (konsole4 really rocks) on my machine.
See you later at 4.2.