Open jvandenbroek opened 6 years ago
Hey @jvandenbroek, could you try the nvidia
version of the image?
Hi , I actually tried that version.. Not sure why it's not working?
Try specifying a max size. Eg: scrcpy -m 1024
Tnx, but no change. I think it has to do with that I'm using the official Nvidia driver, not the open source one. Tried to figure out how to install this, but doesn't seem straightforward for Alpine. A well, may try it again later, probably need an image based on Debian or Ubuntu :)
for me specifying the max size works, I guess scrcpy doesn't like when the device is running a resolution higher than the one the X server is using. I also get those errors like
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
But since it works are these just red herrings?
However if you are getting errors with swrast_dri.so
that maybe means you are using software rendering and not actually nvidia drivers on the X server
% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
% nvidia-smi
Fri Oct 26 21:31:22 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.130 Driver Version: 384.130 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GT 710 Off | 00000000:01:00.0 N/A | N/A |
| 33% 64C P0 N/A / N/A | 252MiB / 979MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
+-----------------------------------------------------------------------------+
same error.
I used command
% docker run --rm -i -t --privileged \
-v /dev/bus/usb:/dev/bus/usb \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=$DISPLAY \
pierlo1/scrcpy:nvidia
to run image
having the same error here libGL error: unable to load driver: swrast_dri.so
I'm using Ubuntu in VirtualBox. The host system has a nvidia GPU. Got a similar error message:
/usr/local/share/scrcpy/scrcpy-server.jar: 1 file pushed. 3.9 MB/s (22470 bytes in 0.006s)
MESA-LOADER: failed to open vmwgfx (search paths /usr/lib/xorg/modules/dri)
libGL error: failed to load driver: vmwgfx
MESA-LOADER: failed to open swrast (search paths /usr/lib/xorg/modules/dri)
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 86
Current serial number in output stream: 85
Installing mesa-dri-swrast
& mesa-dri-vmwgfx
resolved it.
### runner (nvidia)
FROM runner AS nvidia
RUN apk add --no-cache mesa-dri-nouveau mesa-dri-swrast mesa-dri-vmwgfx
FWIW if anyone else hits this issue. I'm running on Alpine Linux v3.17 on latest WSl-2 and was missing
/usr/lib/xorg/modules/dri/swrast_dri.so
Doing
sudo apk add mesa-dri-gallium
fixed my issue prior to installing this I was getting:
glxinfo
name of display: :0
libGL error: MESA-LOADER: failed to open swrast: Error loading shared library /usr/lib/xorg/modules/dri/swrast_dri.so: No such file or directory (search paths /usr/lib/xorg/modules/dri, suffix _dri)
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 148 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 60
Current serial number in output stream: 61
Already fixed in a "newer" pull request. Still waiting for merge. See: https://github.com/pierlon/scrcpy-docker/pull/25
Tried this docker image on Xubuntu 17.10 amd64, but I get the following error when running scrcpy:
Some more info: