[SOLVED]How to patch the kernel? And other questions

Like the same user who started this thread I'm suffering from hibernation resuming troubles using kernel 2.6.38. In that thread was posted a soluttion that involves patching the kernel.
The patch to apply is this:
http://git.kernel.org/?p=linux/kernel/g … e3e9fc8684
Waiting for the bug to be corrected and a new version supplied is not an option, because this laptop is my main computer and I heavly rely on hibernation.
Here's my trouble now. I don't know if it is possible to patch without recompiling the whole kernel, or it has to be compiled with that patch applied. I have seen the archlinux's wiki guide about compiling the kernel, but found nothing about applying patches (maybe I didn't searched with enought depth).
In case there is needed a full compilation, should I use the vanilla kernel, the Arch Linux one or any of the AUR ones (I said AUR because they're the first that came to my mind)? Should i expect a performance gain with this (apart from fixing the hibernation bug)?
Maybe i'm just doing a bunch of dumb questions, and the only thing I need is to search deeply on the wiki. In that case, please tell me. If not, I rather get some answers around kernel patching and / or compiling questions.
Edit: In addittion, it is possible that all this questions are just newbie ones, I don't know, but as I am willing to learn from this I will appreciate any info or documentation about it.
Thank you.
Last edited by ethail (2011-04-12 06:30:48)

From the source tree (/usr/src/linux-whatever) execute
patch -p1 < /path/to/fix.patch
then recompile kernel from the source tree.
Basically that consists of executing the following commands from the source tree:
make menuconfig
make
make modules_install
cp -v System.map /boot/System.map-CUSTOM
cp -v arch/x86/boot/bzImage /boot/vmlinuz-CUSTOM
mkinitcpio -k 2.6.38-CUSTOM -g /boot/kernel-CUSTOM.img
and you need to add menu entry in /boot/grub/menu.lst
-k 2.6.38-CUSTOM should corespond to /lib/modules/2.6.38-CUSTOM (replace 2.6.38-CUSTOM with the name of your module directory, name depends on the kernel version and suffix that you gave in menuconfig). Regarding kernel configuration in menuconfig - I can't help you, you could use arch stock kernel config (zcat /proc/config.gz > /usr/src/linux-whatever/.config)
I do these kind of things this way - maybe someone else have a more elegant solution.

Similar Messages

  • [SOLVED]How to patch a kernel using PKGBUILD

    Hello guys,
    Sorry if my question looks stupid but I'm trying to compile my first kernel following this wiki page and I wonder how to apply a patchset...
    The patchset to apply is the ck one and I've downloaded the patch file from http://ck.kolivas.org/patches/3.0/3.3/3 … .3-ck1.bz2 and placed the patch itself at the root of my PKGBUILD folder.
    At my first attempt to run makepkg, I could see several 'found xxx.patch' (the other patches which were already in the abs tree) but not my ck patch.
    After taking a look in my PKGBUILD file I modified the source instruction as follow to include my pach:
    source=("http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.3.tar.xz"
            "http://www.kernel.org/pub/linux/kernel/ … pkgver}.xz"
            # the main kernel config files
            'config' 'config.x86_64'
            # standard config files for mkinitcpio ramdisk
            "${pkgname}.preset"
            'fix-acerhdf-1810T-bios.patch'
            'change-default-console-loglevel.patch'
            'i915-fix-ghost-tv-output.patch'
            'ext4-options.patch'
        'patch-3.3-ck1')
    Now when I run makepkg, it founds my patch but right after I get  a md5 cheksum error:
    -> Found config
    -> Found config.x86_64
    -> Found linux-custom.preset
    -> Found fix-acerhdf-1810T-bios.patch
    -> Found change-default-console-loglevel.patch
    -> Found i915-fix-ghost-tv-output.patch
    -> Found ext4-options.patch
    -> Found patch-3.3-ck1
    ==> ERROR: Integrity checks (md5) differ in size from the source array.
    [sclarckone@archLaptop linux]$
    I could disable the checksum in makepkg.conf but maybe I'm doing it wrong so I'd like to know the clean way to do it ;-)
    Thanks for your help.
    Last edited by sclarckone (2012-04-18 19:42:01)

    makepkg -g >> PKGBUILD will do this automatically for ya.  FYI, there is a linux-ck package in the AUR you can use as a model if you wish.

  • [SOLVED]How to load the kernel?

    Hi all
    First I should say that I found the same as my question in the internet bot there were no answer can solve my problem too.
    I just installed my Arch on my new laptop and I can say I am new.
    after all installations and reboot I have grub menu but when I want to boot I face with below error
    "error no such device" ad4103....."
    "loading linux core repo kernel"
    "error: no such partition"
    "loading initial ramdisk"
    "error: you need to load the kernel first"
    I have no access to command line but grub command line.
    How can I get rid of this error?
    Last edited by qaderzade (2014-12-12 18:57:28)

    uh...post your fstab as well as your bootloader configuration. I believe your initramfs is loaded from /boot - if you have that on a separate partition you need to make sure that a) it's specified correctly with the correct device name or UUID in fstab and that b) grub picked up the correct location of your initramfs and kernel when running grub-mkconfig (I'm assuming you did run grub-mkconfig before rebooting). Hopefully I'm not too off base here, but your problem lies somewhere in that area.

  • How to access the jpanel and other components on click of a button

    hi ,
    need help,how to access the components of a frame onclick of a button ,if the actionPerformed() is written in a seperate class.
    in my code
    button.addActionListener(new Xyz());
    Xyz is implementing the ActionListener.
    in actionPerformed() i want to access the components in the frame.
    thanks.

    public class Xyz implements ActionListener{
      JFrame frame;
      Component[] comps;
      public Xyz(JFrame f){
        frame = f;
        comps = frame.getContentPane().getComponents();
      public void actionPerformed(ActionEvent e){
        // access elements in comps array
    button.addActionListener(new Xyz(this)); // if 'this' is a JFrame in question

  • [SOLVED] How do I patch the kernel?

    EDIT (again): Doesn't seem like the patch is needed anymore. 3.3.1 kernel from the repos seems identical to my custom kernel (also 3.3.1).
    EDIT: The patches are for an older kernel but I was able to apply them manually.
    Hello. I'm trying to patch the kernel using the patch found on this page: http://lists.freedesktop.org/archives/i … 09584.html
    Now, I don't know much about patching but the patch in that post looks more like the program output of several diff commands. How do I format this to create a valid .patch file?
    Last edited by Splooshie123 (2012-04-10 04:52:40)

    To get back to my original question, making a patch out of what was in that mailing list post:
    Does this look ok?
    drivers/gpu/drm/i915/i915_drv.c | 4 ++++
    drivers/gpu/drm/i915/i915_drv.h | 1 +
    drivers/gpu/drm/i915/intel_display.c | 34 +++++++++++++++++++++-------------
    3 files changed, 26 insertions(+), 13 deletions(-)
    diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
    index 004880aa3a948669b8b4e23d9ad73d132cff81d0..1d88f059a27321ecb681e2b7927bb69029fcb49a 100644
    --- a/drivers/gpu/drm/i915/i915_drv.c
    +++ b/drivers/gpu/drm/i915/i915_drv.c
    @@ -49,6 +49,10 @@ module_param_named(powersave, i915_powersave, int, 0600);
    unsigned int i915_lvds_fixed = 1;
    module_param_named(lvds_fixed, i915_lvds_fixed, int, 0600);
    +unsigned int i915_lvds_channels = 0;
    +module_param_named(lvds_channels, i915_lvds_channels, int, 0600);
    +MODULE_PARM_DESC(lvds_channels, "LVDS channels in use: 0=(default) probe hardware 1=single 2=dual");
    +
    unsigned int i915_lvds_downclock = 0;
    module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
    diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
    index 3fa8681459aa596e12e885568e5b48f0c9a60719..a6aab43e5f39f2d5b92a69a284bf8f72a254ea7c 100644
    --- a/drivers/gpu/drm/i915/i915_drv.h
    +++ b/drivers/gpu/drm/i915/i915_drv.h
    @@ -886,6 +886,7 @@ extern int i915_max_ioctl;
    extern unsigned int i915_fbpercrtc;
    extern unsigned int i915_powersave;
    extern unsigned int i915_lvds_fixed;
    +extern unsigned int i915_lvds_channels;
    extern unsigned int i915_lvds_downclock;
    extern unsigned int i915_lvds_24bit;
    diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
    index 09f57f29c30c371c213944be473090a780a287db..4dc91400edd8935be45a229cf91292339bca0ce8 100644
    --- a/drivers/gpu/drm/i915/intel_display.c
    +++ b/drivers/gpu/drm/i915/intel_display.c
    @@ -642,6 +642,20 @@ static const intel_limit_t intel_limits_ironlake_display_port = {
    .find_pll = intel_find_pll_ironlake_dp,
    +static int intel_is_dual_channel_mode(struct drm_crtc *crtc)
    +{
    + struct drm_device *dev = crtc->dev;
    + struct drm_i915_private *dev_priv = dev->dev_private;
    + if (i915_lvds_channels) {
    + /* User has specified desired channel mode */
    + return (i915_lvds_channels == 2);
    + }
    +
    + /* User has not specified mode so let's see
    + what the hardware is doing. */
    + return ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP);
    +}
    +
    static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
    struct drm_device *dev = crtc->dev;
    @@ -653,8 +667,7 @@ static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
    if (dev_priv->lvds_use_ssc && dev_priv->lvds_ssc_freq == 100)
    refclk = 100;
    - if ((I915_READ(PCH_LVDS) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP) {
    + if (intel_is_dual_channel_mode(crtc)) {
    /* LVDS dual channel */
    if (refclk == 100)
    limit = &intel_limits_ironlake_dual_lvds_100m;
    @@ -677,18 +690,16 @@ static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
    static const intel_limit_t *intel_g4x_limit(struct drm_crtc *crtc)
    - struct drm_device *dev = crtc->dev;
    - struct drm_i915_private *dev_priv = dev->dev_private;
    const intel_limit_t *limit;
    if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
    - if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP)
    + if (intel_is_dual_channel_mode(crtc)) {
    /* LVDS with dual channel */
    limit = &intel_limits_g4x_dual_channel_lvds;
    - else
    - /* LVDS with dual channel */
    + } else {
    + /* LVDS with single channel */
    limit = &intel_limits_g4x_single_channel_lvds;
    + }
    } else if (intel_pipe_has_type(crtc, INTEL_OUTPUT_HDMI) ||
    intel_pipe_has_type(crtc, INTEL_OUTPUT_ANALOG)) {
    limit = &intel_limits_g4x_hdmi;
    @@ -821,8 +832,7 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    * reliably set up different single/dual channel state, if we
    * even can.
    - if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP)
    + if (intel_is_dual_channel_mode(crtc))
    clock.p2 = limit->p2.p2_fast;
    else
    clock.p2 = limit->p2.p2_slow;
    @@ -871,7 +881,6 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    int target, int refclk, intel_clock_t *best_clock)
    struct drm_device *dev = crtc->dev;
    - struct drm_i915_private *dev_priv = dev->dev_private;
    intel_clock_t clock;
    int max_n;
    bool found;
    @@ -886,8 +895,7 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
    lvds_reg = PCH_LVDS;
    else
    lvds_reg = LVDS;
    - if ((I915_READ(lvds_reg) & LVDS_CLKB_POWER_MASK) ==
    - LVDS_CLKB_POWER_UP)
    + if (intel_is_dual_channel_mode(crtc))
    clock.p2 = limit->p2.p2_fast;
    else
    clock.p2 = limit->p2.p2_slow;

  • How could i get the kernel and user cpu usage for each process

    Hi all,
    In order to monitor the system CPU usage, I would like write a script to gather the kernel and user CPU usage for each process, like the prstat or top does. As always missing the shortlived kernel usage, prstat or top cann't get the precise CPU usage. I checked with the dtrace syscall, proc and fbt provider, but don't get which one is useful.
    Please provide your comments and suggestion.
    Thanks in adv

    mail2sleepy wrote:
    As I've studied the "dtrace" for a while, and seems Sun gives a pretty high score on this new feature.....I do want to know whether there's some probe can work for it, like writing a "dtrace" version prstat.You can write a prstat without dtrace. Because that's just polling at specific intervals and reading some process structures from /proc. You could have dtrace fire a probe every 5 seconds and read the same thing, but it wouldn't really be using any features of dtrace. Trhying to write it "in dtrace" doesn't make much sense.
    What you could do that would be harder via other methods is to fire a probe at process exit that displayed the process information including total CPU time. They could print exactly when processes exited. Doing that without dtrace would be very difficult.
    Darren

  • How to backup all my Firefox "Options", not the bookmarks and other stuff.

    Under Tools, Options there are lot of settings that are lost when I have to reinstall. How to backup all my Firefox "Options", not the bookmarks and other stuff.

    Hi, please see [[Profiles - Where Firefox stores your bookmarks, passwords and other user data]].
    Also - [[Uninstall Firefox from your computer]].
    Hope that helps.

  • HT3986 I installed windows 7 successfull, but when I start the mac in windows I does not see the wifi, and others things. How do I get the drivers?

    I installed windows 7 successfull, but when I start the mac in windows I does not see the wifi, and others things. How do I get the drivers?
    I remember that with Snow Leopard you could download them from the Apple website.
    Cheers!

    Read the Boot Camp Documentation while you run Boot Camp Assistant to download the Windows Support Software which was the first step in the Boot Camp Setup procedure.

  • I am playing in Pogo and cannot open the games even though the homepage and others will open. The message is THE CONNECTION WAS RESET WHILE THE PAGE WAS LOADING. How do I fix this???

    I am playing in Pogo and cannot open the games even though the homepage and others will open. The message is THE CONNECTION WAS RESET WHILE THE PAGE WAS LOADING.
    All my friends are playing and it seems I am the only one have this problem.

    The "The connection was reset" error message can be caused by a bug fix for the BEAST (Browser Exploit Against SSL/TLS) attack that the server doesn't handle.
    *[[/questions/918127]]
    *[[/questions/918028]]

  • How to fix the mouse and keyboard freezing when installing Windows 7 on 27' iMac late 2013?

    Hi, I have a question for u guys who can solve this.
    I recently bought the new 27' iMac late 2013, and I installed some softwares and used it for few days.
    Before I bought this I used the 15' Macbook Pro Retina, I installed Windows 7 Home Premium 64 bit, and I used the Windows for gaming.
    So back to my question.
    So I bought the new iMac and I was tying to install Windows 7 Home Premium 64 bit (with the same CD).
    After dividing the partition, and other stuff, the iMac rebooted and I hold down the option (alt) key. I choose the Windows CD, and it said it is "getting ready to install Windows". I let it load, and the blue screen where you choose the language, time/location and keyboard input popped up. At the bottom right corner (at the same page), there is a button that said "Next (N)" which u need to click it to go to the next step. I was moving my mouse to click the button, but I realized that my mouse and keyboard was frozen. I tried both wireless and wired mouse and keyboard but they didn't work. There was nothing I could do. I hold the power button, (that was the only option) and tried my mouse and keyboard on Mac OS and it worked fine.
    I thought something went wrong in the CD so I bought the Windows 7 Ultimate 64 bit. The result was same. It frizzed again. (I just wast few hundred $)
    Latter my friend lend me his Windows 8.1 Pro 64 bit. I tried it, and it worked, it didn't freezed on Windows 8.
    The problem is I played Battlefield 4, Titan fall, and Watch Dogs, and Battlefield 4 multiplayer doesn't work on Windows 8.1. Even though when it works on Windows 8, I prefer using Windows 7.
    Dose anyone knows how to fix this freezing thing?
    My computer is:
    27' iMac late 2013 (bought it just few days ago)
    I did no upgrades when I bought it, except the graphic card.
    I bought the iMac in Korean Apple Store, and my Windows CD is in Korean, can that be a problem?
    Please leave a comment when u think u can solve my problem.

    See -> http://manuals.info.apple.com/MANUALS/1000/MA1636/en_US/boot_camp_install-setup_ 10.8.pdf.
    In addition to the Windows disc (or USB flash drive with the Windows installer) you'll need a 8GB+ flash drive.
    The referenced manual - on page 3, I think, gives you a run-down of what you'll need before you begin the installation. You may also want to post any further Boot Camp questions in the Boot Camp forum -> https://discussions.apple.com/community/windows_software/boot_camp.
    Good luck,
    Clinton

  • How to read the date and time information of a file by labview

    how to read the date and time information of a file by labview? for example, created time and modified time.
    Solved!
    Go to Solution.

    if you need to know the last modification date of file:-
    "Functions->File I/O->Advanced File Functions->File/Directory Info.vi"
    This vi returns the value of file's last modification date. This is returned as U32 number. To see it in MM/DD/YY format you must create the indicator, right-click on it and select "Format & Precision" item from drop-down menu. Then select "Time and Date" format there.
    Thanks as kudos only

  • Permission problem when trying to patch the kernel

    Hello, my name is Rodrigo and I have a VAIO laptop. The problem with it is that it has soo many privative components that are very hard to get to work under Linux. Fortunately, I found a project http://code.google.com/p/vaio-f11-linux/, which aims to provide full suport to VAIOs in Linux.
    In order to do this I had to patch the Kernel http://code.google.com/p/vaio-f11-linux … nelSupport
    So I started to follow the instructions.
    1) I downloaded from kernel.org the lastest stable release (2.6.39)
    2) I made cd /usr/src/linux and unpacked the tar contnents from the kernel file into this directory
    3) I made "sudo curl http://www.absence.it/vaio-acpi/source/ … 6.39.patch | patch p1" and I got this:
    patching file include/linux/sonypi.h
    patch: **** Can't rename file /tmp/poSN3DW6 to include/linux/sonypi.h : Permission denied
    I don't know if I'm the problem or if the patch is "bad".I already submitted the problem to the Issues page from the project, but maybe I made something wrong, any help would be apreciated
    Rodrigo

    I don't think sudo was meant for strange things like downloading a patch and then piping it into the patch command. If you want that to work, you should either run "su" to make sure you are root beforehand, or split up the commands like so:
    sudo curl http://www.absence.it/vaio-acpi/source/patches/vaio-2.6.39.patch >vaio-2.6.39.patch
    sudo patch p1 <vaio-2.6.39.patch
    The generic instructions for using this patch will probably work but it will be cleaner if you look at the wiki page for Arch's take on custom kernels.
    Last edited by ConnorBehan (2011-05-25 03:15:06)

  • How to view the first and the last frame of a clip or a selected range in the time line?

    How to view the first and the last frame of a clip directly or in a selected range in the time line ? Up arrow and down arrow keys changes only between the first frame of the consecutive clips. Even ; and ' does the same. I mean what is the shortcut keys for first to last and last to first frame of a clip? Help please.

    SELECT PurOrderNum,
    OrderDate
    FROM
    SELECT PurOrderNum,
    OrderDate,
    MAX(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MaxDate,
    MIN(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MinDate
    FROM Purchasing.PurOrder
    WHERE OrderDate >= '2013-02-28'
    AND OrderDate <= '2014-12-29'
    )t
    WHERE OrderDate = MaxDate
    OR OrderDate = MinDate
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to get the lock and block occured for the full day

    Hi,
         How to monitor the lock and blocks occurred for the full day? i need to get it by end of the day. is there any script for this?

    Hi,
         How to monitor the lock and blocks occurred for the full day? i need to get it by end of the day. is there any script for this?
    Why would you like to collect information about locks and let me tell you, you cannot collect information about ALL locks which were taken and even thinking about it is pointless.
    Coming to blocking if you have heavy system with huge concurrency there is bound to be blocking which is necessary and good for RDBMS but if the blocking remains for long time then this is a issue.
    There is DMV sys.dm_tran_locks which tell you what all locks are being taken. You can see various examples mentioned in DMV online documentation and can schedule the query to run every 5
    mins and insert its record in table which you can refer at end of the day.
    This task would be made very easy if you have Monitoring tool which gives you information in your mail every time blocking occurs I have Spotlight in my environment.
    If you are looking for doc for troubleshooting blocking  below is one you can refer
    http://support.microsoft.com/kb/224453
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • How to know the balance and validity of internet data in iPad

    How to know the balance and validity of internet data in iPad?

    Sir I m using internet in ipad4 with airtel network
    They provide me 2gb data with the amount of 255 rupees
    And now I inserted the sim in my ipad4
    And start the surfing on safari n all
    And now I wanted to know how much data is balance.

Maybe you are looking for

  • Saving a file from km in filesystem

    I would like to catch an archive of the repositorio km and to record in a folder of my server. How I can make this?

  • After updating to 10.6.1 issues burning cds

    Since latest iTunes update I am getting error messages or cd burs and first two tracks are fine and the rest are scratchy or don't play at all. Having no problems when using windows media player to burn so not my burner.  Have slowed speed to 2x, eli

  • Print layout design (PLD) - Incoming Payment

    Hi All, Under incoming payment, can i have the details in terms of line by line? Somehow rather, the design that was produced by the 'system', they details of my payment is gather together in one box. How can i have it to be line by line? It looks mo

  • IPhoto messed up my photos. How do I get them back?

    I inserted my SD card and it imported half and the other half turned out to be blank. This has happened with other photos from over a year ago, I just went back to go look through them all and they are ALL blank square blocks....WHERE ARE MY PICTURES

  • Copying date-specific files

    I have a laptop with dual hdd's, which I need to reimage the system (primary hdd). On this primary hdd contains a folder with approx 60GB of data. I would like to copy onto the secondary hdd only the files created/modified within the last month. What