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

linux: workaround for #2977 #3027

Merged
merged 1 commit into from
Nov 4, 2023
Merged

linux: workaround for #2977 #3027

merged 1 commit into from
Nov 4, 2023

Conversation

db47h
Copy link
Contributor

@db47h db47h commented Nov 3, 2023

Description

In NewWindow, set options.Linux.WebviewGpuPolicy to WebviewGpuPolicyNever if options.Linux is nil, disabling GPU acceleration by default on linux until the upstream bugs https://bugs.webkit.org/show_bug.cgi?id=228268 and https://bugs.webkit.org/show_bug.cgi?id=261874 are fixed.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

wails dev
wails build
./build/bin/demo-app
  • Linux

Test Configuration

# Wails
Version         | v2.6.0
Package Manager | pacman

# System
┌──────────────────────────────────────────────────────────────────────────────────┐
| OS           | Manjaro Linux                                                     |
| Version      | Unknown                                                           |
| ID           | manjaro                                                           |
| Go Version   | go1.21.3                                                          |
| Platform     | linux                                                             |
| Architecture | amd64                                                             |
| CPU          | AMD FX(tm)-6300 Six-Core Processor                                |
| GPU          | GP107 [GeForce GTX 1050 Ti] (NVIDIA Corporation) - Driver: nvidia |
| Memory       | 8GB                                                               |
└──────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌─────────────────────────────────────────────────────┐
| Dependency | Package Name | Status    | Version     |
| *docker    | docker       | Available | 1:24.0.6-1  |
| gcc        | gcc          | Installed | 13.2.1-3    |
| libgtk-3   | gtk3         | Installed | 1:3.24.38-1 |
| libwebkit  | webkit2gtk   | Installed | 2.42.1-1    |
| npm        | npm          | Installed | 10.2.0-1    |
| pkg-config | pkgconf      | Installed | 1.8.1-1     |
└────────────── * - Optional Dependency ──────────────┘

 SUCCESS  Your system is ready for Wails development!

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

In NewWindow, set options.Linux.WebviewGpuPolicy to WebviewGpuPolicyNever
if options.Linux is nil, disabling GPU acceleration by default on linux
until the upstream bugs https://bugs.webkit.org/show_bug.cgi?id=228268
and https://bugs.webkit.org/show_bug.cgi?id=261874 are fixed.
@db47h db47h mentioned this pull request Nov 3, 2023
@leaanthony
Copy link
Member

Thanks for this 🙏 I'm ok with this change. @lyimmi you ok with this?

@lyimmi
Copy link
Contributor

lyimmi commented Nov 3, 2023

I'm ok with it.

@leaanthony leaanthony merged commit 08e12de into wailsapp:master Nov 4, 2023
1 check passed
@leaanthony
Copy link
Member

Thanks for this 🙏

@leaanthony
Copy link
Member

@db47h Please could you add an entry to the changelog located at website/src/pages/changelog.mdx?

@db47h
Copy link
Contributor Author

db47h commented Nov 4, 2023

@leaanthony sure, sorry I forgot about that. Should I submit a new PR just for this?

@gmlewis
Copy link

gmlewis commented Nov 7, 2023

I just tried this on my linux box that was demonstrating the same problem:

$ go install github.com/wailsapp/wails/v2/cmd/wails@master
go: downloading github.com/wailsapp/wails v3.0.0-alpha.0.0.20231106094614-57c04ba740ae+incompatible
go: downloading github.com/wailsapp/wails/v2 v2.6.1-0.20231106094614-57c04ba740ae
...
$ wails version
v2.6.0

and still have the same issue:

$ ./build/bin/myproject 
Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal

(WebKitWebProcess:3668532): Gdk-ERROR **: 10:57:13.052: The program 'WebKitWebProcess' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 203 error_code 2 request_code 152 (GLX) minor_code 34)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Am I doing something wrong?

@db47h
Copy link
Contributor Author

db47h commented Nov 7, 2023

@gmlewis please open a new issue for this. Although what you are experiencing does not look related, I may very well have broken something and this needs some investigation. In the new issue please report tests with an earlier version (like commit 0a63215), with and without setting WEBKIT_DISABLE_DMABUF_RENDERER=1. Please also mention this PR in the new issue so that I get a notification.

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

Successfully merging this pull request may close these issues.

4 participants