TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 14 of 14

Thread: PAE Windows kernel patch

  1. #1
    Member
    Registered: Sep 2007
    Location: Campo, CA

    PAE Windows kernel patch

    Does anyone have any experience with software that overcomes memory limitations in Windows 7? I'm particularly interested in the PAE Windows kernel patch by Wen Jia Liu.

    Here is an article about it: https://www.techrepublic.com/blog/wi...ws-81-systems/

    Here is the author's page: https://wj32.org/wp/2011/02/23/pae-p...windows-7-sp1/

    Can any of you more plugged-in types tell me why this would or wouldn't work and what could go wrong? Also, if anyone has any info on the legality of changing PAE limitations, I'd be interested in that too.

  2. #2
    Moderator and Priest
    Registered: Mar 2002
    Location: Dinosaur Ladies of the Night
    The most probable worst case scenario would just be a borked Windows installation, though considering you're trying to push more than 4GB hard limit in a 32-bit based machine, there are some questions about your hardware, what kind of RAM you're using, and whether you're mixing and matching different types of RAM that should be addressed.

    As for the legality of it all, it may void your warranty, but it's otherwise perfectly kosher.

  3. #3
    Member
    Registered: Sep 2007
    Location: Campo, CA
    Thank you Renzatic! I kind of suspected it wasn't outright illegal because Microsoft is noticeably silent on the subject. And it offers no explanation (that I could find) for placing that limit on the 32-bit machine. I have stayed strictly away from mixing memory sticks, and have cloned my original system to a SSD, so I am reasonably safe from the permanent affects of a bork-up. (-:

    I'm leaning toward trying it unless someone can see a reason that it wouldn't work on my system. Per Speccy:

    Windows 7 Home Premium 32-bit SP1
    CPU
    Intel Pentium D 945
    Presler 65nm Technology
    RAM
    8.00GB DDR2
    Motherboard
    Dell Inc. 0RF703 (Microprocessor)
    Graphics
    EA193Mi (1152x864@75Hz)
    Intel Q965/Q963 Express Chipset Family (Dell)
    Intel Q965/Q963 Express Chipset Family (Dell)
    511MB NVIDIA GeForce GT 430 (ZOTAC International) 36 C
    ForceWare version: 391.35
    SLI Disabled
    Storage
    931GB Samsung SSD 860 QVO 1TB ATA Device (SATA (SSD)) 33 C
    1862GB Western Digital WD easystore 25FC USB Device (USB (SATA) ) 28 C
    Optical Drives
    ATAPI DVD A DH24AAS ATA Device
    Audio
    SoundMAX Integrated Digital HD Audio Driver

    Here is the memory information:

    Memory slots
    Total memory slots 4
    Used memory slots 4
    Free memory slots 0
    Memory
    Type DDR2
    Size 8192 MBytes
    Physical Memory
    Memory Usage 61 %
    Total Physical 2.99 GB
    Available Physical 1.16 GB
    Total Virtual 5.98 GB
    Available Virtual 3.76 GB
    SPD
    Number Of SPD Modules 4
    Slot #1
    Type DDR2
    Size 2048 MBytes
    Manufacturer Micron Technology
    Max Bandwidth PC2-5300 (333 MHz)
    Part Number 16HTF25664AY-667G1
    Serial Number 3912894968
    Week/year 16 / 10
    Timing table
    Frequency CAS# Latency RAS# To CAS# RAS# Precharge tRAS tRC Voltage
    JEDEC #1 200.0 MHz 3.0 3 3 9 12 1.800 V
    JEDEC #2 266.7 MHz 4.0 4 4 12 16 1.800 V
    JEDEC #3 333.3 MHz 5.0 5 5 15 20 1.800 V
    Slot #2
    Type DDR2
    Size 2048 MBytes
    Manufacturer Micron Technology
    Max Bandwidth PC2-5300 (333 MHz)
    Part Number 16HTF25664AY-667G1
    Serial Number 3747461631
    Week/year 10 / 10
    Timing table
    Frequency CAS# Latency RAS# To CAS# RAS# Precharge tRAS tRC Voltage
    JEDEC #1 200.0 MHz 3.0 3 3 9 12 1.800 V
    JEDEC #2 266.7 MHz 4.0 4 4 12 16 1.800 V
    JEDEC #3 333.3 MHz 5.0 5 5 15 20 1.800 V
    Slot #3
    Type DDR2
    Size 2048 MBytes
    Manufacturer Micron Technology
    Max Bandwidth PC2-5300 (333 MHz)
    Part Number 16HTF25664AZ-667H1
    Serial Number 3781733885
    Week/year 52 / 10
    Timing table
    Frequency CAS# Latency RAS# To CAS# RAS# Precharge tRAS tRC Voltage
    JEDEC #1 200.0 MHz 3.0 3 3 9 12 1.800 V
    JEDEC #2 266.7 MHz 4.0 4 4 12 16 1.800 V
    JEDEC #3 333.3 MHz 5.0 5 5 15 20 1.800 V
    Slot #4
    Type DDR2
    Size 2048 MBytes
    Manufacturer Micron Technology
    Max Bandwidth PC2-5300 (333 MHz)
    Part Number 16HTF25664AZ-667H1
    Serial Number 3781733886
    Week/year 52 / 10
    Timing table
    Frequency CAS# Latency RAS# To CAS# RAS# Precharge tRAS tRC Voltage
    JEDEC #1 200.0 MHz 3.0 3 3 9 12 1.800 V
    JEDEC #2 266.7 MHz 4.0 4 4 12 16 1.800 V
    JEDEC #3 333.3 MHz 5.0 5 5 15 20 1.800 V

  4. #4
    Member
    Registered: Nov 1999
    Location: Deck 4 Cargo Bays
    I would think that unless you're trying to run tons of processes (like a server), PAE won't do you much good on a 32-bit system, since all apps will still be stuck with a 2GB memory cap. Your CPU seems to support 64-bit operation, so why not just switch to 64-bit W7?

  5. #5
    Moderator and Priest
    Registered: Mar 2002
    Location: Dinosaur Ladies of the Night
    It looks like you're using two oh so very slightly different sets of 2x2GB RAM sticks, which usually isn't recommended, but since your timings look identical between the two, it shouldn't give you any issues.

    I'd say you're pretty well set up. Back up all your important data, and give it a go. If it acts flaky, then roll it all back. Though really, your best bet is just to grab a 64-bit copy of Windows 7, since your processor can support it.

  6. #6
    Member
    Registered: Sep 2007
    Location: Campo, CA
    Quote Originally Posted by Microwave Oven View Post
    I would think that unless you're trying to run tons of processes (like a server), PAE won't do you much good on a 32-bit system, since all apps will still be stuck with a 2GB memory cap. Your CPU seems to support 64-bit operation, so why not just switch to 64-bit W7?
    So, you're saying that my old games -- which have grown in their memory needs with fan missions and the like -- will not be able to access the memory I make available? What would cause that?

  7. #7
    Moderator and Priest
    Registered: Mar 2002
    Location: Dinosaur Ladies of the Night
    It depends on what environment you're running your app, and whether it's large address aware or not. I'm kinda vague on some of the finer details since it's been about a decade that I last had to think about this stuff, but from what I remember, 32-bit apps on a 32-bit OS can only address 2GB memory. On a 64-bit OS, 32-bit apps can address the full 4GB gamut provided they're large address aware. If they're not, they're still bound to 2GB.

  8. #8
    Member
    Registered: Sep 2007
    Location: Campo, CA
    Well, I'm going to give it a try. I may end up paying for a 64-bit W7 yet, but I'm going to fool with this first ... just because it's interesting. I will report back, even if it's a fail. Just for the sake of increasing the knowledge pool.

  9. #9
    Moderator and Priest
    Registered: Mar 2002
    Location: Dinosaur Ladies of the Night
    Best of luck!

    If you do end up going the 64-bit OS route, I'm pretty sure you can use your current keycode to activate a 64-bit copy of Windows 7. Pretty being the operative word here.

  10. #10
    Zombified
    Registered: Sep 2004
    generally, PAE is not really worth the hassle, unless you are in a very, very specific situation (cannot leave the 32bit environment, tons of processes, doesn't matter that each is still limited). and yes, bitness (now that's a nice word), doesn't play a role, if you have a valid windows7 key, it will work for both 32 and 64 bit builds of whatever edition you have (so if you have win7 home, you can grab a 32bit or 64bit iso of home, install, use your key and it will be fine, I've actually verified this with ms support some time ago, so I'm sure).

  11. #11
    Member
    Registered: Sep 2007
    Location: Campo, CA
    My report: I did this, per the readme instructions (pasted below) and got an error message on the command for ntkrnlpx.exe. I tried a couple of times with the same result.

    On boot-up, it gave the Windows boot screen with the two selections expected.

    Windows 7
    Windows (PAE patched)

    If I choose Windows 7, it boots normally into the original installation. If I choose the patched version, it goes to an error screen saying that windows couldn't start due to a recent hardware or software change. It lists particulars as follows:

    File: \Windows\System32\ntkrnlpx.exe
    Status: 0xc0000428
    Info: Windows cannot verify the digital signature for this file

    It hasn't harmed the computer and all software works as it should. But I've reached the limit of my skill set. Any thoughts?

    Readme instructions:

    PatchPae (v2) by wj32.
    Tested on: Windows Vista SP2, Windows 7 SP0, Windows 7 SP1, Windows 8, Windows 8.1, Windows 10 (build 10586)

    == Installation ==
    1. Open an elevated Command Prompt window.

    2. cd C:\Windows\system32.
    Make sure the current directory is in fact system32.

    [[ For Windows 8, Windows 8.1 and Windows 10: ]]
    3. C:\WherePatchPaeIs\PatchPae2.exe -type kernel -o ntoskrnx.exe ntoskrnl.exe
    This will patch the kernel to enable a maximum of 128GB of RAM.
    [[ For Windows Vista and Windows 7: ]]
    3. C:\WherePatchPaeIs\PatchPae2.exe -type kernel -o ntkrnlpx.exe ntkrnlpa.exe
    This will patch the kernel to enable a maximum of 128GB of RAM.

    4. C:\WherePatchPaeIs\PatchPae2.exe -type loader -o winloadp.exe winload.exe

    C:\Windows\System32\PatchPae2.exe -type loader -o winloadp.exe winload.exe

    This will patch the loader to disable signature verification.

    5. bcdedit /copy {current} /d "Windows (PAE Patched)"
    This will create a new boot entry. A message should appear:
    The entry was successfully copied to {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.
    e5666237-edf4-11e9-8678-0019b91c1557

    [[ For Windows 8, Windows 8.1 and Windows 10: ]]
    6. bcdedit /set {e5666237-edf4-11e9-8678-0019b91c1557} kernel ntoskrnx.exe
    This will set our boot entry to load our patched kernel.
    [[ For Windows Vista and Windows 7: ]]
    6. bcdedit /set {e5666237-edf4-11e9-8678-0019b91c1557} kernel ntkrnlpx.exe
    This will set our boot entry to load our patched kernel.

    7. bcdedit /set {e5666237-edf4-11e9-8678-0019b91c1557} path \Windows\system32\winloadp.exe
    This will set our loader to be our patched loader.

    8. bcdedit /set {e5666237-edf4-11e9-8678-0019b91c1557} nointegritychecks 1
    This will disable verification of the loader.

    9. bcdedit /set {bootmgr} default {e5666237-edf4-11e9-8678-0019b91c1557}
    This will set our boot entry to be the default.

    10. bcdedit /set {bootmgr} timeout 2
    This will set the timeout to be shorter.
    Note: you can change this timeout to whatever you like.

    11. Restart the computer and enjoy.

    == Removal ==
    To remove the patch:
    * Run msconfig, click Boot, highlight the entry named "Windows (PAE Patched)", and click Delete.
    * Delete the files ntoskrnx.exe (or ntkrnlpx.exe) and winloadp.exe from C:\Windows\system32.

    == Updates ==
    When Windows Update installs new updates on your computer, you should run Step 3 again to ensure
    that you have the latest version of the kernel.

    == Compiling ==
    To compile PatchPae2, you need to get Process Hacker and build it.
    The directory structure should look like this:
    * ...\ProcessHacker2\lib\...
    * ...\ProcessHacker2\phlib\...
    * ...\src\PatchPae2.sln

  12. #12
    Moderator and Priest
    Registered: Mar 2002
    Location: Dinosaur Ladies of the Night
    On a random stab at a guess, it looks like the patch to disable driver signature verification didn't take. Run through that step of the process again, and see it it makes any difference.

    Though I still say that just grabbing a 64-bit iso, and reinstalling Windows is your best bet. What you're doing now is a depreciated, unofficial patch for people who don't have any other choice if they want access to more than 4GB RAM on their PCs. You do have another choice, so there's no reason to go the PAE route other than just doing it to do it.

    Sure, backing up your data, and reinstalling Windows is a good bit more work on the front end, but you get all the advantages of proper, full 64-bit Windows, and less chances of things possibly fucking up down the road.

  13. #13
    LittleFlower
    Registered: Jul 2001
    Location: Netherlands
    Quote Originally Posted by Old and Cunning View Post
    Can any of you more plugged-in types tell me why this would or wouldn't work and what could go wrong? Also, if anyone has any info on the legality of changing PAE limitations, I'd be interested in that too.
    It might have been better if you had told us what problem you want to solve exactly.
    If the answer was gonna be: "duh, I just want to use all the 8GB of RAM in my PC !", then I would suggest you just install a 64-bit OS. That would the better solution in 98% of cases anyway. PAE is not just gonna "make your PC faster" in general.

    What you don't seem to realize is that the 4GB or 2GB speed is not a random limitation imposed by Microsoft. That would be like saying: "my ISP sucks, I have high ping because my ISP limits the speed of light to 300k km/sec". The limitation is because of math.

    Can you count in binary ? 0 = 0 in decimal. 1 = 1 in decimal. 10 = 2 in decimal, 11 = 3 in decimal, 100 = 4 in decimal, 101 = 5, 110 = 6, 111 = 7, 1000 is 8. Etc, etc. So if you have 1 bit, you can count 0 or 1. You can basically count from 0 to (2 - 1). With 2 bits, you can count from 0 to (4 -1). With 3 bits you can count from 0 to 8 - 1. You can do the match yourself: 4 bits -> 15, 5 bits -> 31, 6 bits -> 63, 7 bits -> 127, 8 bits allows you to count between 0 and 255.

    8 Bits is something special in today's computers. 8 Bits is a byte. So if you have 8GB of RAM, that means you have enough memory to store ~8 billion bytes. 8 Billion of those values between 0-255. Every one of those memory locations has an "address". An address is just a number that indicates which byte we're talking about. The first byte in your PC has address 0. The 2nd byte has address 1, the 3rd byte has address 2. Etc, etc.

    Of course computers can do math with larger values than 255. But to do so, they can not store those values in a byte. They need to take a few bytes together to store larger values. So if they take 2 bytes together, you have 16 bits, and you can count to 2^16 - 1. That's roughly 64K (65525 to be precise). If you grab 4 bytes to store a number, you can store numbers up to 2^32 - 1. That's roughly 4 billion. If you grab 8 bytes, you can store really large numbers (4 billion * 4 billion).

    A 32-bit machine means that the CPU is capable of working with memory address stored in values of 32-bits. That means the computer can store values up to 4 billion. This is also true for memory addresses. So the first 4 GB in your PC all get a unique address. But if you put in more RAM in your PC, there are no memory locations left to assign. And there is really nothing you can do. Or that the OS can do. Or that Microsoft can do. If memory can not be addressed, it can not be used. Simple.

    Because of historical reason, some programs used to use one bit in memory addresses for something special. The sign-bit. That indicates whether a value is positive or negative. It doesn't make sense to use negative addresses, but people used to do that in the past anyway. So to be safe, Microsoft decided to enforce the rule that addresses could only be 31-bits, and that one of the bits was always ignored. That means address could only be up to 2^31 - 1. That's enough to address 2GB. But not more. That is where the limitation comes from that in Windows programs can only use 2GB.

    Now if you are 100% sure that a program is not using that sign-bit in weird ways, then you could use it as a normal bit for addresses. But you have to be sure. In that case, you can set a special bit, the LAA-bit in the executable (the program's file on disk, aka the .exe). When Windows starts such a program, and sees the LAA-bit set in the executable, Windows will allow programs to allocate more than 2GB. But still not larger than 4GB. Because programs would not be able to fit address in their 32-bit address variables. FYI, variables that hold addresses are called pointers.

    Now Microsoft came up with another trick. That's PAE. The OS was recompiled by Microsoft to make larger pointers. 64-Bit pointers. Or 36-bit pointers or something (I don't know the details. They are hidden inside Windows). That means that Windows itself could use larger address (36 bits would allow for addresses for up to 64 GB). But the programs you run have not been changed. So those programs would still only be able to use 2GB (without LAA) or 4GB (with LAA). What's the benefit then ? With 32-bit Windows without PAE, if you ran one program that used 4GB of memory, no other program would be able to use any more memory. But with PAE, you can have each program use up to 2GB or 4GB. So you could run 10 programs that each used 2GB. (Total usage of all programs still had to be under 64GB, I think).

    That's a very specific situation. A situation that gamers normally don't do. Usually you have 1 program (your game) that uses lots of memory. With or without PAE, that one program/game is always limited to 2GB (or 4GB with LAA). There's no benefit of running PAE at all for gamers.

    What is the risk of running PAE ? All parts of the OS need to be able to handle 36-bit addresses. Certainly the kernel and the drivers. Lots of drivers come from Microsoft. But some come for 3rd parties. Those drivers might not all be able to do 36-bit addresses. That can cause problems (programs crashing, or worse, your OS crashing (those will be a Blue Screen Of Death). That's why the PAE patch tries to replace some drivers with new versions. And that is what seems to go wrong in your setup.


    Anyway, bottomline is: if you are not going to run 2 or more programs simultaneously that needs lots of RAM (more than 4GB), then PAE is not gonna help you at all. I suspect you are not, so there's no benefit in PAE for you. I think you'd do yourself a favor by just upgrading to Windows 10 64-bit. Then your game can use all the RAM you got in your machine for itself.

    Hope this helps.
    Last edited by Gryzemuis; 11th Nov 2019 at 12:56.

  14. #14
    Member
    Registered: Apr 2002
    Location: Third grave from left.
    Correction: the OS is still 32 bit, only virtual memory handling is changed. Drivers and the rest of the OS live in high, run time fixed, 32 bit addresses (for cheaper transitions) and cannot care less about PAE or whatever. Apps run in the low addresses (2GB or if app is large address aware then up to 3GB or when the OS is also capable then nearly 4GB [ie. the fixed address stuff that needs to stay visible excluded. However, that address space is usually fairly Swish Cheese and hence often is of no use for the App]) - which can use any custom per process mapping (address -> actual memory) it wishes. PAE allows that mapping to address physical memory in 36 bit mode (that is an hardware level change - ie. no software is involved in the address translation. Software just needs to ask for this physical memory addressing mode and know to build the mappings accordingly - have not checked, but the translation entries, with virtual certainity, still stay 32 bit in hardware as doing otherwise would be rather retarded [ie. the bottom bits can never be anything but 0 anyway - all 12 bits for 4K page size. So you can map up to 32+12 bits of physical memory with 32 bit - that is 16TB. No consumer OS goes needs that.])

    Otherwise i agree PAE is bound to be completely useless for normal user. It is also useless for everyone else too - very-very specific cases excepted. It you do not already know that you are suffering from thous very exceptional cases - then it is virtually certain to be useless for you too.

    Summary:

    Apps use address space - not memory.
    PAE has no effect on address space.
    Programs built with Large Address Aware can use up to 3GB or close to 4GB of (the end being Swish Cheese) address space when OS is told to do so (default by newer patches / installs). Provided the high end non-continous address space is of any actual use to the app.

    Memory addressing is managed by the virtual memory manager of the OS and is invisible to other Apps/Drivers/Etc.
    PAE extends that memory addressing.
    It is useful when more than 4GB of physical memory is needed at the same time by all the running programs. This lessens paging of memory in and out of HDD/SSD. Since no App can ever exceed the 4GB address space limit with 32 bit OS then the contention must come from combination of MULTIPLE address space hungry apps as a single app cannot do that on its own. Ie. a game will still be stuck with 32 bit (swish cheese) address space - only 64 bit OS and 64 bit executable of the game can fix that.

Posting Permissions

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