{"id":18812371,"url":"https://github.com/chimeraos/gamescope-session","last_synced_at":"2025-04-04T09:09:24.643Z","repository":{"id":40572438,"uuid":"361554599","full_name":"ChimeraOS/gamescope-session","owner":"ChimeraOS","description":"ChimeraOS session on Gamescope - Own personal repository, issues and forks should be made on ChimeraOS/gamescope-session","archived":false,"fork":false,"pushed_at":"2024-10-16T12:13:43.000Z","size":201,"stargazers_count":142,"open_issues_count":1,"forks_count":43,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-24T17:53:19.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChimeraOS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-25T22:41:15.000Z","updated_at":"2024-10-23T08:44:31.000Z","dependencies_parsed_at":"2023-11-12T00:31:32.011Z","dependency_job_id":"f97cfc2e-4328-48d5-b432-6e378b2a8beb","html_url":"https://github.com/ChimeraOS/gamescope-session","commit_stats":{"total_commits":234,"total_committers":23,"mean_commits":"10.173913043478262","dds":0.6025641025641026,"last_synced_commit":"ea54a0dde53caef057be05f7b33c789d721bae32"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChimeraOS%2Fgamescope-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChimeraOS%2Fgamescope-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChimeraOS%2Fgamescope-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChimeraOS%2Fgamescope-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChimeraOS","download_url":"https://codeload.github.com/ChimeraOS/gamescope-session/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149502,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T23:32:29.872Z","updated_at":"2025-04-04T09:09:24.625Z","avatar_url":"https://github.com/ChimeraOS.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gamescope session plus based on Valve's [`gamescope`](https://github.com/Plagman/gamescope)\n\nThis project is not affiliated with Valve (inspiration was taken from\ntheir work on the Steam Deck). It is part of the ChimeraOS project, but\naims to be usable on any distribution. Please report issues to the issue tracker.\n\nNote that this project by itself does not provide any actual user session and only provides the common\nfiles needed by actual sessions such as https://github.com/ChimeraOS/gamescope-session-steam or https://github.com/ShadowBlip/OpenGamepadUI-session.\n\n## Installation\n\nA PKGBUILD for Archlinux is available [in the AUR](https://aur.archlinux.org/packages/gamescope-session-git).\n\n## Basic manual setup\n\nCopy this repository file structure into the appropriate places and you'll be\nable to start any available sessions on the Display Manager of your choice.\n\n# User Configuration\n\nThe session sources environment from `~/.config/environment.d/*.conf` files.\nThe easiest way to configure the session is to create `~/.config/environment.d/gamescope-session-plus.conf`\nand set variables there:\n\n```bash\n# Size of the screen. If not set gamescope will detect native resolution from drm.\nSCREEN_HEIGHT=2160\nSCREEN_WIDTH=3840\n\n# Internal render size of the screen. If not set, will be the same as SCREEN_HEIGHT and SCREEN_WIDTH.\nINTERNAL_WIDTH=1280\nINTERNAL_HEIGHT=800\n\n# Orientation adjustment of panel, possible values: left, right\nORIENTATION=left\n\n# Enable VRR\nADAPTIVE_SYNC=1\n\n# Treat the internal panel as an external monitor\nPANEL_TYPE=external\n\n# Set priority of display connectors\nOUTPUT_CONNECTOR='*,DSI-1'\n\n# Set the specific values allowed for refresh rates\nCUSTOM_REFRESH_RATES=40,50,60\n\n# Set the range of the refresh rate slider in the Steam client\nexport STEAM_DISPLAY_REFRESH_LIMITS=40,60\n\n# TODO: document\nDRM_MODE=fixed\n\n# Specify if you want to enable support for HDR content\nENABLE_GAMESCOPE_HDR=1\n# Set the target luminace of the inverse tone mapping process (option)\nGAMESCOPE_HDR_NITS=400\n\n# Override entire client command line\nCLIENTCMD=\"steam -steamos -pipewire-dmabuf -gamepadui\"\n\n# Override the entire Gamescope command line\n# This will not use screen and render sizes above\nGAMESCOPECMD=\"gamescope -e -f\"\n```\n\n# Creating a custom session\n\nLet's say we want to create a session that simply plays a video.\n\nFirst, we create `/usr/share/gamescope-session-plus/sessions.d/video` to define the session.\nThis file must define `CLIENTCMD` which specific the command to run as the main application of the session.\nIn this example we add:\n`CLIENTCMD=\"vlc my-video.mp4\"`\n\nWe can also define the `short_session_recover` function in this file which is called when the session fails to start.\n\nWe also need to create `/usr/share/wayland-sessions/gamescope-session-video.desktop`\ndefining the session so it appears as an option in our Display Manager/Login screen.\n\nIn our example, this could be:\n```ini\n[Desktop Entry]\nEncoding=UTF-8\nName=Video\nComment=A session to play a video\nExec=gamescope-session-plus video\nType=Application\nDesktopNames=gamescope\n```\n\nNote that the Exec must call `gamescope-session-plus` with the parameter value corresponding to the file that we placed under `/usr/share/gamescope-session-plus/sessions.d/`.\n\n\nSee https://github.com/shadowblip/opengamepadui-session for a real-life example of a gamescope session.\n\n\n## Window visibility\n\nIf you would like to run an arbitrary application in a gamescope session, prepare for a bit of an adventure.\n\nGamescope embedded mode (which is used by gamescope-session-plus) is tightly integrated with Steam. Your application will have to essentially emulate what Steam does when interacting with gamescope.\n\nSteam interacts with gamescope by setting properties on Xorg windows. By default, if you launch an application with the gamescope session by overriding the `CLIENTCMD` environment variable you may notice that you only see a black screen. That is because gamescope will only show windows when the `STEAM_GAME` property is present on the window. In most cases, all you will need to do is set this property on your application window to any value and the window should appear.\n\nOne way to do this is to use the ChimeraOS [gamescope-fg](https://github.com/ChimeraOS/chimera/blob/master/bin/gamescope-fg) tool to launch your application, like so:\n\n`gamescope-fg my-application arg1 arg2 ... argN`\n\nIf you are building a launcher or application that will use multiple windows, you should set `STEAM_GAME` to a value of `769` on your main window. This value indicates to gamescope that this is the main application running and is the value used by Steam for its own window.\n\nFor any other applications or windows that are opened you must set `STEAM_GAME` to any value (other than `769`) and gamescope will display those windows on top of your main window. Once the new window is closed, the main application will be displayed again. When launching games, Steam sets `STEAM_GAME` to the app id of the Steam game that is launched. There are several hacks in gamescope for specific games that rely on this id.\n\nTODO:\n - document how overlays work: i.e. `STEAM_OVERLAY` and `GAMESCOPE_EXTERNAL_OVERLAY`\n - document how to use multiple xwayland displays\n\n\n# License \u0026 Contributing\n\nThe project is licensed under MIT license. If you want to contribute,\njust do so and thank you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchimeraos%2Fgamescope-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchimeraos%2Fgamescope-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchimeraos%2Fgamescope-session/lists"}