UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I finally got around to pulling my old Acer Travelmate C100 (an original Tablet PC!) out of storage and installing Kubuntu 6.10 on it, and it works like a charm, tablet functionality and all.
The problem is, the battery status doesn't work-- it says no battery is even connected. I'm apparently not the only person with this problem. On the Acer Travelmate C100 page on the Gentoo wiki, someone said:
Quote:
It was a hard fight to let the kernel accept ACPI support for my C100, it seems that its RSDP checksum is invalid and the kernel refuses to enable ACPI support because of this. Dean Townsley provided a patch forcing the kernel to use a more sophisticated routine to detect the ACPI data tables (it seems that there are two different functions existing) and voila - it works. While Ubuntu 6.06's Live CD accounts for this ACPI problem, an actual installation remains ignorant of the matter.
(emphasis mine) This is exactly what I encountered as well-- it worked on the Live CD, so I assumed it would on the install.
The patch they list to fix it is pretty short, but targeted against an older kernel.
What would be the easiest way to apply a similar fix to a 2.6.17 kernel? I'm good enough at linux to follow the howtos (like this one) to compile my own kernel, but not good enough to author a new diff file.
If anyone can help or has other ideas, I'd love to hear it. Thank you!
What would be the easiest way to apply a similar fix to a 2.6.17 kernel? I'm good enough at linux to follow the howtos (like this one) to compile my own kernel, but not good enough to author a new diff file.
--
Paradoxdruid
Well, as the patch seems not compatible; either you try on a mailing list related to acpi.
Or ubuntu as you seem to have tracked an easy way?
Or you author a new diff file...
The patch doesn't seem THAT complicated (I know it's relative but here you want to add linux support to something that has windows initially.. it is called hacking.. challenging) If you have a bit of experience in C, it should be possible; the hardest part has been done.
Print the patch, study it. Print the current arch/i386/kernel/acpi/boot.c and see how you can inject the patch in this file.
If you have no experience in C, you need to learn C.
Also you need to understand patch format (not hard at all).
-- means lines removed
++ means lines added
other ones are lines so that patch can resynchronise on fix lines.
You could try the patch against the 2.6.17 kernel. If the line numbers in the diff file don't match, patch scans both forwards and backwards for a set of lines matching the context given in the hunk. Maybe you'll get lucky and you've got nothing to lose.
The patch is pretty small, you could probably apply it by hand without much problem. This part tells you which file is affected
Code:
+++ linux-2.6.11/arch/i386/kernel/acpi/boot.c
This line tells you which lines in the original file are affected. Lines 506-533 beginning at line 506 in the original file becomes lines 506-512 in the new file. In other words, there were 21 lines removed from the original file.
Code:
@@ -506,27 +506,6 @@
The - shows the lines that were removed from the original file and the + shows what was added.
If you are successful at making the changes to the 2.6.17 kernel code, this will create a new patch that you can then share with the community
This is exactly what I encountered as well-- it worked on the Live CD, so I assumed it would on the install.
Make a copy of your problematic /boot/vmlinuz... and /lib/modules/2.6xxx
Copy the vmlinuz and /lib/modules/2.6xxx from the CD to the disk.
Pray & Reboot
You could try the patch against the 2.6.17 kernel. If the line numbers in the diff file don't match, patch scans both forwards and backwards for a set of lines matching the context given in the hunk. Maybe you'll get lucky and you've got nothing to lose.
No luck, unfortunately. Many of the hunks fail.
Quote:
The patch is pretty small, you could probably apply it by hand without much problem. This part tells you which file is affected
Code:
+++ linux-2.6.11/arch/i386/kernel/acpi/boot.c
This line tells you which lines in the original file are affected. Lines 506-533 beginning at line 506 in the original file becomes lines 506-512 in the new file. In other words, there were 21 lines removed from the original file.
Code:
@@ -506,27 +506,6 @@
The - shows the lines that were removed from the original file and the + shows what was added.
Thanks for the help. I know most of the diff schema, but I didn't understand the @@ markers. I'll try applying it by hand.
Side note, I double-posted this thread to the Ubuntu subforum because I wasn't sure where the best fit was. A moderator closed that thread, so I can't apologize there. But I didn't mean to forum spam!
A moderator closed that thread, so I can't apologize there. But I didn't mean to forum spam!
Standard rule. They can't differenciate between spam and non-spam..
I thought posting an an ubuntu-only forum. Probably that there are more ubuntu gurus overthere..
An idea (if I understood well that one kernel works)
If you take my debian source kernel, it comes like this:
vanilla kernel
+
list of patches
Try to get the source package of your working kernel, maybe you get the patch already done?
I manually applied the patch that Dean Townsley wrote (from the Gentoo Hardware Wiki) to the linux-source-2.6.20 from the Ubuntu repositories.
After making my kernel packages and installing them, it works like a charm-- now I see battery status, and I can control the dynamic CPU frequency changes.
So I followed your instructions to turn my changes into a patch file to share with the community, attached below. I'll see if I can get it to the Acer Travelmate C100 pages across the web.
+
+ static unsigned long __init
+ es7000_acpi_scan_rsdp (
+ unsigned long start,
+ unsigned long length)
+ {
+ unsigned long offset = 0;
+ unsigned long sig_len = sizeof("RSD PTR ") - 1;
+
+ /*
+ * Scan all 16-byte boundaries of the physical memory region for the
+ * RSDP signature.
+ */
+ for (offset = 0; offset < length; offset += 16) {
+ if (strncmp((char *) (start + offset), "RSD PTR ", sig_len))
+ continue;
+ return (start + offset);
+ }
+
+ return 0;
+ }
+
+
+ unsigned long __init
+ es7000_acpi_find_rsdp (void)
+ {
+ unsigned long rsdp_phys = 0;
+
+ if (efi_enabled) {
+ if (efi.acpi20)
+ return __pa(efi.acpi20);
+ else if (efi.acpi)
+ return __pa(efi.acpi);
+ }
+ /*
+ * Scan memory looking for the RSDP signature. First search EBDA (low
+ * memory) paragraphs and then search upper memory (E0000-FFFFF).
+ */
+ rsdp_phys = es7000_acpi_scan_rsdp (0, 0x400);
+ if (!rsdp_phys)
+ rsdp_phys = es7000_acpi_scan_rsdp (0xE0000, 0xFFFFF);
+
+ return rsdp_phys;
+ }
+
+
/*
* Parse the OEM Table
*/
@@ -166,7 +213,8 @@
int i;
struct acpi_table_sdt sdt;
- rsdp_phys = acpi_find_rsdp();
+ /* FIXME -- can we use the general acpi_find_rsdp() ? */
+ rsdp_phys = es7000_acpi_find_rsdp();
rsdp = __va(rsdp_phys);
if (rsdp->rsdt_address) {
struct acpi_table_rsdt *mapped_rsdt = NULL;
Not really much work at all-- the only reason that Dean's patch wouldn't still work is that the context cues in his patch file aren't current enough for patch to deduce where to make the changes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.