Battering power sources, part II

Today, while having breakfast at a subway station, I stumbled upon a weird case of the laptop’s battery going crazy again.

As you know, Bluecore’s battery basically dropped dead after an unfortunate accident with charging cycles, but now the outlook has slightly improved after its capacity increased as a consequence of booting the laptop on battery power this morning.

$ acpitool -B
Battery #1 : present
Remaining capacity : 1504 mAh, 66.20%
Design capacity : 9000 mAh
Last full capacity : 2272 mAh, 25.24% of design capacity
Capacity loss : 74.76%
Present rate : unknown
Charging state : charging
Battery type : rechargeable
Model number : 25 mAh
Serial number : Primary

(The last two information fields and the design capacity are bogus as usual.)

The BIOS didn’t warn me about charge capacity this time either, nor after plugging the AC adapter in at the university’s central library, so there’s something clearly odd about this. I didn’t wait for the battery to discharge at the subway and left it at 66% before proceeding to charge it again now, so let’s see how this goes in the future. I might be able to squeeze some life out of this deteriorated power source before sending off Bluecore for maintenance and repair.

Bluecore, greycore and blackcore

Often on IRC I refer to my computers by their unique hostnames, which I also use to differentiate their Linux kernel configuration sets, optimized for every individual machine.

Many get confused with this because the names aren’t very descriptive of these machines, so here’s some technical background and history for every one of my technological pets.

Continue reading

Battering power sources

Two days ago, my HP laptop’s battery was working perfectly fine. Then I had to unplug the AC adapter and do stuff with the laptop elsewhere, so the battery was completely discharged afterwards. Then, I charged it again, but when going to bed I unplugged the adapter again when the battery was around 50% charged.

Fast-forward to the next afternoon, when I’m going with my family to celebrate stuff, and I turn on the laptop while in the car. Linux resumes from hibernation fine, and I see my KDE desktop again, with the battery meter at 50%. I check the Wesnoth.org forums for spambots as usual, fire up my IRC client…

And then the battery meter drops to 0%, KDE warns about suspending to disk in 5 seconds, and the laptop’s front panel battery status LED starts flashing.

I assumed that the laptop had just gone bonkers like it’s done before and ignored the warnings of imminent failure. Just as I was mentioning the ongoing problem on IRC, the laptop shut down completely, as it ran out of power.

It seems that this battery has finally collapsed, since the maximum charge dropped dramatically afterwards, and even the BIOS software warned me about it on the next boot. Here’s what acpitool has to say about the poor thing:

$ acpitool -B
Battery #1 : present
Remaining capacity : 704 mAh, 100.0%
Design capacity : 9000 mAh
Last full capacity : 704 mAh, 7.822% of design capacity
Capacity loss : 92.18%
Present rate : 0
Charging state : charged
Battery type : rechargeable
Model number : 25 mAh
Serial number : Primary

(Note: Linux has always reported 9,000 mAh as the battery’s design capacity since day zero. This information is incorrect, and the correct value should be 4,000 mAh. Also note the bogus model/serial information.)

Since this is a rather critical situation, I’m probably going to buy a new battery for the laptop soon — besides sending it away for maintenance, which is in my list as soon as I buy that external hard disk drive on which I’ll be able to fit a complete raw disk image of my laptop’s HDD.

Wesnoth.org status

The host that provides all the primary services for the Wesnoth community, including forums, wiki, add-ons and the primary MP server, has been down for the last 4 hours. Work is underway to determine the causes and solve this problem as soon as it's possible. Stay tuned!

UPDATE 2010-07-31: the server went back online around 3:00 AM CEST. So far we still don't know the reasons for the crash, but we know that the server ran out of memory, which could have locked up the operating system indefinitely before being rebooted by hand.

Why the Wesnoth Markup Language is bad for you

In the past, I've seen many people from Wesnoth's user community and Development Team advocating the use and implementation of WML in Wesnoth and, potentially, other games.

Even I have participated in some debates over whether WML is good or bad for content developers. I have also expressed my opinions on topics such as the old, scrapped Python AI and the currently thriving embedded Lua support, all of this on IRC, usually in #wesnoth or #wesnoth-dev, and even #wesnoth-umc-dev.

I have got to admit that my personal opinions on programming languages have changed over time, mainly because I've learned from real experiences when maintaining or starting small to medium-sized projects built upon some of them. WML sort of counts as one of those since I'm the author and former maintainer of Invasion from the Unknown and, more recently, After the Storm. I have also worked on the WML events engine a bit implementing new features or fixing known and unknown bugs, including some I've found while developing my own WML content.

At this point, I think I am qualified for thoroughly examining the pros and cons of WML with a less partial point of view, so here's a rather lengthy review of both, despite the title of the article, which deliberately sounds like flamewar bait for the audience. 😉

