Alex313031 / thorium

Chromium fork named after radioactive element No. 90. Windows and MacOS/Raspi/Android/Special builds are in different repositories, links are towards the top of the README.md.
https://thorium.rocks/
BSD 3-Clause "New" or "Revised" License
4.44k stars 139 forks source link

How to proceed after "illegal hardware instruction"? #9

Open loveencounterflow opened 2 years ago

loveencounterflow commented 2 years ago

So after downloading of the latest release I did

$ sudo dpkg -i ~/Downloads/thorium-browser_99.0.4821.0-1_amd64.deb                                                                    ✔ 
Selecting previously unselected package thorium-browser-unstable.
(Reading database ... 478423 files and directories currently installed.)
Preparing to unpack .../thorium-browser_99.0.4821.0-1_amd64.deb ...
Unpacking thorium-browser-unstable (99.0.4821.0-1) ...
Setting up thorium-browser-unstable (99.0.4821.0-1) ...
update-alternatives: using /usr/bin/thorium-browser-unstable to provide /usr/bin/thorium-browser (thorium-browser) in auto mode
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23+linuxmint8) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for menu (2.1.47ubuntu2.1) ...

which looked fine but then I got

$ thorium-browser --help
[1]    6312 illegal hardware instruction (core dumped)  thorium-browser --help
$ thorium-browser
[1]    6361 illegal hardware instruction (core dumped)  thorium-browser

What are the next steps to determine exactly what went wrong and whether I have to compile manually with which flags?

Alex313031 commented 2 years ago

@loveencounterflow Thorium is compiled with AVX and AES instructions. What processor are you using? If it is older than intel sandy bridge or amd FX, it will fail to run. In this case I would reccomend getting an SSE4 release from thorium-special > https://github.com/Alex313031/Thorium-Special The latest SSE4 release is > https://github.com/Alex313031/Thorium-Special/releases/tag/M98.0.4744.0-1 Remember to sudo apt purge it before reinstalling with dpkg -i

Alex313031 commented 2 years ago

@loveencounterflow If you would like to compile yourself, I would be more than happy to provide a walkthrough. I already have a guy I helped with compiling, and he now makes the tigerlake and macos builds in thorium-special. The readme kind of assumes you are already familiar with the Chromium workflow so. I have pretty much every social media and am willing to give it out and am pretty free as far as time is concerned. Keep in mind though that on my 4790K thats overclocked to 4.6Ghz. Thorium takes about 3-4 hours to compile. Compiling on a CPU that is old enough that it doesn't have AVX will take much longer. On a 1st gen Core i5-580m it takes 12 hours. On a Core 2 Duo E8600 @3.3 Ghz it takes 16.

loveencounterflow commented 2 years ago

on my 4790K thats overclocked to 4.6Ghz. Thorium takes about 3-4 hours to compile. Compiling on a CPU that is old enough that it doesn't have AVX will take much longer. On a 1st gen Core i5-580m it takes 12 hours. On a Core 2 Duo E8600 @3.3 Ghz it takes 16.

Yeah OK I think that pretty much rules it out. Here's my /proc/cpuinfo:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 55
model name  : Intel(R) Celeron(R) CPU  N2940  @ 1.83GHz
stepping    : 8
microcode   : 0x838
cpu MHz     : 1002.319
cache size  : 1024 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 4
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 11
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer rdrand lahf_lm 3dnowprefetch epb pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm ida arat md_clear
bugs        : cpu_meltdown spectre_v1 spectre_v2 mds msbds_only
bogomips    : 3666.66
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

That'd take 12 parsecs to compile at the very least so... I'll forego that I guess...

Alex313031 commented 2 years ago

@loveencounterflow I will make you a personal release, tuned for your specific architecture. Would you like one for the N2940, or another machine?

Thorium uses AVX and AES, but when I'm not doing anything, I'm more than happy to make special builds for special users with special use cases because we're all so special in this special, nerdy world lol.

Alex313031 commented 2 years ago

@loveencounterflow I made an SSE4 release for you and my old laptop. https://github.com/Alex313031/Thorium-Special/releases/tag/M102.0.4985.0

Delphox commented 2 years ago

Hey I'm also getting illegal instruction error on my laptop which that I use for studying, even when using the SSE4 build linked above. Can you check what it may be missing? The laptop is from around the same generation as the one guy you helped above, except instead of Intel its AMD.

I have attached cpuinfo.txt

Alex313031 commented 2 years ago

@Delphox This is an error on my part. I compiled it with SSE4.2, which not all processors with "SSE4" have. There is SSE4a, SSE4.1, and SSE4.2. You have a "Bobcat" AMD APU, which only supports sse4a. I will make sure that next SSE4 release is just pure baseline SSE4, that way it should work on CPUs as old as AMD Phenem or Core 2 Duo.

Delphox commented 2 years ago

I see, thank you! Will be looking forward to it! 😄

Alex313031 commented 2 years ago

@Delphox Here you go > https://github.com/Alex313031/Thorium-Special/releases/tag/M105.0.5172.0

Delphox commented 2 years ago

Oh I'm actually using Linux Mint, so I also use the .deb version like the guy above. Sorry for not making clear earlier. 😅But no rush, I'm using regular mint repository Chromium in the meantime. I'll wait for the proper baseline SSE4 Linux release. I'm sure the SSE3 one will be useful for someone either way. 🙂

Alex313031 commented 1 year ago

@Delphox Doing to be making a regular SSE4 release soon.

Delphox commented 1 year ago

Nice, looking forward to it!

Delphox commented 1 year ago

Btw I finally got to install the SSE3 108 release on my old laptop running Linux Mint and it works! Very nice getting video acceleration out of the box without launch commands too! :)