Open asahilina opened 1 year ago
Kitty Terminal requires a newer OpenGL. However, it works when started with LIBGL_ALWAYS_SOFTWARE=1
Without that environment variable set it outputs:
[341 02:41:26.234335] [glfw error 65543]: EGL: Failed to create context: Arguments are inconsistent
[341 02:41:26.237938] Traceback (most recent call last):
File "/usr/bin/../lib/kitty/kitty/main.py", line 418, in main
_main()
File "/usr/bin/../lib/kitty/kitty/main.py", line 410, in _main
run_app(opts, cli_opts, bad_lines)
File "/usr/bin/../lib/kitty/kitty/main.py", line 199, in __call__
_run_app(opts, args, bad_lines)
File "/usr/bin/../lib/kitty/kitty/main.py", line 172, in _run_app
window_id = create_os_window(
ValueError: Failed to create GLFWwindow
The Gnome Web browser starts up but is very slow.
I get this warning in a terminal:
** (epiphany:2677): WARNING **: 19:01:09.470: GDK is not able to create a GL context, falling back to glReadPixels (slow!): Unable to create a GL context
Works fine with LIBGL_ALWAYS_SOFTWARE=1
.
Running Gnome on Wayland.
Blender requires OpenGL 3.3 or higher.
$ blender
...
Error! Unsupported graphics card or driver.
A graphics card and driver with support for OpenGL 3.3 or higher is required.
The program will now close.
Launches fine with LIBGL_ALWAYS_SOFTWARE=1.
chromium needs to be started with
MESA_LOADER_DRIVER_OVERRIDE=asahi chromium --ignore-gpu-blocklist
for GPU acceleration.
edit sigh, chromium still needs to be started with chromium --ozone-platform=wayland
on wayland.
JetBrains IntelliJ IDEA needs to be started with
-Dsun.java2d.opengl=true
-Dsun.java2d.opengl.fbobject=false
set in Help
-> Edit Custom VM Options...
for GPU acceleration. Works really really well, however without that flags, it's terrible slow, basically not usable.
chromium needs to be started with
MESA_LOADER_DRIVER_OVERRIDE=asahi chromium --ignore-gpu-blocklist
@jannau @asahilina When I start chromium (under x11, not wayland) I get following errors:
$ MESA_LOADER_DRIVER_OVERRIDE=asahi chromium --ignore-gpu-blocklist
DRM_IOCTL_ASAHI_GET_PARAM(0) failed: Invalid argument
libGL error: glx: failed to create dri3 screen
libGL error: failed to load driver: asahi
DRM_IOCTL_ASAHI_GET_PARAM(0) failed: Invalid argument
libGL error: glx: failed to create dri2 screen
libGL error: failed to load driver: asahi
DRM_IOCTL_ASAHI_GET_PARAM(0) failed: Invalid argument
libGL error: glx: failed to create dri3 screen
libGL error: failed to load driver: asahi
DRM_IOCTL_ASAHI_GET_PARAM(0) failed: Invalid argument
libGL error: glx: failed to create dri2 screen
libGL error: failed to load driver: asahi
DRM_IOCTL_ASAHI_GET_PARAM(0) failed: Invalid argument
MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so: cannot open shared
object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
failed to load driver: zink
DRM_IOCTL_ASAHI_GET_PARAM(0) failed: Invalid argument
libGL error: glx: failed to create dri3 screen
libGL error: failed to load driver: asahi
DRM_IOCTL_ASAHI_GET_PARAM(0) failed: Invalid argument
libGL error: glx: failed to create dri2 screen
libGL error: failed to load driver: asahi
However, chromium starts up, and when looking at chrome://gpu it seems to be ok:
Here
OpenGL
and WebGL[2]
is enabled, but why do the above errors occur, specially libGL error: failed to load driver: asahi
?
Also I am wondering why chromium reports Video Decode: Hardware accelerated
, I thought this is not supported yet by Asahi according to the wiki?
Oh, and my system is completely up-to-date, even with today's X11/mesa fixes (and I did restart my MacBook). That's what I am using:
$ chromium --version
Chromium 108.0.5359.98 Arch Linux ARM
$ uname -a
Linux mkurz-macbook-pro 6.1.0-asahi-2-1-edge-ARCH #2 SMP PREEMPT_DYNAMIC Wed, 14 Dec 2022 14:33:17 +0000 aarch64 GNU/Linux
$ pacman -Q | grep -i mesa
mesa-asahi-edge 23.0.0_pre20221214-1
mesa-demos 8.5.0-2
mesa-utils 8.5.0-2
Thanks for everything!
I tried to install kicad
(6.0.9) via pacman
as down below:
sudo pacman -Su kicad --asdeps kicad-library kicad-library-3d
Application works fine, but only in software rendering
mode, and it's little bit slow. Settings LIBGL_ALWAYS_SOFTWARE
variable has no impact.
When I wanted to switch to accelerated
mode, it showed an error message
without any output in journal or console.
@andy9a9 I might be wrong, but KiCad Nightly shows no such warning for me. It might have something to do with the recent release of KiCad 7. Hardware rendering appears to work with it now, weather that's the work of Lina or the KiCad team.
@andy9a9 I might be wrong, but KiCad Nightly shows no such warning for me. It might have something to do with the recent release of KiCad 7. Hardware rendering appears to work with it now, weather that's the work of Lina or the KiCad team.
Good to know, I will try it again with version 7 as well.
Ok, I tested it after last pacman -Suy
, it installed kicad 6.0.11
and latest Lina's driver. Not sure what @asahilina did, but now it works without any warning ;). It's not as smooth as on OSX native app or Linux x86_64 native, but it's much more usable as it was. But at the end, I guess, it could be better ;). PCB moving is fine, but zooming not.
JetBrains IntelliJ IDEA needs to be started with
-Dsun.java2d.opengl=true -Dsun.java2d.opengl.fbobject=false
set in
Help
->Edit Custom VM Options...
for GPU acceleration. Works really really well, however without that flags, it's terrible slow, basically not usable.
Thanks a lot for this! Works like a charm on my machine! It actually applies on any java application!
And, can I kindly ask you to explain why disabling framebuffer object can improve performance? I'm really curious about that, and googling didn't give much information. I'm just wondering how you came up with this option? :rofl: Thanks again!
@SuperKenVery I think I found that somewhere in the JetBrains bug tracker: https://youtrack.jetbrains.com/issues?q=%22-Dsun.java2d.opengl.fbobject%3Dfalse%22 Can't remember anymore which ticket exactly.
EDIT:
And, can I kindly ask you to explain why disabling framebuffer object can improve performance?
I have no idea.
Platform: M2 Max
Running CQ-editor I get a
Unhandled intrinsic load_sample_id
[1] 276912 segmentation fault (core dumped) nix run ./
Running with LIBGL_ALWAYS_SOFTWARE=1
works
How to reproduce:
nix run github:rowanG077/cq-flake/5c3e7db4cc271978fdac62681501338449e8d34c
(This will take some time to download, compile and then run cq-editor)Unfortunately there is no ALARM package for cq-editor.
Blender 3.6.5 cannot detect OpenGL Vendor, probably require a higher version:
EGL Error (0x3009): EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
EGL Error (0x3009): EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
EGL Error (0x3009): EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
EGL Error (0x3009): EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
EGL Error (0x3009): EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
EGL Error (0x3009): EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
EGL Error (0x3009): EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
EGL Error (0x3009): EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
Warning: No OpenGL vendor detected.
blender: ../libepoxy/src/dispatch_common.c:872: epoxy_get_proc_address: Assertion `0 && "Couldn't find current GLX or EGL context.\n"' failed.
zsh: IOT instruction (core dumped) blender
LIBGL_ALWAYS_SOFTWARE=1 blender
works
Platform: M2 Max
Running CQ-editor I get a
Unhandled intrinsic load_sample_id [1] 276912 segmentation fault (core dumped) nix run ./
Running with
LIBGL_ALWAYS_SOFTWARE=1
worksHow to reproduce:
- Install the nix package manager
- Enable nix flake support
- run
nix run github:rowanG077/cq-flake/5c3e7db4cc271978fdac62681501338449e8d34c
(This will take some time to download, compile and then run cq-editor)Unfortunately there is no ALARM package for cq-editor.
backtrace
This no longer segfaults. But the 3D does not work.
edit: Actually it now seems to work.
This tracker issue is for reporting apps that fail to start with the GPU driver, likely because they require OpenGL features that are not supported yet.
LIBGL_ALWAYS_SOFTWARE=1
environment variable, and make sure it works.If the app crashes or segfaults on startup, the problem could be related to OpenGL support, or an actual driver bug. If unsure, please report it here, and mention the segfault. We'll triage it later if it's actually a driver bug. If you know how to get backtraces with
gdb
, please try running the app under it and see whether the crash happens within the app's code or within Mesa. If it's within Mesa, please report it on issue #72 instead.