-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
add support for nvenc and accel_assist #3320
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
Conversation
|
Fix some build issues with:- --- a/scripts/install_xrdp_build_dependencies_with_apt.sh
+++ b/scripts/install_xrdp_build_dependencies_with_apt.sh
@@ -74,6 +74,7 @@ case "$ARCH"
in
amd64)
PACKAGES_AMD64_MIN=" \
+ libepoxy-dev \
libpam0g-dev \
libssl-dev \
libx11-dev \
@@ -118,6 +119,7 @@ in
PACKAGES="$PACKAGES \
g++-multilib \
gcc-multilib \
+ libepoxy-dev:i386 \
$LIBFREETYPE_DEV:i386 \
libgl1-mesa-dev:i386 \
libglu1-mesa-dev:i386 \Also:-
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to merge this as-is, when CI is fixed.
| g_deinit(); | ||
| g_exit(0); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest adding error logging if this doesn't work, for triaging user issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't t think the log ing system is initialized at this point. Can we still log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're quite right. Calling LOG() won't work.
Two possible solutions:-
- Log errors to
stderrin this function. This isn't ideal, but it will at least get picked up by the journal on systemd-based systems. - Use a separate function for this purpose (
g_cu_init()?) called explicitly from sesman after logging has started. We can remove it if you ever get a better answer as to why this function is required.
|
I don't want to hold up merging this, but I'd like to ask if we think the hack to call |
I tried to just call cuInit() in the session but as the user it fails. Once the call is made as root, something gets 'driver init' and then it will work as the user. I guess xrdp might not be running as root, is that right? Also, is this a security risk? |
|
I rebased this branch on current devel |
|
Should we make xrdp_accel_assit a compile time flag because with it, epoxy and gbm are required to build xrdp. We didn't need that before? Xorg, or at least the modesetting driver requires the run time libraries but now we require the development packages and the user may never plan to use xrdp_accel_assist. |
|
As far as the cuInit() goes, either sesman or sesexec runs as root. Since #2974, xrdp may not be running as root, and in fact it won't be on Debian/Ubuntu anyway - they patched it to run as non-root a long time ago. I think a compile-time option is the best way to go, for platforms that may not support NVidia acceleration (are there any?). |
done and done |
|
accel_assist is using environment variables set int sesman.ini, but I think it might be better to use gfx.toml. these are the current env vars. @metalefty can accell_assist use gfx.toml, does that make sense to use? XRDP_NVENC_RATE_CONTROL_MODE |
|
Yes, it looks good to me. |
matt335672
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment on recent changes. I'm still happy to merge this sooner rather than later and work in devel if that suits.
| g_deinit(); | ||
| g_exit(0); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're quite right. Calling LOG() won't work.
Two possible solutions:-
- Log errors to
stderrin this function. This isn't ideal, but it will at least get picked up by the journal on systemd-based systems. - Use a separate function for this purpose (
g_cu_init()?) called explicitly from sesman after logging has started. We can remove it if you ever get a better answer as to why this function is required.
df5b345 to
0f70f55
Compare
|
I'm good to merge this now and then continue work in devel. |
|
Fine by me - it will get more exposure that way. I've got #3346 to merge once @metalefty has looked at it, but it won't affect this at all. |
|
Agreed. |
|
could anyone help me with how to use this build option, I don't know how to set XRDP_NVENC_CFLAGS and XRDP_NVENC_LIBS or where to download them. |
|
I can help What NVIDIA card are you trying to use? |
|
➜ ~ nvidia-smi +-----------------------------------------------------------------------------------------+ I am using Quadro P2000 , after build xrdp, xorg with specific option, also modified the /etc/X11/xrdp/xorg_nvidia.conf, I still can not login to xrdp, following is log in xorg log. by the way, I have added user to groups render and video. ➜ ~ cat .xorgxrdp.11.log |
|
fortunately, after try login again, I can login to xrdp, and glxheas shows I am using L_RENDERER: Quadro P2000/PCIe/SSE2, but the fps output of glxgears is wired as following |
|
So you are good it seems. |
|
it's very strange, I uncommented the line and restart xrdp service, when i login again, I got following errors. And event I commented the line and try again, I got the same issue. |
1 similar comment
|
it's very strange, I uncommented the line and restart xrdp service, when i login again, I got following errors. And event I commented the line and try again, I got the same issue. |
|
after resintall xrdp and xorg, it works again, but uncommented the line seem no effect on my side. |
No description provided.