nuzayets / rawinput-debug

Win32 console application for demonstrating an issue with raw input and system idle state
MIT License
54 stars 1 forks source link

Problem still exists in Win11, and script isn't working #2

Open Silvia-Dragoness opened 2 years ago

Silvia-Dragoness commented 2 years ago

I switched to Windows 11 a bit ago, and I'm sad to report that this issue is still present.

I tried using this powershell script and it seemed to work once, but then the problem resurfaced (driver/Geforce Experience update? not sure), and now when I try to run the script I get this error:

PS C:\> .\universal_heuristic_patch_libcef.ps1
161kB/s
FOUND l1: 0x61e0b07
No bueno.
At C:\universal_heuristic_patch_libcef.ps1:100 char:5
+     throw "No bueno."
+     ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (No bueno.:String) [], RuntimeException
    + FullyQualifiedErrorId : No bueno.
nefariouslegion commented 2 years ago

I also have this issue and got the same error trying to run the script in Windows 11

ceedveed commented 1 year ago

Thanks for noting this. I haven't tried the script yet, but I can also confirm that this issue of not sleeping is still present in Windows 11 and current Nvidia driver to this date. I will wait until the script is updated.

MrMarvel commented 1 year ago

Working on Win 10 RTX 2080 Super. sent info in https://www.nvidia.com/en-us/geforce/forums/geforce-experience/14/259817/nvidia-your-shadowplay-software-is-preventing-my-c/3343810/

atarixnl commented 1 year ago

Any chance this will be updated for win 11?

Pharaoh2k commented 1 year ago

You can easily update the file manually without any script in win11: 1) Disable the In-game overlay in Geforce experience 2) Edit libcef.dll from Program Files\NVIDIA Corporation\NVIDIA GeForce Experience in a good hex editor such as HxD (https://mh-nexus.de/en/downloads.php?product=HxD20), I used the great online tool https://hexed.it/ 3) Find the hex 7af92a840100000006 and replace the last 06 to 04 b7qdPk6 4) Save the modified file as libcef.dll and replace the original (you may wanna backup the original before just in case). 5) Start the In-game overlay in Geforce experience

Tested and works well in win11.

ceedveed commented 1 year ago
  1. Find the hex 7af92a840100000006 and replace the last 06 to 04 b7qdPk6 Tested and works well in win11.

My file already had 04. Did you mean change 04 to 06? Or did I interpret the main github page incorrectly?: image

Also I tested my stock PC (did not hex edit libcef) on Nvidia GeForce Experience 3.27.0.112\libcef 73.0.0.0 with a Thrustmaster HOTAS joystick connected and it can sleep fine. I checked libcef after, and it had 04 at the end of 7af92a8401000000.

I just built the PC a few weeks ago. I did encounter the nvidia controller bug with my other PC in Nov 2022 but it is no longer in use so I cannot test it again.

EDIT: Tested on another PC with same stock Nvidia drivers/GFE/libcef version installed, but PS4 controller connected. Bug is still there and will not allow system to sleep.

Pharaoh2k commented 1 year ago

@ceedveed Indeed the original instructions say change 04 to 06, but on my win11 I had to do the opposite to make it work. It originally was 06. Luckily the fix is pretty simple. :)

EDIT: I am using the latest 537.13 game optimized drivers.

Pharaoh2k commented 1 year ago

Actually thanks for pointing this out. I put the files in beyond compare to make sure and found that there are 3 changed bytes, 2 were probably changed by the script and I didn't even notice. On the left it's the unmodified file and on the right is the file with the 3 bytes changes, which works well:

265519978-f2517a1b-b2c1-484e-8c7a-8930da5e8f5e

atarixnl commented 1 year ago

Actually thanks for pointing this out. I put the files in beyond compare to make sure and found that there are 3 changed bytes, 2 were probably changed by the script and I didn't even notice. On the left it's the unmodified file and on the right is the file with the 3 bytes changes, which works well:

SSKe4kJ

This worked perfectly! My setting was already on 04. However, after adjusting from the "05 00 08" part to "06 00 06", everything fell into place. Now, my screensaver activates even with my PS5 controller connected. Thank you

thegendler commented 3 months ago

Just wanted to say how grateful I am that I found this. I was going absolutely crazy trying to figure out why my display would not go to sleep. I recently just rebuilt my PC with a fresh install of Windows 10. Everything seemed fine until a few hours ago when my display was again not going to sleep. I eventually stumbled onto some posts about HID-compliant game controllers causing this issue. But I also saw people talking about Geforce Shadowplay Overlay as well. Turns out this was exactly my problem. I have a USB adapter for Gamecube controllers and with Shadowplay enabled, my display won't sleep. Long story short, I found this git and can say that it helped me fix my issue.

More specifically:

What worked for me was changing the 04 to 06. Just wanted to share in case this helps anyone else. image

thegendler commented 3 months ago

Turns out I spoke too soon. I continued to see the issue today. I ended up using the universal patch which changed all 3 bytes to 06. This appears to have fixed the issue. image