stm32_tiny_monitor
stm32_tiny_monitor copied to clipboard
fast_host.py and slow_host.py don't work on Arch Linux
fast_host.py
------------- [ initialize ] -------------
Device not found... Connect device
Device Found!!
Setting device configuration...
ERROR: USBError occured. Re-connect the device...
---------------- [ end ] ----------------
------------- [ handshake ] -------------
ERROR: USBError occured. Re-connect the device...
---------------- [ end ] ----------------
------------- [ stream start ] -------------
Streaming started...
Traceback (most recent call last):
File "/home/enginar/git-repos/stm32_tiny_monitor/host_python_scripts/fast_host/start_host.py", line 1, in <module>
import fast_host
File "fast_host.pyx", line 146, in init fast_host
initialize()
File "fast_host.pyx", line 141, in fast_host.initialize
stream_out(usb_device)
File "fast_host.pyx", line 101, in fast_host.stream_out
img = Image.frombytes('RGB', (w, h), sct.grab(monitor).rgb) # <-- mss is way fater than pyautogui
File "/usr/lib/python3.10/site-packages/mss/base.py", line 88, in grab
return self._grab_impl(monitor)
File "/usr/lib/python3.10/site-packages/mss/linux.py", line 446, in _grab_impl
ximage = self.xlib.XGetImage(
File "/usr/lib/python3.10/site-packages/mss/linux.py", line 191, in validate
raise ScreenShotError(err, details=details)
mss.exception.ScreenShotError: XGetImage() failed
~/git-repos/stm32_tiny_monitor/host_python_scripts/f
slow_host.py
------------- [ initialize ] -------------
TinyMonitor Found... :)
Setting device configuration...
ERROR: USBError occured. Re-connect the device...
---------------- [ end ] ----------------
------------- [ handshake ] -------------
ERROR: USBError occured. Re-connect the device...
---------------- [ end ] ----------------
------------- [ stream start ] -------------
Streaming started...
Traceback (most recent call last):
File "/home/enginar/git-repos/stm32_tiny_monitor/host_python_scripts/slow_host/host.py", line 144, in <module>
initialize()
File "/home/enginar/git-repos/stm32_tiny_monitor/host_python_scripts/slow_host/host.py", line 139, in initialize
stream_out(usb_device)
File "/home/enginar/git-repos/stm32_tiny_monitor/host_python_scripts/slow_host/host.py", line 99, in stream_out
img = Image.frombytes('RGB', (w, h), sct.grab(monitor).rgb) # <-- mss is way fater than pyautogui
File "/usr/lib/python3.10/site-packages/mss/base.py", line 88, in grab
return self._grab_impl(monitor)
File "/usr/lib/python3.10/site-packages/mss/linux.py", line 446, in _grab_impl
ximage = self.xlib.XGetImage(
File "/usr/lib/python3.10/site-packages/mss/linux.py", line 191, in validate
raise ScreenShotError(err, details=details)
mss.exception.ScreenShotError: XGetImage() failed
That's weird. Unfortunately I don't have Arch Linux installed at this moment. I'll try to install it using virtual box and test the script.
Can you test on debian based system? Since I tested it only on Ubuntu/kubuntu
When I have the time I'll give this a chance, thank you!
Hi, I'm just curious if you could solve this issue.
I found a github issue about similar problem: https://github.com/mozilla/iris/issues/621
Apparently, if your system is using Wayland instead of X11, this problem might occur.
Unfortunately I switched to a Mac a month ago, so I'm unable to reproduce the issue. I was using X11 at the time though.
No problem.. Thanks for the confirmation.