0 of 0

File information

Last updated

Original upload

Created by

Jens Andree

Uploaded by

jensandree

Virus scan

Safe to use

Tags for this mod

124 comments

  1. jensandree
    jensandree
    • member
    • 3 kudos
    Sticky
    CDPR just announced that they're finally releasing a Cyberpunk2077.exe not compiled with AVX instructions!!!
    https://twitter.com/CDPRED_Support/status/1434824417151012866

    That took some time...

    Well, at least you were able to use my fix to get you playing until now.

    I'm going to diff the new binary with the old, and with my patched one to see how they solved it? (or more like how the compiler solved it?)
    Chances are that those who have experienced a speed increase after applying my patch won't retain that after choosing their new binary. Tests will show.

    In case the AVX crashes returns in future releases I'm ready to make another patch. Meanwhile if you still have AVX crashes and haven't applied my patch yet, I recommend that you pick the official solution from CDPR since that's the intended one. Let's hope it works...
    1. jensandree
      jensandree
      • member
      • 3 kudos
      Anyhow, thanks for those who helped me testing my patch and instructions!

      We made it possible for people to play Cyberpunk 2077 these weeks after the 1.3 release broke AVX (and SSE 4.2).
      Now I can play around fixing some other annoying bugs in the game - which there are plenty to choose from, but it's more fun to fix critical crashes because the payoff is so much greater, but it was fun whilst it lasted!

      Also thanks for all the positive feedback! This is why we make these mods for the community!

      Be well!

      Cheers,
      Jens

      EOT
    2. systemcan
      systemcan
      • member
      • 0 kudos
      Help me please  I did everthing you said Im getting patch OK!   and I still get flatlined error when I click play on steam or .exe  
    3. jensandree
      jensandree
      • member
      • 3 kudos
      systemcan You shouldn't use this patch if you got the CDPR 1.3 own AVX hotfix, or if you got the 1.31 patch released today.
      That will only break the game in random ways since the binary has changed.

      Please restore original 1.31 Cyberpunk2077.exe and launch the game again. If it crashes please post what error code you get so we can try to help you solve whatever issue you're having?!

      You should also remove any mods you have installed since odds are they're no longer working after the 1.31 patch...
    4. s4ulyatina
      s4ulyatina
      • member
      • 0 kudos
      I have an unoriginal version of cb 1.31, where can i get hotfix 1.3, phenom ii x6
    5. ShiiRLoXX
      ShiiRLoXX
      • member
      • 0 kudos
      I managed to make it work here is some more detailed instructions:

      1 - Download: CPAVXPatcher_v1-no-bin.zip from downloads section
      2 - Get the file Jen provided: https://politisktinkorrektpappa.com/media/hpatchz.zip and remove the .txt extension so it becomes an exe again.
      3 - Unzip the files in your game installation folder where Cyberpunk2077.exe is located.
      4 - Press ALT + F in the same folder where Cyberpunk2077.exe is located
      5 - Open Powershell as an administrator
      6 - Execute this command: powershell -ExecutionPolicy Bypass -File .\CPAVXPatcher_v1.ps1
      7 - If it works you will get a successful message on the screen.
      8 - Play the game.


      Wer Proleme mit der Powershell hat kann diese gerne für Admin ins Kontext bringen so startet die Powershell im Ordner selber. 
      newdoxument.txt 

      copy: 
      Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\shell\OpenElevatedPS]
      @="PowerShell als Administrator"
      "Icon"="powershell.exe"
      "HasLUAShield"=""

      [HKEY_CLASSES_ROOT\Directory\shell\OpenElevatedPS\command]
      @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/c,pushd %V && powershell' -Verb RunAs\""

      [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenElevatedPS]
      @="PowerShell als Administrator"
      "Icon"="powershell.exe"
      "HasLUAShield"=""

      [HKEY_CLASSES_ROOT\Directory\Background\shell\OpenElevatedPS\command]
      @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/c,pushd %V && powershell' -Verb RunAs\""

      [HKEY_CLASSES_ROOT\Drive\shell\OpenElevatedPS]
      @="PowerShell als Administrator"
      "Icon"="powershell.exe"
      "HasLUAShield"=""

      [HKEY_CLASSES_ROOT\Drive\shell\OpenElevatedPS\command]
      @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/c,pushd %V && powershell' -Verb RunAs\""

      [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenElevatedPS]
      @="PowerShell als Administrator"
      "Icon"="powershell.exe"
      "HasLUAShield"=""

      [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenElevatedPS\command]
      @="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/c,pushd %V && powershell' -Verb RunAs\""

      Edit .txt to >>> .reg

      Führt die .reg aus und bestätigt die Registry änderung. Voila Poweshell als Admin befindet sich im Kontextmenü (rechtsklick) 
      So konnte ich nach langen hin und her endlich den Befehl von -6 ausführen und es konnte erfolgreich gepatchd werden.- 


      btw step 4 is a useless step 
    6. zardarr777
      zardarr777
      • member
      • 0 kudos
      Ugh just doesn't work on my ancient pc lol...  but my V 1.2 version works ok random crashes still.  Ohh well its not like this game is so much better on a high end PC still buggy as hell.   I'm convinced it will never run test proven as GTA5 a ancient game at that.  
    7. ARCAD3BLOOD
      ARCAD3BLOOD
      • supporter
      • 0 kudos
      Hey... It seems we may need your mod again in 2.1 update...
      I noticed it uses way more cpu, and if I lower the ring clock, it slows down significantly, so there's probably some avx running.
      Plus a lot of people have similar problem as back then- crash on start.
  2. jensandree
    jensandree
    • member
    • 3 kudos
    Sticky
    EDIT:
    Some people are still having trouble reading/following the install instructions so I've updated the mod description and doc page.
    Please read through it before you begin patching the game and you shouldn't encounter any problems - and if you do, read the posts here because the answer is probably already answered, or if you can't find a solution make a new post and I'll help you!

    New version uploaded
    and this is a tool, script, patch and instructions on how to patch Cyberpunk2077.exe on your computer!

    BUT the tool hpatchz.exe got flagged with yet another false positive... sigh...

    There's no public Win32 build of HDiffPatch that I could find so I wanted to add it so you people don't have to build it just so you can patch.

    My previous attempt to contact mods to unflag the last file was unsuccessful, as in nobody got back to me.
    I'm doing another attempt but if one of you can contact a mod via Discord or similar I'd be grateful and it would speed up the process of getting everyone to play Cyberpunk again - which is why I haven't slept much the last three days!

    I'm uploading a zip file without the patch tool so you who fancy acquiring hpatchz.exe on your own can do so!
    (https://github.com/sisong/HDiffPatch - thank you LachlanStowe for the tip!)
    Also thank you gab16ers for sorting out the PowerShell script! Who needs UAC anyway... :P

    The file containing the hpatchz.exe is now approved as well so you don't have to sideload that from external site, but I'm keeping that route open regardless in case someone's browser/antivirus decides that exe files are dangerous and cannot be downloaded like this and deletes it...

    Many thanks in advance,
    Jens 
    1. Ael1692
      Ael1692
      • member
      • 1 kudos
      The file got flagged as a trojan probably a false positive can you upload to another site?
    2. Ael1692
      Ael1692
      • member
      • 1 kudos
      Hey Jens can you try to upload again the files that gave false positive but without the .exe file extension it might work seems this site doesn't like the .exe extension send the archive in a zip file too.
    3. YOEL44
      YOEL44
      • member
      • 2 kudos
      As a last resort you could try changing the extension and then explaining how to recover it, or wrapping it in a password protected zip/rar/7z...
    4. jensandree
      jensandree
      • member
      • 3 kudos
      You can download the file here: https://politisktinkorrektpappa.com/media/hpatchz.zip
      You have to rename it from hpatchz.exe.txt to hpatchz.exe but that should be pretty obvious...

      I hope this doesn't break any Nexus rules?!

      Anyhow, have fun!

      Cheers,
      Jens
    5. miXLian
      miXLian
      • member
      • 0 kudos
      thank you very much sir for this
    6. jensandree
      jensandree
      • member
      • 3 kudos
      You are very much welcome miXLian!
      Thank you for appreciating the work!  ??
    7. Ael1692
      Ael1692
      • member
      • 1 kudos
      I managed to make it work here is some more detailed instructions:

      1 - Download: CPAVXPatcher_v1-no-bin.zip from downloads section
      2 - Get the file Jen provided: https://politisktinkorrektpappa.com/media/hpatchz.zip and remove the .txt extension so it becomes an exe again.
      3 - Unzip the files in your game installation folder where Cyberpunk2077.exe is located.
      4 - Press ALT + F in the same folder where Cyberpunk2077.exe is located
      5 - Open Powershell as an administrator
      6 - Execute this command: powershell -ExecutionPolicy Bypass -File .\CPAVXPatcher_v1.ps1
      7 - If it works you will get a successful message on the screen.
      8 - Play the game.
    8. Ael1692
      Ael1692
      • member
      • 1 kudos
      Thanks again jensandree CDPR should hire you to fix game bugs lol.
    9. jensandree
      jensandree
      • member
      • 3 kudos
      Awesome post gab16ers!

      I'm not a Windows guy so writing my first PowerShell script I tried to keep is as simple as possible.
      If "-ExecutionPolicy Bypass" is required I'll add it to the instructions!
      Since I'm developing on all my computers I've tweaked UAC and other security features since they make life a hell just trying to compile simple binaries, let alone anything more complex, or signed vs. unsigned binaries.

      I think I understand why you added that so many thanks! I love community efforts and helping each other! 

      I'll update the texts here and call it for tonight.

      Cheers,
      Jens
    10. LachlanStowe
      LachlanStowe
      • member
      • 2 kudos
      So much good work and good will here in the comments, it's really heartwarming.
    11. Ael1692
      Ael1692
      • member
      • 1 kudos
      Hi jensandree thanks you can add my instructions if you want, the bypass command was needed because my computer was not letting me execute the powershell command without the "-ExecutionPolicy Bypass" since your computer is tweaked i think the majority of users will need this command too to make the patch work.

      Your mod is working perfectly so far with my testing so thanks again!
    12. VA9606
      VA9606
      • member
      • 0 kudos
      Thanks jensandree and gab16ers! Everything works for me, finally could play CB again...
    13. sywee34
      sywee34
      • member
      • 0 kudos
      Merci tu es un di E je cherchais désespérément la command powershell exact merci

      Cordialement
      Sywee
    14. DONKEYMILK
      DONKEYMILK
      • BANNED
      • 3 kudos
      Could someone post an sfv or sha/md5 of the original exe please.

      My game exe keeps getting deleted when i run this script.
      It does make a backup so it's ok-ish. :)

      P.S:
      Are we doing this on the Gog or Steam version?
    15. deuscaesar
      deuscaesar
      • member
      • 0 kudos
      it works ! Great job, thanks so much.
    16. Vegas1509
      Vegas1509
      • member
      • 0 kudos
      it really works !!! thank you guys you are the best!
    17. ArtemBurbon
      ArtemBurbon
      • member
      • 0 kudos
      Some kind of problem with the powercell. To begin with, my folder with the game in the incentive has the name Cyberpunk 2077 and because of the space in the name of the povershell it does not find the files I need. However, even if you remove this space and try to enter the command again, you will receive the following message: "Can't find Cyberpunk.exe. Ensure that you're running in the right location?". And here I really don't understand what the problem is, I tried to rename my Cyberpunk2077.exe to Cyberpunk.exe but it did not help
    18. jensandree
      jensandree
      • member
      • 3 kudos
      ArtemBurbon you're not supposed to rename any files.
      The script makes a backup of the original Cyberpunk2077.exe as a first step and if it can't find the file you'll get an error message and the script stops. This would indicate that you're running the script in the wrong folder. Verify this and try again.

    19. ArtemBurbon
      ArtemBurbon
      • member
      • 0 kudos
      Okay, maybe I'm doing something wrong? When it comes to powercell, I conditionally enter the command: powershell -ExecutionPolicy Bypass -File E:\games\Steam\SteamApps\common\Cyberpunk 2077\bin\x64\CPAVXPatcher_v1.ps1 If you enter the command like this, the following message is displayed: "Processing -File 'E:\games\steamapps\common\Cyberpunk' failed because the file does not have a '.ps1' extension. Specify a valid Windows PowerShell script file name, and then try again." That is, the powercell ignores everything that is written after a space in the file address at the moment with the "Cyberpunk 2077" folder. I understand that I can still change the name of the folder and it will not be critical. If I don't change anything else, powercell still won't be able to find "Cyberpunk.exe". Maybe the problem is that I globally enter the wrong command? I just looked at the instructions in the comments and README realized that it was necessary to enter the command in exactly the same way.
    20. ArtemBurbon
      ArtemBurbon
      • member
      • 0 kudos
      The problem has been resolved. It was my miscalculation, I had to go through the directory with the game files first. I tried to do it like on the command line using "сd", but since it did not work, I thought that in the powercell it is not necessary to go to the directory in this way.
    21. cyb3rp0nk
      cyb3rp0nk
      • member
      • 4 kudos
      This did the trick for me! Thanks allot, I can play my old saves again and this pile of a game still works on my old computer... Jeeebuz....
    22. Redleprechaun97
      Redleprechaun97
      • member
      • 0 kudos
      .
    23. Redleprechaun97
      Redleprechaun97
      • member
      • 0 kudos
      Thanks for the explanation, works :-)
    24. cacadodo666
      cacadodo666
      • member
      • 0 kudos
      Thanks. I dont know if it was intended for me (I7-8750h/RTX 2060) but I can now run:
      1080p, high with custom Ultra settings
      Ray Tracing
      no DLSS
      45-60 fps

      I was getting 30-40 even at low settings.
    25. jensandree
      jensandree
      • member
      • 3 kudos
      cacadodo666 Probably not if you were able to run 1.3 without it crashing as soon as you started a game - but you're not alone in noticing a speed increase after applying my patch and these AVX instructions aren't as fast as many believe they are - depending on how they're used that is... ;)
    26. GhostKillv666
      GhostKillv666
      • member
      • 0 kudos
      Hello OP,sorry for the offtopic but how didi you exactly find what string was the avx?Bcs i run in the same issue with dying light 2 and i would like to make an exe for that,please please PLEASE contact me.Lets get the people what they need.
  3. jensandree
    jensandree
    • member
    • 3 kudos
    Sticky
    A handful of people have reported another EXCEPTION_ILLEGAL_INSTRUCTION (0xC000001D) on XEON computers and it's due to 1.3 release now requires SSE 4.2, or more specific POPCTL. This was not the case previously and I'm sure this wasn't done on purpose, just like I'm sure AVX wasn't configured on purpose.

    The new crash happens here:

    00007ff7`dc7631b0 f3480fb801 popcnt  rax, qword ptr [rcx]

    Sadly CDPR doesn't do a ECX test (execute CPUID with EAX=1 ) to see if bit 23 is set so it'll crash and there's nothing to stop it.

    Patching it out is much harder than the AVX patch I did because here we need to replace the popcnt instruction with a math formula (n&(n-1)) but there's no way that's possible with the memory footprint available, unless I do a jmp and add a fix outside the normal exe file, and then jmp back after the replaced code has executed, but testing this kinda requires that I have a XEON computer which I don't...

    Anyhow, I've found one way to emulate SSE 4.2 (and AVX as well - but please use my patch instead of relying on the emulator because everything emulated will be way slower to execute for obvious reasons...)

    https://software.intel.com/content/www/us/en/develop/articles/intel-software-development-emulator.html

    Download and install/unpack sde to your Cyberpunk install (...\Steam\SteamApps\common\Cyberpunk 2077\bin\x64\) directory.

    Open a shell (CMD) as admin (right click "open as administrator"), navigate to the directory where you installed sde and type
    sde - Cyberpunk2077.exe (and hit enter)

    It'll probably take an awful long time to start since all the emulation stuff needs to be setup, but you should be able to play the game at least until someone manages to fix the SSE 4.2/popctl crash.

    It's the best solution I have for you at this point in time. With a bit of luck there's only a couple popctl instructions so it doesn't become a total lagfest... :/
    Anyhow, just wanted to help out.
    Please report back if you try this workaround so we can tell others if it works well?!

    Cheers,
    Jens
  4. Aftermath163
    Aftermath163
    • member
    • 0 kudos
    I Have an error when I run the powershell script :

    Start patching...
    old : ".\Cyberpunk2077.exe.backup"
    diff: ".\CPAVXPatchv1"
    out : ".\Cyberpunk2077.exe"
    oldFile dataSize 67368608 != diffFile saved oldDataSize 65705160 ERROR!
    hpatchz time: 0.016 s
    Patch was successful

    The Cyberpunk2077.exe.backup get created but no now exacutable is there to replace it
  5. avxfanculo
    avxfanculo
    • member
    • 0 kudos
    can this work with other games? (wwe2k22) if not can you please make a patch for that?
  6. Baticzek
    Baticzek
    • member
    • 0 kudos
    Not working for, after crash game still doesn't start (CPU core2duo E8400/4.2GHZ)
    Error Reason: Unhandled exception
    Expression: EXCEPTION_ILLEGAL_INSTRUCTION (0xC000001D)
    Message: The thread tried to execute an invalid instruction.
  7. Dissmaass
    Dissmaass
    • member
    • 0 kudos
    3084-1630961675-2035619469.pngПривет . Спасибо за патч. Но я не могу запустить Cyberpunk 2077. Я точно выполнил инструкции. «Сyberpunk2077.exe» сменил название на «Cyberpunk2077.exe.backup». Помогите пожалуйста3084-1630961287-1240948510.jpeg
    1. sfdrf3rsrf3rfwe
      sfdrf3rsrf3rfwe
      • member
      • 0 kudos
      Тоже самое. Help
  8. 7OVO7
    7OVO7
    • supporter
    • 9 kudos
    out of curiosity:

    I have the AVX funcionality in my CPU, so... CDPR have removed completly AVX from Cyberpunk (at moment I play the 1.31 version) or they just made sure that processors that don't have this function can start it anyway, and who has the function activates itself?

    in a nutshell: if they have completely disabled it, how can I re-enable it? (why)

    obv ... if not complete disabled, just one word: NEVERMIND
  9. OlgaO087
    OlgaO087
    • member
    • 0 kudos
    I got this error: https://drive.google.com/file/d/1gUID13AHBSLiC2qmRb38K3kEziOiAgSk/view?usp=sharing
    What can I do?
  10. Lugh322
    Lugh322
    • member
    • 0 kudos
    Is it possible you can make a similar avx fix for NBA2K22? I'd pay you some money
  11. ReDs1gNaL
    ReDs1gNaL
    • member
    • 0 kudos
    Невозможно обработать -Файл "." Поскольку файл имеет расширение, отличное от PS1. Укажите допустимое имя файла сценария Windows PowerShell и имя файла из empire.How to decide
    как решить?как решить?как решить?
    1. jensandree
      jensandree
      • member
      • 3 kudos
      Привет.
      К сожалению, я не очень хорошо говорю по-русски. Вы можете следовать этой процедуре?

      1 - Download: CPAVXPatcher_v1-no-bin.zip from downloads section
      2 - Get the file: https://politisktinkorrektpappa.com/media/hpatchz.zip and remove the .txt extension so it becomes an exe again.
      3 - Unzip the files in your game installation folder where Cyberpunk2077.exe is located.
      4 - Press ALT + F in the same folder where Cyberpunk2077.exe is located
      5 - Open Powershell as an administrator
      6 - Execute this command: powershell -ExecutionPolicy Bypass -File .\CPAVXPatcher_v1.ps1
      7 - If it works you will get a successful message on the screen.
      8 - Play the game.
    2. ReDs1gNaL
      ReDs1gNaL
      • member
      • 0 kudos
      Unable to process -File "." Since the file has an extension other than PS1. Provide a valid Windows PowerShell script file name and file name from empire.how to solve?
    3. s4ulyatina
      s4ulyatina
      • member
      • 0 kudos
      I have the same problem, amd phenom ii x6, I try to read everything but I can't get into it
  12. zardarr777
    zardarr777
    • member
    • 0 kudos
    The  new v 1.3 completely flat line's buggy hell from the opening car chase sequence to as soon has night city loads it dies every time on queue.  No mods added etc, but my other install V 1.2 runs ok crashes at randoms times or not at all.  This is by far the most pathetic excuse for a money grab while NWO is being eStablished.
  13. systemcan
    systemcan
    • member
    • 0 kudos
    Hello, I did everything you said but powershell said  ''patch is Ok! '' 
    old .\Cyberpunk.exe.bakcup 
     diff .\CPAVXPatchv1
    out .\ Cyberpunk2077.exe   
    patch ok!   

    Im still getting Flatlined error after I click play on steam or the exe