r/Gentoo • • 9d ago

Discussion Gaming/Desktop optimizations

so, other than forking cachyos kernel, how to maximize gentoo for gaming and desktop use

7 Upvotes

12 comments sorted by

14

u/ftranschel 9d ago

You don't need to fork cachyos-kernel (unless you don't know what forking means), there are overlays available.

Other than that, run -O2 -pipe and -march=native as cflags and you're fine. Optimizing is overrated and that's not even gentoo's central selling point (for me at least).

4

u/non-existing-person 9d ago

Optimizing is overrated

I agree, but in few instances I disagree heavily. Optimization are often not where people expect them to be. And Gentoo does not really bring anything unique to the table here either.

But, in factorio game, if you use huge tables, and microsoft's mimalloc you can get 10-20% increase in game simulation speed, and some people even report 50% boost. But yea, -mtune does not really matter here. Just malloc's implementation. And obviously fact of using Gentoo matters none at all just as well for this trick to work.

So yeah, you can find optimization here and there. True, that most games won't get anything more than +2 FPS or so. But if you know what you are doing, and have the right game to work with, you can optimize the shit out of it ;)

1

u/akryl9296 9d ago

Not OP here. Why cachyos kernel specifically for gaming?

3

u/AbbreviationsSalt193 9d ago

better scheduler and its patched for optimizations/improvements.

2

u/LameBMX 9d ago

why not just select the same scheduler and apply the patches the kernel?

6

u/AbbreviationsSalt193 9d ago edited 9d ago

you can ofcourse patch the stock kernel but at that point you may as well download pre-patched cachy sources. also the better scheduler is part of the patches. Also youd want to seperate configs for stock and patched kernel in case the patches modify the options.

1

u/LameBMX 8d ago

well let me flip my orevious comment around then. vanilla + gentoo patch set for default.. that config lives and moves in this tree. vanilla + catchy patch set (and/arch patchset depending if catchy depends on them) and that config would follow this tree..

the kernels main source is the biggest part of everything anyway. why hit both OS hosting server for GB when there are only MBs in differences in the end.

I get we got stuff nice these days. well, until the hosts are bogged down.

3

u/krumpfwylg 9d ago

Kernel wise, there's not much you can do. Some people believe using BORE scheduler (or any other alternate sched.) improve gaming perfs, but that's not true, unless you're gaming && encoding a video && compiling a webengine && applying tons of photoshop filter all at the same time.

You may read this article on Arch wiki https://wiki.archlinux.org/title/Gaming but imo, only the part 5.1 is interesting for some games : increase vm_max_map_count, although the number suggested by their wiki is kinda overkill, 1048576 is enough.

Some say increasing the limit number of open files can help too, I've done it, but never noticed much differences, might be placebo, might work only with specific games. To do so, edit the /etc/security/limits.conf file, add lines such as the following, and reboot.

*               soft    nofile          262144
*               hard    nofile          524288

Once again, not sure those tweaks have a real impact on gaming perfs, but so far it didn't hurt my system.

2

u/adamkex 8d ago

> unless you're gaming && encoding a video && compiling a webengine && applying tons of photoshop filter all at the same time.

Tbf, doing the first three things at once is not completely unrealistic if he records his games

2

u/falawexx 9d ago

buy new hardware

2

u/oost- 8d ago edited 8d ago

Might as well be placebo but I noticed better frame pacing on my shitty thinkpad after compiling most of my multimedia libs using -march=native -O3 -flto cflags, as well as mesa and vulkan-loader and some other X libraries and compiled WINE myself so that it links to my system libraries, as opposed to using a pre-built, self-contained proton build.

I don't think that'll make any difference anyway (I did it because I have nothing better to do) but I haven't had any issues with my system so you're welcome to try for yourself.

Also make sure that the NTSync module is loaded by the kernel and used by WINE/proton as that can make apps running under WINE significantly faster.

1

u/C1REX 8d ago

I personally prefer the Gentoo kernel over the CachyOS one. Try both before deciding.

The only optimisations I did were to set up power profile to performance and to disable eye candy in KDE and make it start with a clean session. It matches CachyOS performance for me.