Continue reading

Google Chrome and a conspiracy theory

I just found out that Chromium (browser) has been in Debian experimental and Sid for a while.

I'm currently tracking Squeeze and pulling some packages from Experimental, in particular Iceweasel 3.6, which feels much more stable to me than its counterpart in Testing, version 3.5 — which will probably have to remain in the upcoming Stable release as explained by one of the package maintainers.

(Granted, I'm a fool who doesn't care about security because I don't visit unknown odd sites at all. If it weren't for this, you'd say I should not be pulling packages from Experimental, but I am, fully understanding the risks!)

Despite I can see other packages from Experimental in my package manager, including a localization package for Chromium, I can't see Chromium itself, which is really odd. I have Google Chrome installed and I pull it from Google's repository because…because it added itself to apt's sources after I installed it for trying it out last year — which unfortunately reeks of Internet Explorer's old “integration” thing that started with IE 4, frankly. I mean, why didn't it even ask me about adding the source? Is it modifying other parts of my system's configuration without my consent? What the hell, Google?

Rant aside, this is a strange coincidence, which could be related to a mirroring issue in any case, but I don't rule out the possibility that Chrome is somehow banning Chromium from my package manager. Alternatively my laptop might be possessed by some evil spirit that wants me to leave Debian's free-as-in-freedom packages for evil “Big Brother” software suites. Uncanny?

*(For the Google lovers and haters in the audience: I'm perfectly fine with using Google stuff, mind you. My main email account is from Gmail, my preferred search engine is Google's, I also use Google Maps, Google Earth, and this memory/method call profiling suite of sorts that Sirp recommended to me. I also use Google Translate and reCAPTCHA. So, no, I'm not really bothered by Google Chrome's additions, but I'm really mildly pissed off at their decision to change my package manager's sources without asking me through debconf or something.)

Twitter

Finally, the trap that is social networking has caught me.

Let's see if I make use of this thing. To make things easier for me I'm using Choqok, a micro-blogging client for KDE SC 4.

Yays.

Forum games and Wesnoth.org

Recently, Wesnoth's Off-Topic forum has fallen victim of a virus that had already attempted to take over our community long time ago. Forums games are a fun application of the board system to have some fun in social zones, but they sometimes get annoying.

They get particularly annoying when all the people involved have little or no creativity at all. There was a “Ruin a Wish Foundation” thread in Wesnoth's Off-Topic forum for a while until I locked it to try and see whether anyone would care. Some people did, and in fact, a new “Ruin a Wish Foundation” thread was started shortly afterwards. I simply let it go this time, but the amount of repetitiveness in the game's posts is getting pretty irritating.

Meanwhile, the incredibly hard-to-read “Three Word Story” game is also taking up space, and serves only as an unsettling showcase of these forumers' inability to come up with something different and amusing such as the “Limerick Duel” thread.

All in all, the Off-Topic forum will continue to be doomed to autopruning if this madness continues.

This is particularly terrible because the primary excuse used by the Powers That Be™ to justify the autopruning of Off-Topic is disk space, with pointlessness being a secondary excuse. Autopruning was introduced during times when the Wesnoth.org community forums were hosted on a server that wasn't under our control. This has certainly changed nowadays, and I honestly can't see how it's more important to avoid increasing Off-Topic's size in posts (where normal users can't add attachments) while individual art and music threads in other forums can use take up even more disk space thanks to enormous (occasionally gratuitously redundant) attachments. So, while space is no longer an excuse, the pointlessness seems to be a plague that we can't exterminate. Yet.

As I said not long ago in a certain post in Off-Topic:

Off-Topic is the name of the forum. This has never meant that you can go wild and be stupid or such (“off-topic”) in here.

ACPI DSDT patching again

My old patched ACPI DSDT didn't work well after adding 2 GB of RAM and caused a lot of “interesting” problems, so I built a kernel without a custom DSDT to be able to work safely without hitting a “bad page.”

Last night I fetched the system's DSDT again, patched and recompiled it, removing the rules that disallow non-Vista systems to get certain info from the thermal zone. So now I have a working 2.6.33.5 kernel that can access the ACPI thermal zone again.

shadowm@bluecore:~$ taintedness.pl
Tainted: G A
A (ACPI) - ACPI DSDT overridden.
shadowm@bluecore:~$

With the usual side-effect of tainting the kernel.

More RAM at last! (or, the side-effects of patching the ACPI DSDT)

Today I bought and installed another 2 GB of RAM from my HP Pavilion dv5-1132la laptop while on an errand to buy a new laptop for someone else — it ended up being a HP Pavilion dv4-something in case you are wondering.

This means that I can not only run Windows 2000, Windows XP, Windows 98, OpenSolaris 2009.06 and Debian Lenny on VirtualBox all at the same time now, but I'll also be able to compile Wesnoth faster now that I can take advantage of the dual-core AMD processor without running out of RAM and getting excess swapping to disk during the build!

It didn't work quite well at first, though. Problems occurred when I started enough processes to consume over 2 GB of RAM:

BUG: Bad page state in process VirtualBox pfn:6febe
page:ffffea000187b990 flags:4000000000800000 count:0 mapcount:0 mapping:(null) index:0
Pid: 4323, comm: VirtualBox Tainted: G A 2.6.33.4-bluecore263-preempt-suspend2 #1
Call Trace:
[<ffffffff81086a48>] ? bad_page+0x102/0x115
[<ffffffff810882a2>] ? get_page_from_freelist+0x3b0/0x517
[<ffffffff810884f6>] ? __alloc_pages_nodemask+0xed/0x588
[<ffffffff810884f6>] ? __alloc_pages_nodemask+0xed/0x588
[<ffffffff810a0b2a>] ? __vmalloc_area_node+0xea/0x10a
[<ffffffffa021d514>] ? rtR0MemObjLinuxAllocPages+0xd8/0x1cc [vboxdrv]
[<ffffffffa021d630>] ? rtR0MemObjLinuxAllocPhysSub2+0x28/0xde [vboxdrv]
[<ffffffffa022a7dd>] ? g_abExecMemory+0x1ddd/0x180000 [vboxdrv]
[<ffffffffa022ad78>] ? g_abExecMemory+0x2378/0x180000 [vboxdrv]
[<ffffffffa022d2b0>] ? g_abExecMemory+0x48b0/0x180000 [vboxdrv]
[<ffffffff8102cc1c>] ? cpuacct_charge+0x54/0x76
[<ffffffffa023b2f4>] ? g_abExecMemory+0x128f4/0x180000 [vboxdrv]
[<ffffffffa023d28f>] ? g_abExecMemory+0x1488f/0x180000 [vboxdrv]
[<ffffffffa023d7bb>] ? g_abExecMemory+0x14dbb/0x180000 [vboxdrv]
[<ffffffffa02316da>] ? g_abExecMemory+0x8cda/0x180000 [vboxdrv]
[<ffffffffa0218ded>] ? supdrvIOCtl+0x1241/0x20f8 [vboxdrv]
[<ffffffffa021ce22>] ? rtR0MemAlloc+0x90/0xb4 [vboxdrv]
[<ffffffffa02152a7>] ? VBoxDrvLinuxIOCtl+0x114/0x18e [vboxdrv]
[<ffffffff81028440>] ? pick_next_task_fair+0xac/0x112
[<ffffffff810ba422>] ? vfs_ioctl+0x23/0x93
[<ffffffff810ba92d>] ? do_vfs_ioctl+0x429/0x46d
[<ffffffff810aeff3>] ? fget_light+0xc3/0xe8
[<ffffffff810ba9ad>] ? sys_ioctl+0x3c/0x5c
[<ffffffff81001f2b>] ? system_call_fastpath+0x16/0x1b

While at first I thought it was a problem with the new RAM module itself (either that or damage on the old module, which is occupying the formerly free slot) I quickly suspected of the Linux kernel configuration instead because of several ACPI-related errors in the boot log.

reserve_ram_pages_type failed 0x6febe000-0x6febf000, track 0x10, req 0x10
ioremap reserve_memtype failed -16
ACPI Error: Could not map memory at 000000006FEBEE70, size 7 (20091214/exregion-180)
ACPI Exception: AE_NO_MEMORY, Returned by Handler for [SystemMemory] (20091214/evregion-475)
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.TOM_] (Node ffff88013f8605d0), AE_NO_MEMORY
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0._CRS] (Node ffff88013f860430), AE_NO_MEMORY
ACPI Error (uteval-0250): Method execution failed [\_SB_.PCI0._CRS] (Node ffff88013f860430), AE_NO_MEMORY

After running some memory test utilities and getting no problem reports I recompiled another kernel (blessed be ccache, by the way!) without my patched DSDT which I needed for getting thermal zone readings with Linux. I might have mentioned before that this laptop has a special rule in the ACPI DSDT to not allow any operating system other than Windows Vista (even the particular version) to read the temperature status.

As I suspected, all the boot errors went away after rebooting to an unpatched/untainted kernel, and right now I'm using 3678 MB of 3707 MB (damned graphics controller) without hitting a “bad page.”

I'm not sure why the patched DSDT caused this little mess, but I'll check what happens if I repatch it now, using the current “original” DSDT.