egui: Can not run official example with error NoAvailablePixelFormat...
Describe the bug
As my title say…
To Reproduce Steps to reproduce the behavior:
- Clone the repo to local
- Into the repo dir and run command
cargo run -p hello_world
Expected behavior Run and show a gui.
Screenshots

Desktop (please complete the following information):
- OS: Ubuntu 22.04 with Gnome and Wayland.
- Browser Both Firefox and Chrome.
- Version Default version…
Additional context
No.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (14 by maintainers)
I also stumbled over this glutin bug in Slint and confirm that it is fixed in the master branch of glutin. 🎉
Since currently nvidia drivers have various issues on wayland. since both glfw and sdl2 using x11 by default, telling winit to use x11 might help:
yeah, I can confirm that if i set double buffer to false and vsync to false. i get a window.
the main issue seems to be that when glutin tries to get the MAX_SWAP_INTERVAL with GetConfigAttrib function, it returns zero in all configurations 😦 . so, you are forced to set vsync to off.
so, we just wait for https://github.com/rust-windowing/glutin/issues/1444 in a new release i guess. EDIT: it seems glutin already has a beta release 0.30 on crates.io. but we cannot use it yet as wgpu is still using raw-window-handle 0.4. wgpu will make a release on september 28
for me, it seems the issue lies with winit/glutin:
winit,wgpu => works, but wgpu surface doesn’t have a srgb supporting format 😦 winit,glow (glutin) => fail with the pixel format error
glfw or sdl2 with glow or wgpu => works normally including srgb framebuffer support.