Repository navigation
Fix Gamescope startup on Samsung Android 16 #2252
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -514,7 +514,17 @@ private void applyGamescopeEnv(Context context, EnvVars envVars, File rootDir) { | |
| envVars.put("LD_PRELOAD", preload.isEmpty() | ||
| ? gsDir + "/lib/libgndrm_shim.so" | ||
| : preload + ":" + gsDir + "/lib/libgndrm_shim.so"); | ||
| // The DRM shim pulls in Android's libandroid.so. On Samsung that reaches the | ||
| // system libsqlite.so, which must bind to the matching BoringSSL libcrypto | ||
| // instead of the OpenSSL copy in the imagefs. | ||
| String gamescopeLibPath = gsDir + "/lib"; | ||
| File systemCrypto = new File("/system/lib64/libcrypto.so"); | ||
| if (systemCrypto.exists()) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: The Prompt for AI agents |
||
| File systemLibDir = new File(context.getFilesDir(), "gamescope_system_libs"); | ||
| systemLibDir.mkdirs(); | ||
| FileUtils.symlink(systemCrypto, new File(systemLibDir, "libcrypto.so")); | ||
| gamescopeLibPath = systemLibDir.getPath() + ":" + gamescopeLibPath; | ||
|
Comment on lines
+525
to
+526
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔎 Supported by static analysis
Only prepend
🧰 Tools
|
||
| } | ||
| String libPath = envVars.get("LD_LIBRARY_PATH"); | ||
| envVars.put("LD_LIBRARY_PATH", libPath.isEmpty() ? gamescopeLibPath : gamescopeLibPath + ":" + libPath); | ||
| // gamescope execvp's gamescopereaper and wlroots spawns xkbcomp. | ||
|
|
||
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.
P2: The guard checks only that
/system/lib64/libcrypto.soexists, while the comment and PR describe a Samsung-specific failure. Either narrow the condition to the Samsung case or correct the comment. As written, non-Samsung devices get the shadow too.Prompt for AI agents