-
Notifications
You must be signed in to change notification settings - Fork 571
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
gamemoderun doesn't work with firejail #5035
Comments
Typo in comment or in real filename? |
Yes, sorry there is a typo in comment, the file on disk is properly named
|
Does it work if you comment
|
No, I have the same result when commenting those lines. I tried looking at the running processes.
I also checked for any
Seems gamemoded is not able to register the PID process, so I tried with a manual request as well:
And journalctl shows the same error again:
I'm not sure where the permission error is coming from, I'm running everything with the same user here. |
If this is caused by the pid namespace, you can give up. Does |
Yes, it works with the |
Can you confirm that |
Indeed, passing the --ignore=noroot option allows gamemode to run
Also, I noticed that whenever gamemode works correctly (with or without firejail), I have this line in my system logs for the
Not sure if this is related. |
Is there a way to debug this? I'm trying to understand why it doesn't work then |
Does |
Yes it works, gamemode is active when running |
Ok, so it's not caused by userns in general but instead by firejail's implementation. When I run Is this something we can change? @smitsohu That's also the cause for flatpak/xdg-desktop-portal#737. |
Related: #3727 and possibly more. What could be done on our end is creating the user namespace with user privileges where possible, falling back to root only if that fails. |
EDIT: This is broken because
|
Also related: #4623 |
I'm also running into this, except I am having this with the Steam profile. Once a solution has been made for this, will this also be applicable for using firejail with steam and gamemoderun, so that when you launch a game through Steam gamemode will be active when being used with firejail? |
@Hydranet $ cat ~/.config/firejail/steam.local
# Required by gamemoderun
# steam.profile doesn't 'include disable-shell.inc'
#include allow-bin-sh.inc
ignore noroot
# steam.profile doesn't enable 'private-bin' by default
#private-bin bash,env,gamemoderun
# steam.profile doesn't enable D-Bus filtering
#ignore dbus-user none
#dbus-user filter
#dbus-user.talk com.feralinteractive.GameMode After creating the above file, try running HTH |
@glitsj16 Thanks for your response!
When I check those values on my system I get these.
|
Not sure if that's really a 'new' requirement. I'd try to pin-point the offending line(s) in the steam profile to see what else it needs. Some 'possible candidates' are firejail/etc/profile-m-z/steam.profile Lines 165 to 169 in 3f4d6df
You'll have to experiment a bit here. |
Thanks, I'll try experimenting with that and report back here if I get it to work. |
@glitsj16 I got it to work with Just one question, since |
Nice!
The In general it's a good thing to look at the content of the profiles. Agreed, it can take some time and effort to familiarize oneself with their syntax, structure etc. But after a while you'll be in a much better position to make the kind of Happy sandboxing! |
Thanks for the explanation!
Thanks again for your help and thanks for Firejail! |
With reference to the firejail and gamemoderun discussion, I tried running gamemoderun on glxgears instead of supertuxkart for testing.
I'm on EndeavourOS (Arch-based) running firejail version 0.9.68
In my
~/.config/firejail/supertuxcart.local
file I have added glxgears to the private-bin:Then I ran the command
Which produced the following output:
In a separate terminal window I checked
gamemoded -s
but it always gives meRunning
gamemoderun /usr/bin/glxgears
will work as expected though and I'll seegamemode is active
.I'm not sure what next to check it seems this should just work with those config. Maybe dbus communication is not working as expected?
The text was updated successfully, but these errors were encountered: