hi I have this installed https://github.com/PF4Public/gentoo-overlay/blob/master/www-client/ungoogled-chromium/ungoogled-chromium-118.0.5993.70_p2.ebuild but i saw that someone created this https://github.com/Alex313031/thorium which claims that it has a performance optimization, but i don't want any google buttons on my chromium so i want ungoogled-chromium, but i have gentoo so when i installed that ungoogled-chromium it compiled the source code on my CPU,
so I am trying to find out, does the ungoogled-chromium i have already have the same optimization as that thorium thing?or is it likely that only the thorium fork can have that optimization?
The picture is a picture of what I want that thorium doesn't have, to explain, i still want to be able to go to google.com, but i just dont want it to have any google buttons in the UI
#How to check the CPU features enabled in a chromium build?
1 messages · Page 1 of 1 (latest)
my CPU is AMD Ryzen 9 5950X and gentoo ran bare metal on it and compiled a version of that ebuild but i have a hard time finding: how to check if that optimization automatically happened for me?
For warning I am new to gentoo I just figured I give a quick reply for the time being
Some of the things in thorium are patches specifically made in that repo
you can check the repo patches here: https://github.com/Alex313031/thorium/blob/main/infra/PATCHES.md
As far as your use flags go they should be your global flags + local flags from my understanding
your global flags should be in /etc/portage/make.conf
your local flags should be in /etc/portage/package.use/<package_name>
you should be able to get the package you are using use-flags by using equery u <package_name>
I believe the IUSE variable in what you sent are the optional useflags from my understanding.
yeah or the simple terms are it will use options set in make.conf
can you show the output of wgetpaste -I
and wgetpaste -c "emerge -vp chromium
thanks, i see now that to get the highlighted optimization, i need to read this entire thread and memorize every identifier https://github.com/RobRich999/Chromium_Clang/issues/26, then diff the entire thorium codebase against the chromium codebase of same release, find all the patches in the diff that contain those identifiers, save them and then apply them all to ungoogled-chromium then compile the patched ungoogled-chromium, only after that i guess i will have the same optimization
i dont have wgetpaste installed, is this adequate or do you need to see the emerge print? https://termbin.com/vrxg
that is equery u ungoogled-chromium
because the link for the optimizations in that page AdoreBool sent me doesn't contain actual patches, only explanation of how they implemented the optimizations
emerge -vp ungoogled-chromium should show what your system's use flags are
ok
but yes change the second command to the package I said
$ wgetpaste -c "emerge -vp ungoogled-chromium"
Your paste can be seen here: https://bpa.st/GJZA
$ wgetpaste -c "emerge -vp chromium"
Your paste can be seen here: https://bpa.st/CFGQ
I'll do my usual bit to keep the web free and open and ask if there is any reason you can't use firefox?
need wgetpaste -I too please
firefox is my primary browser which i use for most tasks
$ wgetpaste -I
Your paste can be seen here: https://bpa.st/XRCQ
i use chromium as secondary browser for niche tasks that it happens to be more convenient for than firefox
small example:
--proxy-server command line argument
wgetpaste -c "emerge --info"?
oh i sent it here?
in this message i posted link
as is it will enable what you have set just find in your system
at least i am almost certain that is the same repository, though i might have a different release version of it
if you care about making it as fast as possible I can give you the steps to do it
if you wouldnt mind I would like to hear about that
create /etc/package.use/ungoogled-chromium
i see this which looks pretty complete but i'm not sure if this has all the optimizations in it?https://github.com/RobRich999/Chromium_Clang/blob/main/Linux/linux64-avx2.patch
I assume that anything you set the variables to in /etc/portage/package.use/<package_name> will overwrite the variables from the global make.conf. Correct? so you could input the cflag -03 in it?
O3 will make it slower most of the time
depends on what cpu you have
add www-client/ungoogled-chromium optimize-thinlto optimize-webui pgo
compile time will go up by alot but it will be faster
you need 15GB of ram also
i assume that u mean /etc/portage/package.use/ungoogled-chromium?
If I set up a swap drive partition would be of help for gentoo considering how much ram it uses
how much ram do you have?
16gb
I would have at least a 4GB swap file to catch OoM errors
8 if you can spare the space
I was planning on setting up zram with writeback_device with a swap partition
i have found that when compiling "huge"-size apps including chromium, i have 2 options, use all my CPU threads for make jobs and, when my 32 GB RAM fills up wait for 12 hours for the entire compilation to swap through my 120 GB swap partition after which it completes successfully, or limit my make job count to some medium number which reduces the amount of RAM used, which ends up having a faster compilation time, and also completes successfully
Thanks for the info it has helped me understand gentoo alot better
so i edit how many jobs i use on a case by case basis depending on what my experience predicts the approximate optimum job count for that app for my system is
yeah it's one of those where using less threads ends up being faster
I was lazy though when I had 16gb and just used swap
nowadays I don't have to worry
120gb though is crazy
I have an old ssd with 26gb though just because I have use for it
I have multiple tb of nvme drives but they are all on my computer with a dead motherboard 
will that enable SSE4.2 and AVX2 and make sure the optimization level of LTO is greater than 0 since i thought the thread said something about the LTO defaulting to optimization level 0 but i'm not sure? or do each of those need to be patched separately?
the lto is good as is
-march=native will enable everything else
so because i have -march=native -O2 in /etc/portage/make.conf and did ever since installing gentoo does that mean that gentoo has already automatically given me all the same CPU optimizations that thorium has except for LTO?
that is basically my original question
yep
as a secondary browser I think that's good as is
if you care about speed in firefox though use firefox-bin
ok thank you this is very reassuring because all i knew is "gentoo automatically optimizes all source packages" and "thorium claims to have optimizations normal chromium does not" and i was very confused whether all the optimizations involved were exactly the same
i am using firefox source package not binary package, do you mean that this is a slower firefox? why does that happen?
mozilla do better stuff
so it ends up being faster
it's one of the few times
how to reproduce does nobody know?
if nobody knows how to reproduce it i'm not sure if i want that
more it's not easy to do
we can get there by playing with rustflags but it's not worth it
we normally get on par or slower but I've never seen it be faster
here is emerge -avuDN @world --backtrack=100 --autounmask=y --autounmask-write --autounmask-backtrack=y after i tried to apply your file in /etc/portage/package.usehttps://termbin.com/y122
oops
the error about mate-tweak has happened for a long time after i manually installed that software BUT as far as i cant tell it is not actualy connected to any other errors, so when upgrade is successful, it's still there and i just ignore it
I missed you need to add thinlto to that package.use file
add that on the end and emerge -vauDU @world
did you try and convert an eapi 6 ebuild to 7?
no i tried to remove a dependency on systemd out of the package and it worked,
||straight up just used emerge vudu on the world 🧙||
so i decided to just leave it untouched until the mate-tweak binary stops actually working,
ldd $(which mate-tweak) shows
not a dynamic executable
so that might actually be uh... very long time..
at least thats what i hope
this issue happened to me
do you know how to work around that a better way than i did?
is it preferable to build software that isn't supported by gentoo fully manually using the upstream project's BUILDING.md,
or copy an ebuild from a custom overlay and try to edit it to work?
no, keep to ebuilds
so is there any better option than using the unity-gentoo ebuild?
in this case it might be wise to speak to #gentoo-mate on irc
for you no
I beleive they are working to get it officially added though
oh that good yeah
afaik they are one of the better overlays
but I don't work with them much to say how true that is
i am going to upgrade my system in order to update my chromium and firefox releases at the same time i do this but I would like to ask some questions about something in gentoo that is very confusing to me and i would say is the most confusing thing for me about gentoo that other distros dont have
basically this is a description of that thing
wha'ts the question?
it says the "world file" should only contain things i "personally want",
or in another place it says it should not contain "dependencies"
but i find it hard to understand, whether or not a package is technically a "dependency" or not
for the purposes of the "world file"
ok I think you are over thinking this
just run emerge -va --depclean once a month and your world file should stay nice and clean
and use --oneshot for packages you only use once
yeah i've realized from the start that i'm not yet using gentoo the correct way that everyone else does, because,
one thing you will learn is we give amazing advice we never follow ourselves
basically, i tried to use emerge -va --depclean a few times before, but every time i do that it says it's going to remove things that I think I need, and that I don't think i have more than one version of installed,
so i haven't been doing that, and when I use Debian, debian has something vaguely similar called apt autoremove, and frequently for me apt autoremove says it's going to remove things i want, so i dont usually do that on debian either
if you think you need it then emerge --noreplace <package name should be what you need
ok, i'll try that,
Oh nice something that will help me
and, i am wondering: does the world file affect the behavior of emerge -va --depclean as well as emerge -avuDN @world?
depclean just removes old bdeps (build dependencies) which Sam is talking about
for your needs this sounds like all you need
ok,
i was wondering, could you look at my world file and tell me if anything stands out to you as one of those things that could cause what that page said "Erroneous entries in your world file will lead to blockers when e.g. a library becomes obsolete or replaced, leading you to have to fix the problem when for most people, it'll be resolved automatically. "
because this is the first time i have looked at that list, and that's pretty much the thing that made me concerned,
looks rather clean
since i am familiar with a part of Arch Linux's pacman that does a behavior like "replace package x with y? [Y/n]"
and that article makes it sound as though gentoo doesn't do any automatic equivalent and that the user is expected to manually resolve that if it happens to the gentoo equivalents of packages that happens to on arch linux
ok good
how do you get dev-util/pmbootstrap package to work?
when i try to use it it always says "error: out of date"
so i always have to use a version of pmbootstrap downloaded from their github page
i just asked because i saw it in your list but if you dont use that thats ok
also i have started to get into a habit of using grep -rn /etc/portage/ -e '^=' and willy-nilly deleting the lines it prints from the files shown, then allowing emerge to recreate the ones it prompts me to,
i thought that should surely break my system, because i wanted to see what other errors doing that will cause, but i haven't gotten more errors from doing that yet, should that eventually cause a big conflict?
the logic behind it is "i don't want to be stuck with an old version of anything"
just installed
using the guru package
I added to the pmos docs
I show all that happens when i try to do that here
and at the bottom i show using ~/.local/bin/pmbootstrap which is a copy downloaded from postmarketos github
also I am wondering, how do I uninstall KDE Plasma?
works for me so not sure
while I was setting up MATE, i used KDE Plasma as a GUI to temporarily configure MATE before MATE started working
now MATE is working for a long time so i wanted to remove KDE Plasma and only install it again if i need it again, but emerge --depclean --verbose qtwayland kwayland kwin layer-shell-qt libkscreen plasma-integration plasma-workspace libkworkspace plasma-integration kscreenlocker shows this
ok i will try to use --deselect
for you does it say version 1.51 or version 1.53?
1.51
I see this
$ sudo emerge --deselect kde-plasma/plasma-meta
>>> No matching atoms found in "world" favorites file...
ok i guess there might be some way to bypass the outdated error that i dont know
yes sorry i asked too many questions in the same thread
and thats why i want to remove the kde packages too because i think they are taking up too much space and using too much build time every time i upgrade the system
it's fine I just don't lnow the answer
i used it to set up MATE because KDE plasma is the default GUI of the gentoo live image, so i knew it would work when MATE wasn't working immediately
I will mark this solved after i successfully build ungoogled chromium with LTO enabled (in my experience LTO often fails at build time unless the source used has been tested and patched to implement it)
I wrote the documentation for it so you are speaking to one of the best people on the topic
that is good thanks
I've added most of the fixes to make it work on a desktop system as well
lto is in a very good state
what is the difference in effect on specifically ungoogled-chromium between having lto in make.conf USE flags and the optimize-thinlto optimize-webui pgo thinlto USE flags that are specific to that package?
would adding the lto flag to those have no effect on ungoogled-chromium and only affect packages whose ebuilds actually contain the identifier lto?
depends on how the ebuild is written
strip-flags used to remove -flto but it no longer does so there is a good chance it will still be added
now we have filter-lto for those cases
Browse the Gentoo Git repositories
here is the fix I applied to musl
the ebuild for ungoogled-chromium contains strip-flags and many instances of filter-flags but no instances of filter-lto
however for example it contains
if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
fi
are you sure that isn't disabling optimization that i asked how to check is enabled?
i am not sure what the end result of the logic there is so, that is sort of why i was wondering if there's a way to test the resulting binary itself for an optimization signature
the most direct thing i can think of is using a hex editor to search for machine language AVX and SSE4.2 exclusive instructions and compare the results with builds that are known to not have them like google chrome and builds that are known to have them like thorium?
though i do not know x86 machine language so that is hard for me but i wonder if that is feasable without having to do any actual disassembly
but not a good enough reason for thorium to not use them
that is why i am interested to attempt to graft the thorium optimizations onto ungoogled-chromium
you would have to ask them
The ungoogled chromium maintainer is quite responsive
Good to know, the build looks good to me minus a few simple mistakes
Like what, I haven't taken a close look
They haven't noticed strip-flag doesn't disable lto anymore
There was something else but I've forgotten it now
I'll take a look and PR at some point
Thanks my pr machine is down so I can't do any
Is that the only thing you have with more than 32M RAM? 😛
I've got a simple keywordreq which will close down two bugs if you don't mind
Hahah
Shoot me the details