Reddit's patch for Cyberpunk 2077 yields double-digit performance gains on AMD CPUs

mongeese

Posts: 643   +123
Staff
Editor's take: A masterpiece of video game literature, and a technical disaster. Although not everyone seems to be having issues with Cyberpunk 2077, a portion of gamers keeps having issues even on fast hardware. Thus Cyberpunk is set to stand among titles like The Witcher 3 and Skyrim as yet another game saved by inexplicably dedicated fans. (All hail the modders.) Instead of playing the long-awaited title, our unpaid heroes have gotten to work fixing the game’s coding errors and have created a one-line patch that significantly improves performance on most AMD processors.

Let’s begin with the obvious: yes, it's disappointing that an expensive game, which spent the better part of a decade in development, was released with a one-line error. But this article isn't about that, it's about the bizarre solution.

Yesterday, redditors noticed that on AMD hardware, Cyberpunk 2077 was mostly using physical cores and leaving the secondary logical cores idle. In other words, the game was ignoring the processor's simultaneous-multithreading capability. On Ryzen processors of moderate performance, this limited processor utilization to about 40-60%, depending on other factors in the system.

The cause of this quirk was first erroneously attributed to the Intel compiler (which can cause this issue), but more knowledgeable redditors pointed out that the offending passage in Cyberpunk's executable file was from GPUOpen. It checks if the processor is an authentic AMD Ryzen, and if it is, it limits the number of scheduler threads that the game can give the processor. This code does provide benefits, and its inclusion in the game is not an example of Intel bias, but CD Projekt Red should have altered it as part of their optimizations for Ryzen.

The quick fix is easy, simply altering one line in the offending passage enables the game to allocate the maximum number of threads to the processor. On every AMD processor, this will increase utilization. Over a hundred redditors have tried the fix and reported that utilization went from 50% to 75%, on average. More if the system was CPU bottlenecked. The corresponding performance improvement was more variable...

First off, the big high-core count processors didn’t benefit from this fix at all. The 16-core R9 5950X actually decreased in performance when the fix was applied, probably because sharing the threads around allocated them to worse cores, and sixteen was already enough for all the threads. On processors with twelve cores, the fix provided a small benefit only when the system was CPU bottlenecked.

The fix offers serious improvements for processors with eight or fewer cores, however. One redditor with a 3700X reported jumping up from 60 fps to 70 fps, while driving. A user with a R5 3600 reported a 20 fps increase in 1% lows, while another used the boost to improve their settings; they went from 50-ish fps at high settings, without ray tracing, and with DLSS, to 60-ish fps with everything at ultra and ray tracing at medium.

Another redditor went from 60 fps to 75-80 fps. Yet another reported a jump from 35 to 45 fps while running around, and a jump from 40 to 55 fps while standing still. Another user reported now getting 60 fps in crowded areas, when they used to drop to 40 fps. Users with less powerful processors, like the R5 2600, found that applying the fix made the game "finally playable" and in severely CPU limited scenarios, the fix could provide up to a 25-30% improvement.

Admittedly, these aren’t scientific benchmarks. There hasn’t been time to do proper testing yet, but we do expect more accurate numbers to appear in the next few days. We could possibly test this fix ourselves as part of our upcoming Cyberpunk 2077 CPU tests, too. However, it does appear that for the majority of Ryzen users, applying this fix provides a performance improvement, that is at times equivalent to dropping from high to medium settings, for example.

How to apply the fix

We don’t necessarily recommend applying the fix yourself, but admittedly, it would be very hard to accidentally cause serious damage to the game files, so if you like tinkering and have a Ryzen processor, go ahead. If you're not keen though, don't worry, we're expecting CD Projekt Red to issue an official patch sometime soon themselves.

Here's step-by-step instructions, courtesy of u/chaosxk:

  • Download the HxD hex editor.
  • Find your Cyberpunk 2077 executable (.exe) file.
  • Make a backup of the file.
  • Click and drag the executable onto HxD.
  • Press CTRL+F and change the column at the top of the dialogue box to hex-values.
  • Enter 75 30 33 C9 B8 01 00 00 00 0F A2 8B C8 C1 F9 08 .
  • Copy EB 30 33 C9 B8 01 00 00 00 0F A2 8B C8 C1 F9 08 .
  • Right click the highlighted 75… code in HxD, and paste in the EB… code.
  • Click save.

Here’s a video demonstration:

We're not sure who made this video.

If you try the fix, comment your results.

Permalink to story.

 
This bit doesn't exactly make much sense to me:

"The cause of this quirk was first erroneously attributed to the Intel compiler (which can cause this issue), but more knowledgeable redditors pointed out that the offending passage in Cyberpunk's executable file was from GPUOpen. It checks if the processor is an authentic AMD Ryzen, and if it is, it limits the number of scheduler threads that the game can give the processor. This code does provide benefits, and its inclusion in the game is not an example of Intel bias, but CD Projekt Red should have altered it as part of their optimizations for Ryzen."

It is acknowledged that the game code uses an Intel compiler which is by default Intel biased and has been known to cause the same issue in the past (albeit yes, in this particular instance, it apparently wasn't to blame).

GPUOpen on the other hand is an open source code developed by AMD.
This is curious because in this instance the game should have actually behaved on AMD hw better (CPU's and GPU's) and would have included support for RDNA 2 Raytracing (which it didn't do) - not to mention that exclusion of SMT on cpu's is odd to say the least.

So, why is AMD hw seemingly on the short-end of the proverbial stick compared to Intel and NV when it comes to this title?
Most other devs who used open-source software tended to develop games which make far better use of AMD hw (while still producing excellent results on both Intel and NV - exactly because it used open source features as opposed to closed source).

 
So, if this is an innocent error it means that devs never even bothered to test this on Ryzen CPU or do any kind of profiling / performance tracing ? Seems obvious enough if all that was needed to find this „bug“ was to open task manager while running the game.

If this is indeed an accidental bug then it is beyond lazy.
 
The fun part: the Xboxes - and the PS5 - have eight-core AMD CPUs. It would be interesting if they, too, could benefit from this. (Or perhaps it was limited specifically because of the performance on them? Cores may be needed for background tasks.)

It is not surprising to me if the game was more optimized for Intel on PC, as until very recently it remained the first choice of gamers, and also likely to be used in a development system.
 
So, if this is an innocent error it means that devs never even bothered to test this on Ryzen CPU or do any kind of profiling / performance tracing ? Seems obvious enough if all that was needed to find this „bug“ was to open task manager while running the game.

If this is indeed an accidental bug then it is beyond lazy.
I agree the level of incompetence on display here is staggering, but not suprising to be honest.

It blatantly shows they BARELY did any playtesting on this game.
 
Seems very hard to fathom that they missed one line of code...more likely that they didn't care to support AMD because they weren't official sponsors, or worse, they deliberately hampered AMD performance. I mean really, how could they just miss one line of code for ~30% of CPUs out there?
 
CDPR lol.

Could've just taken the time to finish the game instead of shove it out for the most profitable time period this generation.

They really have fallen to the level of the other big AAA publishers.
 
Interesting this website advocates cracking a .exe, doesnt that violate the terms and conditions of the item??

Can see they are patching a conditional to a forced jump, a little more info on exactly what routine is being bypassed wouldnt have gone amiss , in any case its better practise to change what caused the flag to be set, than the jump itself.

As for some of the comments here, its most likely the devs left out some sort of IFDEF rather than it being malicious.
 
Can I ask, is this for the Steam version or GoG? Because I cannot find the string in my GoG version of the executable?
 
The fun part: the Xboxes - and the PS5 - have eight-core AMD CPUs. It would be interesting if they, too, could benefit from this. (Or perhaps it was limited specifically because of the performance on them? Cores may be needed for background tasks.)

It is not surprising to me if the game was more optimized for Intel on PC, as until very recently it remained the first choice of gamers, and also likely to be used in a development system.
It wasn't optimized for Intel CPU's while intentionally omitting "optimization" for AMD processors, it just "happens" (as it happens with most other companies) that their HP, Dell and Apple workstations use Intel Xeon CPU's.
 
So, if this is an innocent error it means that devs never even bothered to test this on Ryzen CPU or do any kind of profiling / performance tracing ? Seems obvious enough if all that was needed to find this „bug“ was to open task manager while running the game.

If this is indeed an accidental bug then it is beyond lazy.
Are you familiar with AAA development? AAA devs are notoriously lazy, despite being given years fo time and money, the most obvious simple bugs are never patched day 0. Both AAA developers and publishers suffer from terrible time management apparently.

Even if you give them the benefit of the doubt from being overworked and having to pick up someone elses work, the number of just blatant, obvious bugs that get patched within minutes by modders really make you wonder what they are smoking in the dev houses. Same with companies like bethesda.
 
It does not. Do some (re)search... also see the nexusmods, it has a mod that does this fix much easier, as easy as copy paste and is future proof for next updates.
Well, here's the readme from the 1.04 patcher:

___________
Features

- Version agnostic - installs on v1.03 GOG or Steam build, whatever
- Doesn't check for registry, so will install on GOG builds/repacks which didn't add registry entries
- 20-30% faster patching than other updates
- Patches all language packs, not just some of them
- Includes GOG/Steam version switcher
- Includes AVX Fix for older CPUs
- Includes AMD Fix for some AMD CPUs, which improves perfomance
- Creates new registry entries afterwards so you will be able to apply future GOG patches
- Includes "original cyberpunk_2077_gog_reg_v1.04.bat" just in case
- By default you will get Steam build after applying the patch, run "Switch to GOG.bat" to quickly turn it to GOG
_____________
Took out the credits and title for obvious reasons...

Yes, this is from the Scene - assumed that if they patched it, so should the "official" version... guess not
 
Last edited:
I have an AMD Ryzen 5 2600x, and after I applied this fix, the game has become much more stable, albeit with low FPS, because I have a GTX 1050 Ti. Nevertheless, I am running the game at a stable 35-40fps, with no lag spikes. Safe to say, this patch is worth it!
 
I see this as an honest error from CDPR. For one reason or another (but probably for many), the project was delayed, and they must have been under insane pressure to have this out before xmas, and they scr*w things up here and there.

By any means, leaving this "feature' in the code is a rookie mistake, no arguments there. But I don't think it was deliberate, or that they were negligient: they are just humans too, and we all make mistakes. Thankfully, the issue has been identified, and there is a quick fix for this (thanks to the community)

Disclaimer: I don't own the game, I don't work for CDPR, and I'm actually somewhat disappointed with the overal performance of CP2077 (I thought my GTX 1070 would be enough for a decent experience, but apparently I need to aim for "low" settings if I buy the game...)
 
The folks complaining a/b the game being unplayable on last gen base consoles are the same folks who would be ranting on social media making such a huge outcry if the devs decided to delay the game on base consoles while PS5, XSX/S, and PC gotten released.
 
Back