-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add support for nvenc and accel_assist #3320
base: devel
Are you sure you want to change the base?
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
stderr
in 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. |
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
stderr
in 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'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. |
No description provided.