Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: GPU works in 130.0, but doesn't work in 130.1 #355

Open
cztomczak opened this issue Jan 18, 2025 · 2 comments
Open

Windows: GPU works in 130.0, but doesn't work in 130.1 #355

cztomczak opened this issue Jan 18, 2025 · 2 comments

Comments

@cztomczak
Copy link
Owner

After removing "disable-gpu" switch in settings.json user was able to get GPU accelerated rendering working in version 130.0, but it doesn't work for him in version 130.1.

User reported on old forum here:
https://groups.google.com/g/phpdesktop/c/cQJMLxG9cTg/m/dHyu9mCZCwAJ

There are two differences between 130.0 and 130.1 that could possibly affect this:

  1. CEF headers updated in this commit: 9cecffe
  2. Main window creation logic changed: 8ceda28

Need to re-check if CEF binaries are in proper versions. In both 130.0 and 130.1 I had strange issues with GPU, and it seemed it was caused due to nvidia drivers, however I couldn't reproduce them in upstream cefclient/cefsimple apps which was puzzling.

@cztomczak
Copy link
Owner Author

Some newer CEF versions required app compatibility manifest for GPU detection:
https://source.chromium.org/chromium/chromium/src/+/main:build/win/compatibility.manifest;l=1?q=compatibility.manifest&ss=chromium

Tutorial still mentions that manifest:
https://bitbucket.org/chromiumembedded/cef/wiki/Tutorial#markdown-header-windows-build-steps

However there is no such manifest in CEF 130 or latest CEF 132. CEF 127 apparently had it included.

@cztomczak
Copy link
Owner Author

cztomczak commented Jan 31, 2025

Manifests can be found in Standard Distribution binaries in tests/cefclient/win/ subfolder.

Possible fix for GPU issue:

  1. Create "phpdesktop-chrome.exe.manifest" file next to main executable with these contents:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!--The ID below indicates application support for Windows Vista -->
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
      <!--The ID below indicates application support for Windows 7 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
      <!--The ID below indicates application support for Windows 8 -->
      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
      <!--The ID below indicates application support for Windows 8.1 -->
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
      <!--The ID below indicates application support for Windows 10 -->
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
      <!-- This tag is required for XAML islands usage in the process for media scenarios. -->
      <!-- This version corresponds to the Windows 10 May 2019 Update. -->
      <maxversiontested Id="10.0.18362.0"/>
    </application>
  </compatibility>

  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="Win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
    </dependentAssembly>
  </dependency>

  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" />
      </requestedPrivileges>
    </security>
  </trustInfo>

</assembly>
  1. Remove "disable-gpu" switch from settings.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant