diff --git a/CHANGELOG.md b/CHANGELOG.md index 7527921ba6..00329837d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,6 +84,7 @@ Bottom level categories: #### OpenGL - Fix internal format for the `Etc2Rgba8Unorm` format. By @andristarr in [#5178](https://github.com/gfx-rs/wgpu/pull/5178) +- Try to load `libX11.so.6` in addition to `libX11.so` on linux. [#5307](https://github.com/gfx-rs/wgpu/pull/5307) #### `glsl-in` diff --git a/wgpu-hal/src/gles/egl.rs b/wgpu-hal/src/gles/egl.rs index aa985d8121..d96dcc8dbf 100644 --- a/wgpu-hal/src/gles/egl.rs +++ b/wgpu-hal/src/gles/egl.rs @@ -161,7 +161,7 @@ impl Drop for DisplayOwner { fn open_x_display() -> Option { log::debug!("Loading X11 library to get the current display"); unsafe { - let library = libloading::Library::new("libX11.so").ok()?; + let library = find_library(&["libX11.so.6", "libX11.so"])?; let func: libloading::Symbol = library.get(b"XOpenDisplay").unwrap(); let result = func(ptr::null()); ptr::NonNull::new(result).map(|ptr| DisplayOwner {