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
Add Feral GameMode as module #173
Conversation
bot, build |
@valentindavid opinions? |
Asked some defining questions in linked issue |
I don't think the one header is enough, the build script detects it through pkgconfig. |
Ok. We just discussed this, we probably need to bundle libsystemd in the app as a result of this. However, the "do not compile daemon" part still applies |
May need to grab relevant stuff from here https://www.freedesktop.org/software/systemd/ |
Why not just build systemd? Without binaries and units stuff, it would be pretty small. |
Yes, that's what I was trying to say. Libsystemd is released as part of systemd, apparently |
It's by the way also possible to use tarballs from https://github.com/FeralInteractive/gamemode/releases for gamemode; the build system uses fairly efficient caching for HTTP downloads |
The CI system apparently most likely doesn't preserve Git repos so using Git directly means full clone on every build from Github |
We just had a discussion: to prevent forgeries if you really need direct Git, either hash or both tag and hash need to be used. I think in this case we don't need direct Git and it might even be more efficient for the builder infrastructure. |
@gasinvein I'll check that pull request tomorrow and merge it. @nanonyme I used git just because "Source code" on that Releases page didn't have inih subproject (submodule) included. Apparently I could have used those .tar.xz packages instead. I will change that. Should I squash new changes or do you want to preserve history? |
@gasinvein added a feature branch so you don't need to do PR's into each other's repos. I can also trigger test builds if you do PR's to the feature branch. I think Git should be smart enough that you can do the libsystemd module separately from gamemode module |
@Tomin1 history is fine, I don't mind |
@Tomin1 that's of course if you don't mind about the work division. The CI system can't be run on @gasinvein's changes unless they're against this repo |
Shoud I reopen PR against this repo?
|
Please do, otherwise we can't really know if the builder likes it or not |
Preferably without changes from @Tomin1 |
bot, build |
This comment has been minimized.
This comment has been minimized.
bot, build |
@Tomin1 please rebase in the morning |
(it would probably work but as I was disappointed to find out, test build does not test actual merged result but instead just the PR) |
@nanonyme this PR merges and builds just fine. Why need rebase? |
Rebased on top of flathub:feature/gamemode. I hope this is what you wanted. This doesn't build on my computer because the systemd build fails for some reason. It's a bit odd. |
@Tomin1 that's strange. Can you please provide build log? |
@gasinvein Edit: sorry, this was missing stderr. Here: My guess is that systemd can't handle other prefixes. And that's just because you usually don't want to build it to anywhere else than /usr so they have not tested it. |
I can't find any difference here with my or bot's log, except for lines order. Can you try a single-threaded build (
It has option |
If it's a concurrency issue, we should probably set that switch in manifest. |
Are you sure? I guess all our build were concurrent, and I also did local build with different number of threads, without errors.
|
I did actually hit that same error locally but not through Flathub build system. I assumed the issue was related to me running Flatpak variant of flatpak-builder |
Did you try non-flatpacked flatpak-builder?
|
No, was too hard to install at that point to Silverblue due to 1.0.0 release of Flatpak as Flatpak is a protected package there |
The machine is 8 core though so might well provoke concurrency issues |
The machine is 8 core though so might well provoke concurrency issues
I have 8 logical cores, too. Also tried with 1 and 4 concurrent jobs.
|
@Tomin1 does setting sysconfigdir=/app/etc help any? |
I would verify myself but currently over cell phone |
does setting sysconfigdir=/app/etc help any?
Alredy suspected that and added appropriate two lines. Should I open new PR?
|
Nah, no point if you can't reproduce it anyway |
@nanonyme Didn't make any difference. I don't think it's a concurrency issue either, --jobs 1 doesn't help. |
Sorry, sysconfdir, not sysconfigdir |
Fixes the issue for me |
Can you please rebase again, I added the fix to the branch? |
This adds GameMode version 1.2 as a module. GameMode requires libsystemd. GameMode allows games to request software configuration that improves performance. Currently it can set CPU governor and change scheduler options.
bot, build |
I just realized this might only be half of the solution. We're currently only building 64bit gamemode and libsystemd |
True. Although probably all games that may really benefit from gamemode are 64 bit. |
I'm fine with this and if anyone complains, we can add the 32bit one. I'm not 100% sure if we have a proper environment for cross-compiling per-app 32bit things anyway at this point. |
I just realized this might only be half of the solution. We're currently only building 64bit gamemode and libsystemd
Interesting point. Is there any good way to bundle foreign arch libs in an app? I guess we will need an extension.
|
I don't think that gamemode builds 32 bit libraries on 64 bit systems at all. If you use bootstrap.sh, it will install libgamemode.so to /usr/lib64. |
There's probably some way to cross-compile. Anyway, the SDK currently doesn't support building 32bit app modules for 64bit apps. Currently talking with runtime maintainers on whether that could be made possible since we definitely do have use-cases for it. |
Per #77.
This adds GameMode version 1.2 as a module. It doesn't build yet because
it requires libsystemd headers that are not available. GameMode requires libsystemd (it's not optional), particularly systemd/sd-bus.h header. See FeralInteractive/gamemode#15.
You can get this build a bit further by changing line 39 on meson.build to have required: false (with a patch for example) but it will still fail when building. I also think it uses libsystemd to communicate which means that the library needs to be present.