Sunday, June 8, 2008

Cutting down the power consumption od Dell Latitude D630 under Ubuntu

Running Gentoo on my laptop had it's pros and cons. I had a fully customized system, on the other hand I needed to learn more to have it that way. So I given a chance to Ubuntu (Hardy Heron).

Using laptop, I take it's power consumption quite seriously. With less power consumption, I can work (or watch movies, listen to music etc.) longer on my journeys. And since most of the power turns into heat, less consumption also makes using the computer more pleasant. Intel, who made the horrible and nearly always wrongly implemented by the PC vendors ACPI, also made a nice piece of software — PowerTop. This utility can show you, how much does the system drain the battery and what are the main reasons for high power usage.

On Gentoo, with all the power saving features my power usage was about 20W, giving me over 3 hours of work. On Ubuntu, it was 30W. That's a big difference. Interesting was the CPU was nearly on idle, so the problem had to be somewhere else.

I read about ACPI problems all the time and I know there are some with my laptop. I even patched the DSDT table on Gentoo (being lead by how-to). And there were some ACPI errors in the system log. So I tried doing the same under Ubuntu, what if that's what's causing the problem. There is substantially lower amount of nice how-tos for Ubuntu, maybe for Ubuntu people such problems don't happen. But fortunately there are different problems with similar solution, which we can use.

I don't want to make this long, so yes, it worked, there are no ACPI errors in my log now and the power usage is where it is under Gentoo. And here's my how-to based on Gentoo D630 how-to and Ubuntu ACPI Battery how-to. It should apply for Hardy Heron, things can be different in the future or were different in the past:

  1. Download the DSDT table for Dell D630 (even though it has a gzip extension, it's a plain-text file so don't bother uncompressing it) from address:
    http://acpi.sourceforge.net/dsdt/dl.php?id=956
  2. Install the essential packages for compilation under Ubuntu and the iASL compiler:
    sudo apt-get install build-essential iasl
  3. Go to the directory you downloaded the DSDT table two and compile it using iasl:
    iasl Dell-Latitude_D630-A03-original.asl.gz
  4. There shouldn't be any errors and you should end up with dsdt.aml file. You need to copy it to /etc/initramfs-tools/ directory using name DSDT.aml (you should mind the caps):
    sudo cp dsdt.aml /etc/initramfs-tools/DSDT.aml
  5. Now you have to reconfigure the kernel to use the new DSDT table. When you upgrade the kernel in the future, this should happen automatically:
    sudo dpkg-reconfigure linux-image-$(uname -r)
  6. Now you have to restart your computer (I bet you don't do that much). Your system log should miss some ACPI errors and state something about loading a DSDT table.

Well, that's all, let's save the electric power together!

Thursday, May 10, 2007

My Own Integer

I'm not posting very much, but this thing deserves one post. Yes, I got my own 128-bit integer! Here it is:

42 58 35 CB 23 C9 CB A7 79 94 06 67 1E A8 3A 0F

I don't know if it's really mine even though I do not live in the USA, where they're taking now obsolete copyright law into next level by screwing it up so the so-called copyright holders get much more rights than they should have (of course only if your a really big phonographic company endangered by it's rigid management). But why not give it a try.

You can have your own integer too, just visit the official integer copyright office ;-)

Thursday, February 15, 2007

Make your site Crap 2.0

The world wide web is developing, no questions. But so are the ways how to make the web a total crap. I admit I tried both, too.

No more B&W

Human sight is capable of perceiving colors so why not to use them. But they have to match together, this means you have to chose the lowest contrast possible or again the highest visual contrast possible (like pink or gold on black). Text shouldn't be too readable, because you would distract your visitor from the cool things described below.

Cool Images

HTML supports images for quite some time. And many have noticed that they can contain animations! So there were and still are many many webs with nice moving, ehm well, everything. The "not so annoying but still totally useless" versions are the famous "Under construction workers" and "Spinning mail envelope". Lovely.

A little more sane website authors like using various information images like weather forecast or traffic counter. Don't ask why the visitor needs to get the weather info while surfing his ISP's homesite, or why should he know how many people visited the page last week. Except of course you want to annoy him with slowly loading page waiting for the overloaded service server (probably because too many bloggers, proud parents and hamster lovers need to show the local weather and the fact that it's the 10th visitor already!).

Ping... Multimedia.

Some time ago the web browsers also allowed people to use background sounds for the web pages. And say "WOW", Flash made it even easier. It's a nice idea to play your visitor your favorite song, isn't it? Don't mind it loads slowly and the quality sucks, your visitor will probably gladly turn the music he's currently listening to down or turn down the volume after being knocked down by the laud metal music (or anything of your taste).

It's also a good idea to place an intro animation to your site. It allows the visitor to get ready for all the wonderful items you placed on the page. And it... well, I don't know what else is it good for, all right?

Web 2.0

Wait, all these things are pretty old, aren't they. And we're in the age of Web 2.0, aren't we? Somebody says that all these social aspects, users controlling content and communication are the most important thing, while the AJAX, JS, nice big fonts and Beta state are just means of achieving it. But we know otherwise.

AJAX is nice. And there are many free scripts you can use! They will pop out to your visitors and show them that you're as cool as you these scripts. Just using snap.com will make your web "Web 2.0", but rename "Your site" to "Your site BETA" too, just in case.

And now for something completely different

What I tried to show are still the same mistakes. While some of the cases are so extreme that only the least advanced users make them (but because of the distribution of skills and good taste they could be quite often seen). But also the less obvious ones are the same - you impulsively find something interesting and without seeing about your page as a whole and thinking about what you're trying to tell by means of it, and thus make it less attractive. Put simple, the atractivity of the whole isn't a sum of attractivity of it's parts.

I mentioned snap.com because it's quite frequently used nowadays. And it's a perfect example (I would repeat what others have said before, so just check this article). But there are many more (if this blog had bigger audience I would ask the readers to put their favorites in comments; in fact you're still welcomed to do so). They together help to make your web what I call "Crap 2.0".

I don't say that every piece of AJAX you put on your site is bad, it all depends on the particular case. When you find something interesting you could put onto your site, think about why you should put it there, what it gives to your readers and what is in it for you first. If you still think it's useful, you're probably right. I use flickr badge and google reader shared items on my blog myself because they allow me to attract the readers to other content I find interesting. And they're under my control.

You won't get Web 2.0 just by putting popular AJAX code pieces on your website. In the end it's all about content, not effects, and that's what's the Web 2.0 about.

Saturday, January 27, 2007

Sitemaps and Blogger.com

Let's say you're fond of Google Webmaster Tools that help you to manage you're site in relation to the world's best known search engine. When you're working with your own site, it's quite simple, you use the file or meta notification to see the information about how Google sees your site and you can help it to index your site by submitting sitemap (which you either create yourself or you use some kind of available generator). I like it quite a lot, it seems to me that it speeds up the process of including my pages into Google's search engine.

Then you're start using Blogger.com for your domain and used to Google Webmasters Tools you would like to use it for your blog too. You would like to know how well Google's indexing it and you don't trust it's indexing it differently than by using web spider (only following the links the web spider finds) although as a Blogger.com operator it knows all your pages, don't you?.

First problem may be to validate your site. You can't upload your file, but you can use meta tag validation (thorough description on this blog, but you probably don't need a step-by-step instructions, otherwise you wouldn't be interested, do you?). Second problem would be submitting the sitemap. You can't create a proper one, but at least you can use the Atom feed provided. It doesn't list all your pages, but this doesn't matter that much, the new ones are there to be indexed. But without knowing the old Blogger.com, it can be confusing a bit.

Originally Blogger.com used for your blog feed this kind of URL: http://en.zubicek.eu/atom.xml (yep, that would be mine). But with the new system it introduced Cool URIs and new feed URL (http://en.zubicek.eu/feeds/posts/default), which can't be added as a sitemap, strangely Google counts only the same directory as the same domain (it's a little odd, logic behind this would probably be that someone who can add files to higher directory has also control over subdirectories, but not vice versa). So, you won't be able to add this URL.

Fortunately, people at Google aren't stupid and thought about those who change old Blogger for the new one. If someone had their feed in his reader it would stop to function with this change. So the old URL keeps working. This means you just add the old style URL (for me http://en.zubicek.eu/atom.xml) as a sitemap to the Webmaster Tools).

That's it, now you can see how Google sees your blog and even help it indexing it.

Why do I need keyword based filtering for AdSense

Imagine a website about the Half-Life 2 game. It's in Czech, while AdSense for Czech content is available for about two months, therefore there are not many advertisements leading to not to high bids.

As a Half-Life 2 website it's full of articles containing words like "Valve" (meaning that software publishing company), Source (3D game engine) or Steam (software for game distribution). And of course lots of Czech texts.

Now, when AdSense servers try to match the appropriate adverts for my web, they most probably choose the one with for the word with higher bid. So mostly adverts for Steam sterilizers, water controls or in the best case software development. And of course in English. I can't speak for all of the visitors but I'm sure most of them aren't interested in those topics and when the click on them, they do by accident. So it's a lose-lose-lose situation for me (less income), Google (the same) and the advertisers (worse conversion).

Yes, there is a possibility to filter inappropriate ads by their URL, but first it doesn't work well (too many times I see an add blocked many days ago) and there's too many unwanted ads that I'm unable to filter them all out.

There would be few ways how to get rid of them:

  1. Google fixes it's algorithms so they take into account not only the words but also their context (most difficult and improbable)
  2. Google fixes it's algorithm so the ads in different language have lower priority (but maybe they use it already but the priority for Czech ads is still too low)
  3. Google let me choose what words aren't relevant to content on my site

I hope it's obvious the latter is the best. It can't be misused to get irrelevant but high-priced ads and it would enable me to tell the algorithm, which doesn't truly understand human language, what are the irregularities in my texts. Fortunately people in Google are preparing this function and it's even said it's in beta testing. So I hope it will be publicly available soon (or that I will be invited to beta testing - do you hear me, someone from Google? ;))

Thursday, January 18, 2007

Moving to a new place


View.
I've finally managed to move from the university dorm to a new place. Living at the dorm had become more and more restraining and my budget allows me now for something better.
Who'll be able to find out the address (it's not that difficult ;))?

Sunday, January 14, 2007

Blogger.com validation errors

Wow. I tried running my new blog through validation. I'm not the person who would be mad about validations error unless it breaks the page in Firefox or Opera, but still, 725 errors are quite too much. I don't know, why to use a standard w3c doctype when you're practically using your own, distantly related one?

And yes, I know this service is free. But making something free did never mean the right not to be criticised for mistakes and using something for free doesn't strip me of my right of expressing my opinion.

If you're asking what's the point of this post, you can consider it a product of the process of me getting the final opinion of this service. And since you're still reading it at this place, it's obvious it's not the most important thing. Nothing more, nothing less.