Skip to content
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

[bisected] -O option breaks embedded mode (Steam client can't start from TTY) #241

Closed
Samsagax opened this issue Aug 26, 2021 · 14 comments
Closed
Assignees
Labels
bug Something isn't working embedded Embedded mode via DRM/KMS next Probably a good next thing to fix?

Comments

@Samsagax
Copy link

Using gamescope-session running steam client from TTY as a systemd unit with this command line:

$ /usr/bin/gamescope -e -f -- steam -tenfoot -steamos -fulldesktopres

Steam client does not start and gamescope outputs this:

No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
00:00:00.000 [INFO] [backend/session/logind.c:572] Selecting session from XDG_SESSION_ID: c21
00:00:00.002 [INFO] [backend/session/logind.c:706] Successfully loaded logind session
drm: Connectors:
drm:   DP-1 (disconnected)
drm:   DP-2 (disconnected)
drm:   DP-3 (disconnected)
drm:   HDMI-A-1 (connected)

And nothing more.

Works with gamescope commit 8f733a4.

Bisect log:

$ git bisect log 
git bisect start
# bad: [3b14c21afc90884f7cbe8f5205cfe76af86528db] Simplify errorf_errno a bit
git bisect bad 3b14c21afc90884f7cbe8f5205cfe76af86528db
# good: [8f733a415540131b3bd62501bf6767400010c049] rendervulkan: add error logging to init_device
git bisect good 8f733a415540131b3bd62501bf6767400010c049
# bad: [a54b5c9ee010c1c87dfc4c3c0b9c2d04297d60da] Introduce basic logging module
git bisect bad a54b5c9ee010c1c87dfc4c3c0b9c2d04297d60da
# bad: [cba189d389c42dbeb0a18a5072def97ac89179b5] drm: allow wildcard in connector priority list
git bisect bad cba189d389c42dbeb0a18a5072def97ac89179b5
# bad: [51cfc0df061c83fb546dd43ffc8f386de8264810] Implement priority list for -O
git bisect bad 51cfc0df061c83fb546dd43ffc8f386de8264810
# first bad commit: [51cfc0df061c83fb546dd43ffc8f386de8264810] Implement priority list for -O
@Plagman
Copy link
Member

Plagman commented Aug 31, 2021

Does it require -O to select any connectors now @emersion ? @Samsagax , can you try -O * and -O HDMI-A-1 to see if both unblock you?

@Plagman Plagman added the next Probably a good next thing to fix? label Aug 31, 2021
@Samsagax
Copy link
Author

Thanks for the response @Plagman. -O * seems to be required. Adding it to my startup command passes that message but still the session won't start.

Here is the output

Maybe the -O option needs to default to *?

Still won't start though. Reverting to the mentioned last good commit fixes the issue.

@emersion
Copy link
Collaborator

Yes, gamescope should do the Right Thing by default, will fix!

@Samsagax
Copy link
Author

On further inspection, from this line of the output seems to be failing in the execvp step of the steamcompmgr. How I would go about debugging this?

@emersion
Copy link
Collaborator

Hm, that's weird. execvp will fail if the command doesn't exist.

@Plagman
Copy link
Member

Plagman commented Aug 31, 2021

I can also confirm -O * is needed on master, and then it runs into the same execvp failed: No such file or directory error.

@Samsagax
Copy link
Author

Maybe is an error in parsing input? The command steam most certainly exist on my machine :)

@emersion
Copy link
Collaborator

emersion commented Sep 1, 2021

Ah, I think this happens because of shell expansion shenanigans. Can you try quoting with -O '*'?

@emersion emersion added embedded Embedded mode via DRM/KMS bug Something isn't working labels Sep 1, 2021
@Samsagax
Copy link
Author

Samsagax commented Sep 1, 2021

Current git build worked great for me with no -O option. So that issue is solved. However if I quote the * like -O '*' (even escaping the single quotes) still get the execvp error. Wouldn't it be better just removing that option entirely since is the default behaviour anyway?

@emersion
Copy link
Collaborator

emersion commented Sep 1, 2021

-O is useful for other things, setting a preference for the KMS output to use.

@Samsagax
Copy link
Author

Samsagax commented Sep 1, 2021

-O is useful for other things, setting a preference for the KMS output to use.

Yeah, I'm sure it is. That's not what I meant. I meant to remove the * argument for the -O option, not the -O option entirely. As it causes problems , maybe is better to change * for a generic term like any.

@Plagman
Copy link
Member

Plagman commented Sep 2, 2021

I can repro the execvp spew and gamescope getting SIGINT when any -O is passed, trying to debug.. at first glance execvp doesn't seem to be happening in gamescope itself.

@Plagman Plagman reopened this Sep 2, 2021
@Plagman Plagman self-assigned this Sep 2, 2021
@Samsagax
Copy link
Author

Samsagax commented Sep 2, 2021

I can repro the execvp spew and gamescope getting SIGINT when any -O is passed, trying to debug.. at first glance execvp doesn't seem to be happening in gamescope itself.

Seems to be happening when spawning the client (in this case Steam itself) circa this line: https://github.com/Plagman/gamescope/blob/8782dc2cd110ef169e7d5abf5e40c94763bf7a05/src/steamcompmgr.cpp#L3182

@emersion
Copy link
Collaborator

emersion commented Sep 3, 2021

Should be fixed with 5e66e9c.

@emersion emersion closed this as completed Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working embedded Embedded mode via DRM/KMS next Probably a good next thing to fix?
Projects
None yet
Development

No branches or pull requests

3 participants