Index ¦ Archives ¦ RSS > Category: hacking ¦ RSS

Lenovo Ideapad S12

Estimated read time: 3 minutes

I bought this netbook about a week ago (the one with the Via card).

Actually it costed 106 kHUF (~$550) instead of the advertised $400, but that probably due shipment costs, etc.

Here are what requirements I had:

  • I wanted a simple video card, it's much more important for me that I don't have to use external kernel modules than the actualy 3D performance. So NVidia is clearly an overkill for me. I wanted Intel or similar.
  • 12"-sized LCD - my iBook had it and I loved it. I agree that it's too small when we're watching films with 5 other friends or playing games, but I don't do either regularly.
  • Touchpad. I don't like trackpoint.

Here is what I got:

  • The Via card is so far OK, the openchrome driver has a nice community and at least 2D acceleration works fine, and they are working on the 3D one as well. (Other card types have 3D support, too - This type is just too new ATM.)
  • The LCD size is what I want - looks like you can't easily buy a 12" notebook, but a 12" netbook counts as a high-end one.
  • Of course it has touchpad.

Let's see what extra does it have:

  • VGA output (iBook had some custom output and I never got a VGA converter cable.)
  • Bluetooth
  • SD-Card reader
  • Webcam
  • KVM support
  • HW mpeg2/4 and dm-crypt support

What's wrong with it:

  • The cover is shiny, the mark of the fingers are left there when you grab it.
  • No optical driver, but hey, it's a netbook!

Let's see Linux support: First, the machine is shipped with Windows XP. The bios updater is windows-only, so I updated the bios before I rm -rfed the whole preinstalled contents.

What works:

  • Via Nano CPU: works fine.
  • Via card: after installing the opencrome driver a simple 'xconfig' from frugalwareutils did its job, no other tricks were necessary.
  • SATA controller works fine.
  • Wired ethernet works fine.
  • Wireless: the in-tree b43 works for WPA APs but not with unsecure ones. The binary bcmwl driver works in the later case as well.
  • SD-Card reader works out of the box.
  • Sound is fine.
  • The webcam works with mplayer using the "mplayer -tv driver=v4l2:device=/dev/video0 tv://" command.
  • Bluetooth is fine.
  • KVM support (vmx flag) is there in the CPU.
  • dm-crypt has HW support, so copying to a truecrypt volue isn't slower (~40mb/s) than copying to an unencrypted one.

What does not work with Linux:

  • There is no ideapad-acpi module to turn on or off wifi/bluetooth in the Embedded Controller (EC) of the ideapad. In my case I enabled wifi only when I updated the settings of the EC back in Windows, so Bluetooth is disabled. Feel free to post in commends if you have ideas how to set the EC from Linux. ;)
  • The 3d and mpeg2/4 decoding HW support of the graphics card doesn't work.
  • Hibernation is broken due to the weakness of the openchrome driver.

I think that's all. As always, it's possible that these limitations can be avoided in the future, who knows. ;)

Ah and the battery works for 5 hours with wifi enabled, I think that's nice. (And probably it's due to the LED-powered LCD.)

In case of questions, please post them in the comments and I'll try to reply.

PS: It doesn't really belong here, but if I was at it, I also switched (compared to iBook):

  • to x86_64 from ppc
  • to ext4 from ext3
  • to kde4 from kde3

Update: I did a backup about the config files, reinstalled Windows XP, enabled the bluetooth in EC, and installed i686 for now. So the changes are:

  • Bluetooth is now working perfectly
  • 2D acceleration is stable (ie. if you start mplayer -vo xv the second time, it won't freeze)
  • Suspend to disk works fine, as it was expected.

\o/


mails

Estimated read time: 1 minutes

Say you have two servers, the first is just a mail proxy, the second is a real mail server. So the MX record points to the first box and you usually just read your mail on the second one.

We use this system at frugalware.org as well to make the service a bit more robust: if genesis (the "second" box) goes down, the proxy machine(s) can just queue up the input and in case one of the proxy machines go down, then the sender will just try an other proxy.

The problem occurs when the "second" box goes down and you need to read your mail ASAP. Let's say you have access to the first box. You see in the output of 'mailq' that there are messages in the queue but how to read those mails?

'mailq' gives the ID of each message, and then the following script (I call it 'mails' - s for show) can generate mbox format from it, which means you can read it with for example 'mutt -f foo.mbox'.

The script itself is fairly easy:

#!/bin/sh

echo 'From news@gmane.org Tue Mar 04 03:33:20 2003' |sed '1,/^\*\*\* MESSAGE CONTENTS/d;/^\*\*\* HEADER EXTRACTED/,$ d'

(And of course it's possible there is a better tool to do the job, but I use this for months now.)


New firefox profile

Estimated read time: 2 minutes

I’m continously upgrading my Frugalware installation, IIRC I installed 0.2 on this Clevo machine and I never saw any reason to reinstall. Sadly the situation is not that easy with applications, for example firefox’s profile tends to grow from 20M over 100M and the only way to really get rid of all the junk it has is to start over.

Given that in the last month I did not really have time for such minor problems, now I decided to solve this by doing an mv ~/.mozilla{,.orig}.

I must note that I’m not a typical firefox user, given that I store my passwords in cpm, bookmarks in git (as I use multiple machines and I trust those applications more than firefox), and finally all the extensions I use are installed via Frugalware firefox-$extname packages.

Now I thought that this way the new profile usage will be easy enough, though there are still a few things to note:

  • The bookmarklets (allowing fast search in various bugtrackers) should be installed again.

  • The searchbar autosizer addon has bad defaults, I like to have the search bar with a fixed 203px size (355px on 1280x800) — though nowadays this regressed, see moz#253331.

  • Finally I forgot I have a custom userChrome.css (also obsolete nowadays):

.tabs-newtab-button { display: none; } /* remove New Tab button */
  • Change browser.backspace_action to 0 to make backspace to a back (as on Windows).

Other than that, no changes were necessary.


source-highlight with Erlang support

Estimated read time: 1 minutes

I wanted Erlang support in the syntax highlighter used by asciidoc. Currently the filter uses source-highlight as its backend, so I checked and unfortunately it had no Erlang support. A quick google found that there is a good shjs support which would ideally work out of the box with source-highlight. Of course it did not, but it wasn't hard to fix it up. Then I sent it to upstream. This was about a month ago.

Then I just noticed it was accepted a few days ago, and now source-highlight-3.1.2 is out, so it's back in Frugalware-current \o/


KDE3 apps I use

Estimated read time: 1 minutes

Given that a lot of KDE3 apps are not just ported to KDE4 but replacement projects have been created, the upgrade is not trivial. I always declare myself as somebody who is a minimal KDE user saying I mostly just use konsole, but that's not really correct. From time to time I use the following apps as well:

  • kmix (systray icon)
  • klaptop (systray icon)
  • kxkb (systray icon)
  • krdc
  • kaudiocreator
  • k3b
  • ksnapshot
  • kpdf
  • konqueror (for GUI mounting of USB sticks, when I don't use pmount)

And that really doesn't belong to here, but I still use gtk-based apps for browsing and picture viewing (firefox and gqview).

I hope this post will be able to serve as a good personal checklist when we merge kde4 to current. ;)


2.6.32 kms vs intel 8xx cards

Estimated read time: 1 minutes

This story is a couple of days old, but in case you don't use Frugalware, and have such an Intel card, it may be interesting...

Here is the bugreport, it took me about 1,5 days to bisect it, but at the end at least I have a workaround for the issue.

Given that now Gordon Jin from Intel set its priority to high, I'm curious how long will it take for them to provide a solution.

The sad part of it is that mplayer -vo xv still does not work, but the gl output is not so terrible, after all.


mplayer vs kms

Estimated read time: 1 minutes

mplayer -vo xv is broken for intel 8xx cards in Frugalware-current since we enabled KMS. They are working on it, but till 2.6.32 is stable, I needed an interim solution. The problem is that now the default is -vo x11 which does not scale the movie at all when I enable fullscreen. So -vo gl works fine, and making this default is easy: just add 'vo=gl' to ~/.mplayer/config.

Erlang sudo solver

Estimated read time: 1 minutes

First, sorry I'm not yet publishing any code. It's about there is a race at the uni where the fastest implementation wins, so I don't want to share anything before that ends. It'll end in a month, actually. ;)

Other than that, it's a generic sudoku solver, it can solve NxN sodukus, not only 9x9 and it handles extra rules. A detailed description is here (gt).

But of course the purpose of this post is to bookmark a few useful page I found while working on my implementation:

The important part of the later links is three lines:

1> fprof:apply(foo, create_file_slow, [junk, 1024]).
2> fprof:profile().
3> fprof:analyse().

That makes profiling Erlang programs really easy, once you get used to the output, which is a bit weird for the first time. :)


HTTP head support in darcs-fast-export

Estimated read time: 1 minutes

Ian merged my work today, so bzr-fastimport (which contains darcs-fast-export) from bzr now has it out of the box.

This feature is about the following use-case: if you wanted to import a darcs repo to (for example) git, then you had to 'darcs get' the darcs repo first, then import it to git. Now darcs-fast-export can do this without a 'darcs get' if the repo is available via http, reading much less files, resulting less data transfer. :)

(The trick behind it is that darcs-fast-export reads only the patches, while darcs get reads boths snapshots of the repo and the patches, so a darcs get takes much more time than a darcs-fast-export.)


Pairing with kbluetooth

Estimated read time: 1 minutes

Here is the use case I saw: I try to run 'gammu identify' from commandline, it finds my phone, the phone asks if I want to pair with my notebook, I say yes, it asks for a pin code, and whatever I answer, the pairing fails.

Looks like the way it works is the other direction: start kbluetooth, choose settings, devices, then set the mode to discoverable (for 3 mins, that should be enough). Then go to paired devices on the phone, choose delete pairing, then add the notebook again, it will ask for a pin and pairing will succeed.

A bit weird, but it works at least.

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.