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

Add Feral GameMode as module #173

Merged
merged 2 commits into from Aug 27, 2018
Merged

Conversation

Tomin1
Copy link
Contributor

@Tomin1 Tomin1 commented Aug 25, 2018

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.

@nanonyme
Copy link
Collaborator

bot, build

@nanonyme
Copy link
Collaborator

@nanonyme
Copy link
Collaborator

@valentindavid opinions?

@nanonyme
Copy link
Collaborator

Asked some defining questions in linked issue

@nanonyme
Copy link
Collaborator

I don't think the one header is enough, the build script detects it through pkgconfig.

@nanonyme
Copy link
Collaborator

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

@nanonyme
Copy link
Collaborator

May need to grab relevant stuff from here https://www.freedesktop.org/software/systemd/

@gasinvein
Copy link
Member

gasinvein commented Aug 26, 2018

Why not just build systemd? Without binaries and units stuff, it would be pretty small.
UPD: created Tomin1#1

@nanonyme
Copy link
Collaborator

Yes, that's what I was trying to say. Libsystemd is released as part of systemd, apparently

@nanonyme
Copy link
Collaborator

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
Also you get to verify that what you download doesn't change as you can set sha256 hash for tarball.

@nanonyme
Copy link
Collaborator

The CI system apparently most likely doesn't preserve Git repos so using Git directly means full clone on every build from Github

@nanonyme
Copy link
Collaborator

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.

@Tomin1
Copy link
Contributor Author

Tomin1 commented Aug 26, 2018

@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?

@nanonyme nanonyme changed the base branch from master to feature/gamemode August 26, 2018 19:08
@nanonyme
Copy link
Collaborator

@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

@nanonyme
Copy link
Collaborator

@Tomin1 history is fine, I don't mind

@nanonyme
Copy link
Collaborator

nanonyme commented Aug 26, 2018

@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

@gasinvein
Copy link
Member

gasinvein commented Aug 26, 2018 via email

@nanonyme
Copy link
Collaborator

Please do, otherwise we can't really know if the builder likes it or not

@nanonyme
Copy link
Collaborator

Preferably without changes from @Tomin1

@gasinvein
Copy link
Member

@nanonyme opened #178

@nanonyme
Copy link
Collaborator

bot, build

@nanonyme

This comment has been minimized.

@nanonyme
Copy link
Collaborator

bot, build

@nanonyme
Copy link
Collaborator

@Tomin1 please rebase in the morning

@nanonyme
Copy link
Collaborator

(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)

@gasinvein
Copy link
Member

@nanonyme this PR merges and builds just fine. Why need rebase?

@Tomin1
Copy link
Contributor Author

Tomin1 commented Aug 27, 2018

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.

@gasinvein
Copy link
Member

This doesn't build on my computer because the systemd build fails

@Tomin1 that's strange. Can you please provide build log?

@Tomin1
Copy link
Contributor Author

Tomin1 commented Aug 27, 2018

@gasinvein Edit: sorry, this was missing stderr. Here:
build-log.log

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.

@gasinvein
Copy link
Member

gasinvein commented Aug 27, 2018

I can't find any difference here with my or bot's log, except for lines order. Can you try a single-threaded build (--jobs 1)?
Also, I use, flatpak-builder 0.99.3, maybe it matters.

systemd can't handle other prefixes

It has option rootprefix for that.

@nanonyme
Copy link
Collaborator

If it's a concurrency issue, we should probably set that switch in manifest.

@gasinvein
Copy link
Member

gasinvein commented Aug 27, 2018 via email

@nanonyme
Copy link
Collaborator

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

@gasinvein
Copy link
Member

gasinvein commented Aug 27, 2018 via email

@nanonyme
Copy link
Collaborator

nanonyme commented Aug 27, 2018

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

@nanonyme
Copy link
Collaborator

The machine is 8 core though so might well provoke concurrency issues

@gasinvein
Copy link
Member

gasinvein commented Aug 27, 2018 via email

@nanonyme
Copy link
Collaborator

nanonyme commented Aug 27, 2018

@Tomin1 does setting sysconfigdir=/app/etc help any?

@nanonyme
Copy link
Collaborator

I would verify myself but currently over cell phone

@gasinvein
Copy link
Member

gasinvein commented Aug 27, 2018 via email

@nanonyme
Copy link
Collaborator

Nah, no point if you can't reproduce it anyway

@Tomin1
Copy link
Contributor Author

Tomin1 commented Aug 27, 2018

@nanonyme Didn't make any difference. I don't think it's a concurrency issue either, --jobs 1 doesn't help.

@nanonyme
Copy link
Collaborator

Sorry, sysconfdir, not sysconfigdir

@nanonyme
Copy link
Collaborator

Fixes the issue for me

@nanonyme
Copy link
Collaborator

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.
@nanonyme
Copy link
Collaborator

bot, build

@nanonyme
Copy link
Collaborator

I just realized this might only be half of the solution. We're currently only building 64bit gamemode and libsystemd

@Tomin1
Copy link
Contributor Author

Tomin1 commented Aug 27, 2018

True. Although probably all games that may really benefit from gamemode are 64 bit.

@nanonyme
Copy link
Collaborator

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.

@gasinvein
Copy link
Member

gasinvein commented Aug 27, 2018 via email

@nanonyme nanonyme merged commit 3ed72b1 into flathub:feature/gamemode Aug 27, 2018
@Tomin1
Copy link
Contributor Author

Tomin1 commented Aug 27, 2018

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.

@nanonyme
Copy link
Collaborator

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.

@Tomin1 Tomin1 deleted the gamemode branch August 27, 2018 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants