rien / reStream

Stream your reMarkable screen over SSH.
MIT License
732 stars 56 forks source link

Blank/white screen when using WSL 2 #61

Closed mikeseese closed 3 years ago

mikeseese commented 3 years ago

I'm using WSL 2 with Ubuntu (I read #24 and installed any missing dependencies from there), and the script starts fine and a window shows. However, my window is just a blank white screen. It seems like the first frame may be a valid frame, but subsequent frames just are showing up as blank/white

The console output seems normal:

$ ./restream.sh
[SSH] true
[SSH] cat /sys/devices/soc0/machine
[SSH] [ ! -f ~/restream ] && [ ! -f /opt/bin/restream ]
[SSH] PATH="$PATH:/opt/bin/:." restream -h 1872 -w 1408 -b 2 -f /dev/fb0
ffplay version 4.2.4-1ubuntu0.1 Copyright (c) 2003-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, rawvideo, from 'pipe:':  0KB vq=    0KB sq=    0B f=0/0   
  Duration: N/A, start: 0.000000, bitrate: 1054310 kb/s
    Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le, 1408x1872, 1054310 kb/s, 25 tbr, 25 tbn, 25 tbc

I'm trying to see if this is a WSL specific issue and see if I can get it to work with Windows, but not sure if I'm going to get everything working tonight since Windows isn't great for this kind of stuff haha.

a-bro commented 3 years ago

Seeing the exact same issue. Quick flash of a valid frame, then an all white window. Switched from using VcXsrv to x410 and it worked without issue.

mikeseese commented 3 years ago

@a-bro I can't seem to get any screen outputting to x410.

I get:

X Error of failed request: GLXBadContext Major opcode of failed request: 147 (GLX) Minor opcode of failed request: 6 (X_GLXIsDirect) Serial number of failed request: 87 Current serial number in output stream: 86

DISPLAY is set to 172.28.32.1:0.0 (generated using export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0)

And x410 has the "Allow Public Access" setting checked.

Any configuration I'm not doing properly?

a-bro commented 3 years ago

Yep I saw this as well, worked for me after unsetting the LIBGL_ALWAYS_INDIRECT env variable which had been suggested to be set in some other threads. Actually, I just tried VcXsrv again with that variable disabled and it seems to work as well, so maybe that was the problem the whole time.

mikeseese commented 3 years ago

Thanks!

I was also able to get VcXsrv to work by disabling Native opengl in the settings for VcXsrv and unset LIBGL_ALWAYS_INDIRECT in the WSL environment

I'm closing as I don't believe this is necessarily a fix needed for restream as the workaround is fine for me