Results 1 to 10 of 36

Thread: How-to: use custom DSDT in Karmic

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Beans
    64

    How-to: use custom DSDT in Karmic

    I've seen a lot of threads with users who are having troubles due to the inability to load a custom DSDT file in kernels after 2.6.30. This prevents many users from upgrading simply because their hardware will not run correctly without a fixed DSDT. I fell into this category with my gateway lt3103u netbook and compiled a working kernel (2.6.31_15.50). I figured I would show what I did so people can do the same. If your laptop overheats or CPU scaling doesn't work, this might be for you.

    What you need to upgrade:

    1. A working DSDT tabled (compiled):
    For gateway LT31 users:
    http://www.pow.za.net/index.html

    Thread on fixing your specific DSDT file:
    http://ubuntuforums.org/showthread.p...ght=buggy+dsdt

    2. Kernel source for the kernel you wish to compile:
    Download linux-source-2.6.31-<version-number-here>.deb from:
    http://archive.ubuntu.com/ubuntu/pool/main/l/linux/
    and install using
    Code:
    sudo dpkg -i linux-source-<version-number-here>.deb
    or use apt for current kernel

    Code:
    apt-get install linux-source
    3. Any patches you wish to apply. (ie powernow patch for netbook CPUs)

    Now we can begin compiling the Kernel, I am following this guide:
    https://help.ubuntu.com/community/Kernel/Compile

    First get nessessary packages:
    Code:
    sudo apt-get install fakeroot kernel-wedge build-essential makedumpfile
    sudo apt-get build-dep linux
    sudo apt-get install qt3-dev-tools libqt3-mt-dev
    Now we make a directory and extract the kernel source into it:
    Code:
    mkdir ~/src
    cd ~/src
    tar xjvf /usr/src/linux-source-<version-number-here>.tar.bz2
    cd linux-source-<version-number-here>
    Now we copy over our current kernel configuration so we only have to change the DSDT option in the new kernel
    Code:
    cp -vi /boot/config-`uname -r` .config
    Now we configure the kernel use our custom DSDT table. You need to know the path to the compiled DSDT table you are using. In my case, I copied my DSTS table from 'dsdt.hex' to '/dsdt/dsdt_table.h'.
    run xconfig
    Code:
    make xconfig
    Now we will point to the DSDT table in xconfig:
    - On the left pane, highlight "ACPI (Advanced ..."
    - Now, in the right pan doubleclick "Custom DSDT Table file to include: "
    and enter the full path to your DSDT table

    - Save the configuration and exit.

    If you do not have patches to apply, skip this part: Apply any patches you have now using
    Code:
     cp path-to-patchs ~/src/linux-source-<version-number-here>/
    patch -p0 < patch_name.diff
    Now we compile the kernel:
    Code:
    fakeroot make-kpkg --initrd --append-to-version=-some-string-here kernel-image kernel-headers
    After this is finished, the deb file will be located in ~/src/, and now we can install it:
    Code:
    echo vesafb | sudo tee -a /etc/initramfs-tools/modules
    echo fbcon | sudo tee -a /etc/initramfs-tools/modules
    sudo dpkg -i linux-image-<version-number-here>_i386.deb
    sudo dpkg -i linux-headers-<version-number-here>_i386.deb
    I tested this with my gateway lt3103u using kernel source 2.6.31-15.50 from the ubuntu repositories and my custom DSDT works perfectly.

    This is my first how-to, so let me know if there are mistakes/suggestions
    Last edited by cyberey66; November 30th, 2009 at 04:27 AM.

  2. #2
    Join Date
    Jan 2005
    Beans
    173

    Re: How-to: use custom DSDT in Karmic

    Thanks so much for doing this. My brother is going to be getting the same netbook you mention this upcoming Christmas. A couple questions for you...

    1) If he updates his packages and a new kernel comes out, will it just overwrite all the manual labor I did above?

    2) Any chance that CPU scaling / powernow will be supported by default in a future kernel? Thanks!

  3. #3
    Join Date
    Jun 2007
    Beans
    6

    Re: How-to: use custom DSDT in Karmic

    Quote Originally Posted by spaceballl View Post
    Thanks so much for doing this. My brother is going to be getting the same netbook you mention this upcoming Christmas. A couple questions for you...

    1) If he updates his packages and a new kernel comes out, will it just overwrite all the manual labor I did above?

    2) Any chance that CPU scaling / powernow will be supported by default in a future kernel? Thanks!
    1) If a new kernel is released by the Ubuntu team for your version of Ubuntu, it will not remove your installed custom kernel. However, you may have to repeat the recompiling and patching (if applicable) steps if you want to take advantage of any fixes or new features in the new kernel.

    2) The 2.6.32 kernel already contains the powernow patch, but you may still need to recompile the kernel in order to set the location of your dsdt file. However, 2.6.32 is slated for inclusion in the Ubuntu Lucid release, not Karmic. Despite this, you can always grab the latest 2.6.32 kernel sources from the Ubuntu kernel PPA here: http://kernel.ubuntu.com/~kernel-ppa/mainline/

    I'm compiling 2.6.32(.2) right now because I believe (from bug reports I read) the connectivity issues with the ath9k wifi driver have been fixed in 2.6.32, without sacrificing power management.
    Last edited by mscdex; December 21st, 2009 at 01:58 PM.

  4. #4
    Join Date
    Nov 2005
    Beans
    17

    Re: How-to: use custom DSDT in Karmic

    Have you tried the 2.6.32 kernels? I tried one of the debs from that mainline that was for 2.6.32.4 and wireless seems better but powernow doesn't seem to be working for me. I'm not sure why but when I tried to patch the kernel from the sources the patch failed on most of the changes:

    Hunk #1 succeeded at 863 with fuzz 2 (offset 8 lines).
    Hunk #2 FAILED at 879.
    Hunk #3 FAILED at 951.
    Hunk #4 FAILED at 992.
    3 out of 4 hunks FAILED -- saving rejects to file arch/x86/kernel/cowernow-k8.c.rej

  5. #5
    Join Date
    Jun 2009
    Beans
    64

    Re: How-to: use custom DSDT in Karmic

    Quote Originally Posted by meatwad64 View Post
    Have you tried the 2.6.32 kernels? I tried one of the debs from that mainline that was for 2.6.32.4 and wireless seems better but powernow doesn't seem to be working for me. I'm not sure why but when I tried to patch the kernel from the sources the patch failed on most of the changes:

    Hunk #1 succeeded at 863 with fuzz 2 (offset 8 lines).
    Hunk #2 FAILED at 879.
    Hunk #3 FAILED at 951.
    Hunk #4 FAILED at 992.
    3 out of 4 hunks FAILED -- saving rejects to file arch/x86/kernel/cowernow-k8.c.rej
    The powernow patch is included in the new kernel releases, so no more patching of it is needed! Or it should be at least.

    Edit, I'll ask here too. Does anyone know anything about SUSE still patching their kernels to allow loading a custom DSDT? I heard rumors but haven't found any information. I asked on the SUSE forums, but haven't heard a response yet.

    Edit, I'll try the new kernel source and post back. It will be a day or two though, I'm pretty busy.
    Last edited by cyberey66; January 22nd, 2010 at 04:49 AM.

  6. #6
    Join Date
    Nov 2005
    Beans
    17

    Re: How-to: use custom DSDT in Karmic

    Yeah I tried to patch it because the 2.6.32.4 kernel doesn't have powernow. cpufreq-info says:

    analyzing CPU 0:
    no or unknown cpufreq driver is active on this CPU


    and uname -a gives me the kernel of:

    2.6.32-02063204-generic #02063204 SMP

    I was able to re-compile my own kernel from 2.6.32.4 sources but video is very garbled but it was throttling the cpu correctly.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •