mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6645] steam-session & firejail (steamos, other distros) #3322
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3322
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @slynobody on GitHub (Feb 9, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6645
Description
problems when using firejail with steam through gamescope-session ("Steam gaming-mode / ControllerUI / BigPicture"):
Steps to Reproduce
Steps to reproduce the behavior
Expected behavior
steam-controller recognized and actived
screen-brightness supported
Actual behavior
Behavior without a profile
steam-controller recognized and actived
screen-brightness supported
Additional context
debian / gamescope / gamescope-session
Environment
firejail --version): 0.9.72Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)@kmk3 commented on GitHub (Feb 10, 2025):
There have been many changes since 0.9.72.
Does it work with firejail-git?
@kmk3 commented on GitHub (Feb 10, 2025):
Is the entire session running under firejail under sddm?
Do these issues occur with firejailed steam under a normal desktop session?
Also, please post the logs of running firejail.
@slynobody commented on GitHub (Feb 10, 2025):
Thank you very much for your fast response!
could you please point me to an option to see logs? i dont see any in standard output yet, only gamescope-/mangoapp-/steam- related
as far as i can see only the steam-part of the session is (and should be) running under firejail.
The described issues occur also with a firejailed steam, yes (incl. mangohud + gamescope in the loop) under a normal kde-desktop session (runnig gamescope-session-script from konsole).
i tried compiling the latest firejail from git (now /usr/local/ (incl. /usr/local/etc) is used while the distro is using /usr/bin and /etc)
with the default steam.profile when starting the steam-session i now get an early error that user-namespaces need to be enabled. i enabled them already in /usr/local/etc/firejail/firejail.config by explicitly unmarking 'userns yes'?
if i use --noprofile, i dont see this error-message?
@kmk3 commented on GitHub (Feb 10, 2025):
No problem.
I don't know, you'd have to check in the sddm configuration to see where the
logs are written to (if any).
If it's hard to find, you could try to tell sddm to execute a script as the
session and do something like the following in the script:
Then check log.txt.
So let's try just using steam under a normal session first, as it's the more
common scenario and easier to debug.
Unprivileged user namespaces also need to be enabled system-wide.
Temporarily:
Persistently:
You can check if it's enabled with:
--noprofiledisables most security features; it is mostly equivalent to notusing firejail and is intended to see if an issue is due to the profile or
firejail itself.
@slynobody commented on GitHub (Feb 11, 2025):
Thank you! But
kernel.unprivileged_userns_clone=1does not change anything.It seems to be related to:
I tried putting
noblacklist /usr/bin/bwrapinsteam.profile(andsteam-runtime.profile)also putting
bwraptoprivate-binseccompis!chroot,!mount,!name_to_handle_at,!pivot_root,!process_vm_readv,!ptrace,!umount2nonewprivsis offOutput is the same:
EDIT:
You can work around this when commenting the
private-binpart of the .profile.In my perspective (and with my configuration) it is nearly impossible to get a gamescoped and mangohudded steam-gamingmode-session to work with the .profile provided: (steam seems to have changed a whole bunch of things in the last half year when started as session. Also there are differences in starting steam in deskop-mode what directly triggers the profile, the session-scripts are nasty, sometimes I had the impression they started with firejail installed because steam got started without firejail through them somehow)
Some impressions:
norootseems to now hinder a variety of games of even starting (incl. the last of us)private-tmpin conjuction withcaps.drop alldo kill the mangohud overlaysnou2fkills steam-controller-supportnogroupsseems to be at the top of options hindering changing screen-brightness (does not work even if you just use--noprofilewithout anything else). I have the main user here in the video group and he has access to /sys/class/backlight which seems to be killed as default. Would be great to know something to enable at last this with firejail installed in a gamescoped steam-session.@kmk3 commented on GitHub (Feb 12, 2025):
Overall, there are multiple complicating factors here:
complication due to it potentially needing to perform privileged actions)
access to paths that are not commonly used on PC)
Can you test steam under a KDE Plasma session (and specify whether it's X11 or
wayland) on a desktop/laptop to see which problems are with the steam program
itself and which problems are due to SteamOS/steam-session/steam-deck?
Ideally under Arch if possible, as it's the basis for SteamOS.
@kmk3 commented on GitHub (Feb 12, 2025):
private-binis not enabled in steam.profile.Are you sure that you're using an unmodified /etc/firejail/steam.profile from
firejail-git?
That is, other than putting the profile modifications that you mention in
~/.config/firejail/steam.local.
Possibly related:
norootremoves most groups, so maybe the user would need to be in additionalgroups.
Interesting, any idea what is used from /tmp?
You can check which paths it accesses with
--trace=.Example:
This is more or less expected if the controller needs access to
/dev/hidrawX.Feel free to disable.
This is probably due to /sys paths being blocked by default (with a few
exceptions).
@slynobody commented on GitHub (Feb 12, 2025):
thank you for your help!
Generic steam.profile (as well as steam.local) in the current state needed to be adapted to the specific config (steam/mangoapp/gs-session -- while underlying base: simply not steamos or arch). i got it working that way again, not perfect but workable (while not as locked as plain desktop-steam) though adapted steam.profile / steam.local (a whole bunch of entries needed to be commented out and some new lines added).
would be great to know how to:
/systhrough some firejail-option(s) though (as well as raising the rest again, esp. the part ofnorootthrough groups and / or puttingcaps.drop allbackif someone has some insight / examples on this would be great.
@kmk3 commented on GitHub (Feb 16, 2025):
(Re-closing as "not planned" since nothing was changed in firejail)
@kolAflash commented on GitHub (Feb 17, 2025):
https://github.com/netblue30/firejail/issues/6645#issuecomment-2650165839
norootalso breaks theAdd a Non-Steam gamebutton (tested on Debian-12, KDE).@kmk3 commented on GitHub (Feb 19, 2025):
Hello, please open a new bug report:
This issue mentions multiple problems and is mostly about the Steam Deck.
@slynobody commented on GitHub (Feb 25, 2025):
not completely true. The situation and solution i am elaborating on is tested on the steamdeck (working) but should be workable on other machines as well (gamescope-session to steam incl. mangoapp & hopefully support for generic screen-brightness-support)
@slynobody commented on GitHub (Mar 16, 2025):
btw: after using firejail on stock steamos (stable) i have reasonable doubts that the sum of all steam-connected profiles in the current form are really able to 'catch' also steamos-session-scripts or 'kick-in' when Steam is started in gaming-mode on steamos.
in other words: does firejail even work when it is installed on steamos when steam is started through gaming-mode (session)?
f.e. beside all specific tasks the stock steamos-steam-session is doing -- are you able to get steam to work with firejail with even the most simple commands a steamos-session would use (on steamos)?