thorium
thorium copied to clipboard
archlinux feature discussion
I just write a script to read `~/.config/chromium-flags.conf` (click to expand)
#!/bin/bash
# Copyright (c) 2022 Alex313031
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
# if [ -f $XDG_CONFIG_HOME/chromium-flags.conf ]; then
# CHROMIUM_FLAGS="$(cat $XDG_CONFIG_HOME/chromium-flags.conf)"
# fi
CHROMIUM_FLAGS_PATCH=$HOME/.config/chromium-flags.conf
if [ -f $CHROMIUM_FLAGS_PATCH ]; then
CHROMIUM_FLAGS="$(cat $CHROMIUM_FLAGS_PATCH)"
fi
args=("$@")
./thorium-browser_99.0.4803.0-1_amd64/chrome $args $CHROMIUM_FLAGS
and don't forget to replace the link with the script above in:
~/.local/share/applications/thorium-browser.desktop
Or you can also just run the flags with -- prepended to them on the cmdline or in the thorium desktop file. In fact, if you look in the thorium-browser.desktop, I already have some added in there. When editing, please keep those flags in there, and the script that @raingart wrote will use both because of the $@ in it.
@raingart did you model that after the debian chromium wrapper script?
I might add this info into the thorium-wrapper script so that people never have this question again. I will include credit to you in the file and the readme, as well as add that info to the readme that flags can be added to that file. Is that ok with you?
@raingart Also, I do not plan on making a Thorium release for M87. 87 also has vulnerabilities that are being actively exploited in the wild. Do you know what the last version that accepts that flag is? If so, I would be happy to make a personal release of Chromium for you that has the compiler optimization stuff but not the other Thorium stuff at that version.
I have experience with arch, but zero experience on how to make a package for it. How would I go about this? @JPratama7 wrote a pkgbuild for Thorium here > https://github.com/JPratama7/test-cicd/blob/master/thorium/PKGBUILD
@raingart TabHoverCards,ExtensionsToolbarMenu,SharingQRCodeGenerator These have been enabled by default in recent versions so they removed the flags. I understand not wanting the extensions toolbar menu, but you know you can just pin your extensions right? Also, are you saying you do or dont like the tab hover cards and QR generator. I find them very useful.
XDG_CONFIG_HOME only works with certain WM/DE like xfce, openbox, lxde when used with chromium for some reason.
The portables are binaries. They just have a readme, and modified wrapper scripts/.desktop files for Thorium and Thorium Content Shell. I will def contact chrlauncher. And the PKGBUILD could be uploaded to just use the portable .zips, as they already have everything needed to run it on any linux distribution.
Yeah, Thorium is currently the FASTEST browser for linux. This is because on top of AVX, it has AES, and other compiler optimizations like cflags & ldflags & rust_cflags & cxxflags set to -O3 rather than the default -O2, stripping enabled for everything except content_shell and chromedriver (where you would want debug contructs anyway since they are most often used for testing/fuzzing/debugging.) And it has LOOP optimizations and vector optimizations as well as instructing clang to do multiple optimization passes on SIMD instructions. It also has the import_instr_limit set to 100 vs 30 for chromiumos and 5 for chromium. I will soon be using Polly in clang like RobRich used to do (he also shared with me the loop optimizations, which I slightly modified). This should make it even faster. All told, in my testing comparing it to debian's chromium, chrome dev channel, and firefox, it performs 2-10% faster in octane v2 and speedometer v2. It also has some experimental features enabled in the source, but they have to be activated in chrome://flags, which allow it to get a 532 score on html5test.com vs 526 on chrome(ium).
Google restricted API Keys on March 15, 2021 with a howl of complaint from developers and linux distro maintainers, with some considering removing chromium altogether from their repos. This made free public keys and private keys rate limited. I had previously made my own keys for my ChromiumOS builds > https://github.com/Alex313031/ChromiumOS/ and used those in my personal Thorium builds. However because of the rate limiting they are not suitable for distribution. You can either remove sync like some distros have done, or purchase a quota for the google sync api like debian did. This is what I did, and created a new set of public keys. I still use my private ones for my own builds and ChromiumOS builds, but the public ones I paid for are baked right into the thorium binary, removing the need to specify them at runtime via cmdline or environment variables. They are "public" but I still dont include them in the Thorium repo, as I dont want other people to start using them and potentially hit the 1 million hit per second rate limit. (Unlimited rate limit is very expensive and only used in major browsers with more than a million users.)
About the gpu fix flags, I'm aware of all that. I have quite a bit of the chrome://flags changed on my personal machine. VAAPI acceleration was changed from default off to default on in Thorium, but you still need to use those GPU flags to enable it. This prevents issues on certain platforms, so that users can choose to force enable GPU acceleration, while making VAAPI work without having to use a cmdline flag. Also, I included patches to enable VAAPI on older Intel cards, and experimental support for VDPAU with Nvidia proprietary drivers on linux. Vulkan support is still shady, and I recommend leaving it off even if the browser does launch with it enabled. I use chrome://version instead of chrome://gpu to see what cmdline it was launched with. But chrome://gpu makes it a lil easier to see.
I agree about PWA's and the old tab bar and editing default search engines. I at least added some more search engines to the list in Thorium, have a look. But about dragging tabs to another window, they didn't remove that. You can still do that. IDK why you would not be able to, I do it all the time in Chromium and Thorium.
I will make a build of chromium 89 for you with all the compiler optimizations of Thorium, but none of the other stuff as I would have to rebase and rewrite everything. I'm also going to make a personal build of 69 because 1. 69 tehehehehe, and 2. it was the last version where you could enable the old trapezoid tab shape via chrome://flags (67 was the last where that was the default) Would you like me to share that with you too?
@raingart Yeah they made some annoying changes to the bookmarks bar. Yeah, dragging tabs to and from windows has worked in every version of thorium for me including M99. Try right clicking title bar and checking (or unchecking depending on if its set or not) "use system title and borders". If it still doesnt work in either mode, I would say that yeah it is probably your WM. And yeah, I like that with chromium you can control the updates. And Im not worried about hitting the quota anytime soon. I'm getting about 100+ downloads for each release in both the main and windows repos. I'm not gonna set sync options in source code as that should be left to the user.
Also, have you heard of ChromiumOS? I would encourage you to try it out. You can boot it from a usb stick and try it without installing. Only limitation is you gotta have 2nd gen core (sandybridge) or newer and nvidia cards arent supported (yet).
If you do decide to try, do not use etcher to write the disk image. Use another program or dd via sudo dd if=chromiumos_image.bin of=/dev/sdx bs=4M oflag=sync status=progress
where /dev/sdx is your usb drive found out by using sudo fdisk -l
@raingart ChromiumOS ain't too bad. It's rather beautiful in my opinion. Android is ehhhhh. But compared to the walled garden of ios, i.e. can only get apps from the appstore, cant downgrade iOS, all browsers have to use webkit, developing for it is hard and closed source, I prefer android (even though right now I have an iPhone)
ChromiumOS doesn't work on virtualbox at all and wont ever. VMware support has to be built in, which mine doesn't have. You can boot it from USB to try it out without touching your system.
Fuschia is still in development and getting more usable and better. The Google nest is the first device to run it. There's also dahliaOS, which you should check out. They offer builds with the zircon (fuschia) kernel or the linux kernel, but with everything else fuschia.
@raingart I'm making your M89 build now.
@raingart Well its building right now. When its done ill post the deb in my snippets repo for u to download
@raingart Also, I made a new chromiumos release. You should try it before you hate it lol.
@raingart Also remember, this is a build of the last stable M89 for linux, and is not changed except for the build.gn to include the compiler optimizations of Thorium. Otherwise its completely vanilla, and the .deb also will not include the extras of thorium .deb like chromedriver, content_shell, or pak.
@raingart Yup I have it installed in a virtual machine.
@raingart Also, this release wont have widevine. They introduced component widevine (i.e. not baked in) with version 90, where one can go to chrome://components and download the widevine cdm. Because I dont have access to chrome internal src, I didn't enable it. There's a patch used in debian that tells it to enable it anyway, and modifies the wrapper script in /usr/bin to tell it to search its dir as well as the dir google chrome would be installed in for libwidevine.so, but its not used since M90, and I didn't wanna have to go searching through old debian source and then manually patch the files. If you wanna watch netflix or something, I'd recommend using another browser, like using Thorium portable so it doesn't interfere with your chromium installation. Otherwise, this release will have google sync, codecs, and everything else that you would want for daily browsing.
Just copying libwidevine.so to the proper place wont enable it, as chromium has to be built with the gn argument enable_widevine = true for it to be linked with code that even tells it to go looking for libwidevine.
@raingart Ok cool. And you're saying you disabled webassembly in your own chromium builds? how? And yeah. Excluding firefox, almost EVERYTHING uses chromium now. Chromium, edge, chrome, brave, torch, whale, opera, vivaldi, amazon silk, samsung browser, etc and in the form of electron or chromium embedded framework (CEF) in steam, discord, twitch, atom, etcher, github desktop, beaker browser, etc. Almost any small browser like midori, peacock, or other snap or flatpak browsers use chromium or electron.
Your video wont play in the browser, or when downloaded with either mpv or vlc, i think its corrupted and maybe you need to reupload or make it again. It was also only 4.9kb in size.
Also, chromiumos_image.bin uses gpt so it's not recognized by alot of software. It also wont work in virtualbox or vmware. It will work in qemu, but you gotta use a special incantation that I can share. Gnome-boxes uses qemu and kvm as a backend so it may work in there but youd probably have to configure it to use similar stuff.
qemu-system-x86_64 -m 8G -smp 8 -vga virtio -cpu 'SandyBridge,-invpcid,-tsc-deadline,check,vmx=on' -usb -device usb-tablet -device 'virtio-net,netdev=eth0' -device 'virtio-scsi-pci,id=scsi' -device virtio-rng -device 'scsi-hd,drive=hd' -netdev 'user,id=eth0' -enable-kvm -drive 'if=none,id=hd,file=/home/alex/chromiumos/src/build/images/amd64-generic/R99-14463.0.2022_01_19_0234-a1/chromiumos_image.bin,cache=unsafe,format=raw'
Edit that to the actual location of the chromiumos_image.bin file and adjust the -m and -smp to how much memory and cpu cores you want. Ideally you want 4gb and 4 cores or more. The minimum to boot chromiumos is 2gb and 1 core. Honestly, I find it easiest to just flash it to a usb drive and boot it on an actual machine. It doesn't support nvidia cards (yet) and requires a CPU with AVX like sandybridge or newer or bulldozer or newer on amd side.
@raingart Ehh sometimes my issues turn into conversations, I just leave em up till the conversation is done.
My brain died trying to understand this > "You think too highly of me. I am my build. It was not I who was fond of adolescence and did my windows xp builds."
And ok I was gonna say, it would take ALOT of work to disable webassembly in source.
And cool that you're on the web store! I have an extension I wish to publish, but literally don't have the money to spend on an account. > https://github.com/Alex313031/Chromium-Dev-Editor
That is very strange indeed. I would say try the latest Thorium (you're on M99), if it still fails, try your distros chromium, if it still fails, it might truly be your WM, in which case I would say hard luck lol. i3wm is cool, but I prefer openbox as it is one of the most standards compliant WM besides GNOME, which almost everything else is measured by.
And, what do you mean the image from the flash drive? Are you saying an older chromiumos image is on there? The new one has a modified mesa-llvmpipe so if its a graphics issue it might actually be resolved. Also, its a good idea to enable legacy bios temporarily, as sometimes UEFI is flaky with chromiumos.
And cool what are your detailed specs, like cpu and any overclock, board chipset, ram clock and timings. You must have a haswell extreme edition. Im on a 4790K overclocked to 4.6Ghz. all cores, on a gigabyte Z97 board, with three 8GB sticks (24GB) of 1866Mhz/CL12 RAM, and an EVGA GTX 970 with two 1080p and 1 1050p monitors. Also a genuine IBM PS/2 keyboard and a logitech PS/2 LASER mouse (its incredibly rare to find a laser mouse with PS/2, as the eras of ps/2 and laser dont line up) I got my board (ga-z97x-ud3h) specifically because it still had two seperate mouse and keyboard ps/2 ports, as well as a PCI slot for older cards.
What are you saying that you are your build, and what do you mean about windows xp, are you saying you used to build chromium for windows xp?
And yeah, I read about re-enabling TSX for RPCS3 in a forum. And cool you got a 5960x. And why an external USB DAC?
Are you using the latest chromiumos release? How did you write it to the USB drive? And are you booting it in a VM or actual hardware? If its asking about booting A/B you are NOT in legacy BIOS mode. It only shows that menu if it's booting in UEFI mode.
Yeah I hate manifest ver. 3. And we got on xp because of "You think too highly of me. I am my build. It was not I who was fond of adolescence and did my windows xp builds." And I still don't understand what you're saying? You made modifications to XP, by using different sources? And so you did or didn't compile chromium for xp? That's cool that you have all those extensions. I'll take a look at them.
And yes CSM is legacy bios.
Use the latest chromiumos_image > https://github.com/Alex313031/ChromiumOS/releases/tag/V100.0.4893.3
And write it to USB via sudo dd if=chromiumos_image.bin of=/dev/sdx bs=4M oflag=sync status=progress
where /dev/sdx is your usb drive found out by using sudo fdisk -l
@raingart Also, see. It wants you to pay $5.
@raingart Here's your chromium 89. > https://github.com/Alex313031/Snippets/releases/tag/chromium Also did you make your name after @reingart
Ohh ok then it might be an upstream thing if 89 works and newer doesn't. Was it just thorium, or did you try arch's chromium? Also, how goes the chromiumos
Oh and also, how are you installing it on arch? Are you extracting the data.xz from the .deb
@raingart enable chrome://flags/#ignore-gpu-blocklist chrome://flags/#enable-gpu-rasterization and hardware video acceleration. Find it by searching for "hardware". If it doesn't show, manually pass cmdline flag --enable-features=VaapiVideoDecoder
Here I also reccomend parallel downloading and ftp support. Just look at all those flags and set those.
@Cool on getting stuff to work. I will look into that user script. Chromium is never compiled with any AVX by default, otherwise it would break compatibility with old CPUs. They did experiment with it. But no, Chromium used SSE2 since M39, and SSE3 since M89. AVX has to be manually added. Using AVX does indeed have performance improvements. AVX2 is negligible, but people want it. I made a new repo for AVX2 builds, so IDK where your getting that I said I wouldn't support AVX2 builds? AVX512 actually slows things down in my testing because it causes the CPU to throttle via the AVX offset. AVX and AVX2 are not used heavily enough to trigger this, but AVX512 will trigger it if even one instruction is used. About the audio rendering error, I cant help with that and wouldn't know why setting that alsa flag would fix it.
@raingart AVX is the single most performance enhancing of all the compiler flags in thorium. AVX affects floating point as well as vector calculation. Compiling with AVX speeds up V8 (the javascript engine) and WebUI elements in the browser the most. AVX helps many things besides cryptography and 3d modeling. And you may be right about the .deb to .pkg, I will try to look into it. And dahliaos is interesting, but nowhere near a daily use OS.
@raingart Revisiting Arch. Can you post where that pkgbuild is again? And can that be just updated for each release? If I wanted to add Thorium to the AUR, how would I go about doing that.
@raingart Oh yeah, it was him not you that originally created the pkgbuild. @JPratama7 can I use that pkgbuild and add it to the main thorium repo, I will put your name in a copright comment on the top. Then I can see about adding Thorium to the AUR.
@JPratama7 can I use that pkgbuild and add it to the main thorium repo, I will put your name in a copright comment on the top. Then I can see about adding Thorium to the AUR.
sure no problem.
What is up with Alex comments everywhere? Did raingart remove all of his comments inbetween?
Also I'd love to see Thorium in AUR. Better if it's binary instead of source.
@Alex313031 I've tried JPratama7's PKGBUILD on a heavily customized EndeavourOS (Arch derivative) and adjusted it to the newest release, that works, at least partially, as I have trouble getting Google Sync to work. While I can login and register myself, there is no syncing of information and my login credentials are lost when closing the browser. Is this a known issue? I've already registered my account as a Test account - and that method works as intended with the AVX2-Windows release, but not on Linux with the most recent AVX release.
By the way, even though you have stated some time ago that you are not planning an AVX2-Linux release, I just want to seize the moment to let you know that there would be some interest as there are some efforts on using more optimizations on some Arch derivatives, e.g. CachyOS, which would be a perfect fit for your project. It would be great if Google Sync could be made to work though.