Screenshot capture is not working on Linux Ubuntu 22.04
mikkas70 opened this issue · 3 comments
Version
2.1.8
Short overview
Capturing a screen region using capture function is currently not working on Ubuntu 22.04 (did not test on older Ubuntu versions nor other Linux distros).
Detailed error description
The following error is triggered:
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 73 (X_GetImage)
Serial number of failed request: 7
Current serial number in output stream: 7
Steps to reproduce error
Create and run this simple script after libnut import:
libnut.screen.capture(1, 1, 10, 10);
Hey @mikkas70 👋
Ubuntu 22.04 defaults to Wayland instead of X11.
Unfortunately, libnut does not (yet) support Wayland, so to continue using it you'd have to switch back to Xorg:
@s1hofmann I was able to change to X11 and screen captures are working again, thank you.