ggez: ggez doesn't work with optimus (`optirun`)
Describe the bug
Ggez seems to not work on optimus systems on discrete GPU. Program fails on call ContextBuilder::build (NOTE: build don’t return error, program just fails)
To Reproduce
- create a simple project with this in main.rs:
fn main() {
let cb = ggez::ContextBuilder::new("ggez_optimus", "Waffle");
println!("before build");
cb.build().unwrap();
println!("after build");
}
- build it:
cargo build - run it with optirun:
optirun -v target/debug/ggez_optimusthe output will be like that:
[28698.115643] [INFO]Response: Yes. X is active.
[28698.115677] [INFO]Running application using virtualgl.
before build
Hardware and Software:
- ggez version:
0.5.0-rc.2 - OS: Arch Linux
- Graphics card:
GeForce MX150andMesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)I guess - Graphics card drivers:
nvidia/Mesa
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 57 (4 by maintainers)
Okay, the patch appears to work as intended. I’ll be sure to upstream it today/tomorrow. I’m back porting the commit in https://github.com/rust-windowing/glutin/pull/1199, when it’s merged and the new version is released, this should be fixed. Thanks.