Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with latest parsec #4

Open
chroniceel93 opened this issue Jun 30, 2018 · 13 comments
Open

Issue with latest parsec #4

chroniceel93 opened this issue Jun 30, 2018 · 13 comments

Comments

@chroniceel93
Copy link

chroniceel93 commented Jun 30, 2018

All of this is running on manjaro KDE, with intel graphics(made sure to update!)
Parsec versions 146-18 and onwards require libva2 instead of libva1...
Since Ubuntu 16.04 simply does not have libva2, I changed the docker file as such
Line 3: FROM Ubuntu 16.04
to : FROM Ubuntu 18.04
Line 23: libva1
to : libva2
Lines 24-26: libva1
to : libva
2
after building Dockerfile successfully, parsec falls back to software again, but it prints some stuff that may be useful!
Console does this:
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns -1
libva info: User requested driver 'vdpau'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so
libva info: va_openDriver() returns -1

Any help? I can still use the one provided, but I would rather use the latest version of parsec... for HEVC!

@thochra
Copy link

thochra commented Jul 3, 2018

Hello I'm currently giving a try to parsec and found your issue interesting 😋

After installing vainfo I observed this:

root@6de0d8aec8aa:/home/parsec# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.1.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointStats
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointStats
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointStats
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice

But if you use the parsec user then we can see that VA will act differently: root@6de0d8aec8aa:/home/parsec# su parsec

parsec@6de0d8aec8aa:~$ vainfo
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit

So my current solution is to use the root user if it doesn't work.
I did not checked the reason and as I'm still testing the parsec service it's sufficient for me.

My Dockerfile:

## Local build command:
# docker build -t docker-parsec:latest .

## Allow X server connections (Some may need to run the next command if they see "No protocol specified. Segmentation fault (core dumped)")
# xhost +

## Start parsec
# sudo docker run -it --rm -e PULSE_SERVER=unix:/run/user/1000/pulse/native -e DISPLAY=unix:0.0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse --device=/dev/dri:/dev/dri docker-parsec:latest

## If you see a warning about software decoding then use root user
# sudo docker run -it --rm -e PULSE_SERVER=unix:/run/user/1000/pulse/native -e DISPLAY=unix:0.0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse --device=/dev/dri:/dev/dri -u root docker-parsec:latest

FROM ubuntu:18.04

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y \
    libcairo2 \
    libfreetype6 \
    libgdk-pixbuf2.0-0 \
    libgl1-mesa-glx \
    libgl1 \
    libglib2.0-0 \
    libgtk2.0-0 \
    libpango-1.0-0 \
    libpangocairo-1.0-0 \
    libsm6 \
    libsndio6.1 \
    libxxf86vm1 \
    pulseaudio-utils \
    libgl1-mesa-glx \
    libgl1-mesa-dri \
    xserver-xorg-video-intel \
    # i965-va-driver \
    va-driver-all \
    libva2 \
    libva-x11-2 \
    libva-glx2 \
    vainfo


ADD https://s3.amazonaws.com/parsec-build/package/parsec-linux.deb parsec-linux.deb
RUN dpkg -i parsec-linux.deb

RUN useradd -ms /bin/bash parsec
USER parsec
WORKDIR /home/parsec

CMD /usr/bin/parsecd

@chroniceel93
Copy link
Author

chroniceel93 commented Jul 4, 2018

I wonder how, exactly, running parsec as sudo on docker (not parsec on docker as sudo).
I'm not disputing the fact that it works, it does. My problem is that I can't think of a good reason as to why it works...

@chroniceel93
Copy link
Author

Further investigation shows that when running parsec as sudo on docker, it automatically falls back to software! It does not even try to use the hardware decoder!
Good news: Everything makes sense now, stuffs broke
Bad news: Still no hardware acceleration (my laptop is too slow for software)

@jribal
Copy link

jribal commented Sep 18, 2018

Hi, I have the solution.
parsec user needs to be part of the video group to access dri device.
usermod -a -G video parsec

I found success when I added this in docker file after useradd.
RUN usermod -a -G video parsec

Tested on Intel pentium n3700 and debian testing.

@jribal
Copy link

jribal commented Sep 21, 2018

After more testing I found the app_daemon not accessible from the web interface and missing gamepad support. I could fix them both.
The remaining issue is that device in /dev/input inside the container are not updated, you have to restart the container when you plug or unplug.
I also found GID between host and guest do not match. On my debian input is 106 while input has a different number in ubuntu, I had to force a chown inside the container at runtime.

The clean way to avoid chown would be to use something like fixuid .

Here's my solution :
docker run -it --rm --name=parsec -e PULSE_SERVER=unix:/run/user/1000/pulse/native -e DISnix:0.0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse --device=/dev/dri:/dev/dri --device=/dev/input:/dev/input --net=host e959fbba5c8d

## Local build command:
# docker build -t docker-parsec:latest .

## Allow X server connections (Some may need to run the next command if they see "No protocol specified. Segmentation fault (core dumped)")
# xhost +

## Start parsec
# sudo docker run -it --rm -e PULSE_SERVER=unix:/run/user/1000/pulse/native -e DISPLAY=unix:0.0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse --device=/dev/dri:/dev/dri docker-parsec:latest

## If you see a warning about software decoding then use root user
# sudo docker run -it --rm -e PULSE_SERVER=unix:/run/user/1000/pulse/native -e DISPLAY=unix:0.0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse --device=/dev/dri:/dev/dri -u root docker-parsec:latest

FROM ubuntu:18.04

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y \
    libcairo2 \
    libfreetype6 \
    libgdk-pixbuf2.0-0 \
    libgl1-mesa-glx \
    libgl1 \
    libglib2.0-0 \
    libgtk2.0-0 \
    libpango-1.0-0 \
    libpangocairo-1.0-0 \
    libsm6 \
    libsndio6.1 \
    libxxf86vm1 \
    pulseaudio-utils \
    libgl1-mesa-glx \
    libgl1-mesa-dri \
    xserver-xorg-video-intel \
    # i965-va-driver \
    va-driver-all \
    libva2 \
    libva-x11-2 \
    libva-glx2 \
    vainfo


ADD https://s3.amazonaws.com/parsec-build/package/parsec-linux.deb parsec-linux.deb
RUN dpkg -i parsec-linux.deb

RUN useradd -ms /bin/bash parsec
RUN usermod -a -G video parsec
RUN usermod -a -G input parsec
USER root
WORKDIR /home/parsec

CMD chown -R root:input /dev/input/ && su parsec -c "/usr/bin/parsecd app_daemon=1"

@jgillich
Copy link

jgillich commented Jan 7, 2019

@jribal How did you fix the daemon not being accessible from the web interface? I tried your config with --net=host but that doesn't work for me. :(

@jribal
Copy link

jribal commented Jan 7, 2019

HI, @jgillich.
I moved from debian to ubuntu 18.04.
Yo made me dig into this again and It still works for me.

When I start the container it looks like everything hangs then I get logs when the browser starts to communicate with the daemon.
Do you have any logs ?
Try another browser, I had issues with firefox not picking the daemon in the past.

@jgillich
Copy link

jgillich commented Jan 7, 2019

No there's no output at all. I've converted the deb with alien and that works for me.

@PratibhaMGoudar
Copy link

<img width="277" alt="image" src="https://user-images.githubusercontent.com/61819049/227460455-d31097a7-9341-4099-ae5d-016c240992a6.png"

plz need help
Thank you !!!

@kajmaj87
Copy link
Owner

Can you describe your issue better? And fix the link?

@PratibhaMGoudar
Copy link

@kajmaj87 while running the client example it's showing XGD runtime not set

@kajmaj87
Copy link
Owner

Did you try using the flatpak version of parsec? I didn't use this dockerimage a long time and I'm not supporting this anymore as the flatpak works without any issues for me.

@PratibhaMGoudar
Copy link

PratibhaMGoudar commented Mar 27, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants