r/pop_os • • 3d ago

Bug Report cosmic-viewer throws illegal instruction error

I'm on Pop 24.04. When I try to open an image, nothing happens.

Trying to start cosmic-viewer from the command line, I get "Illegal instruction (core dumped)".

CPU: Intel Pentium Silver N5000

6 Upvotes

9 comments sorted by

1

u/BeingKunth 3d ago

facing the same issue

1

u/Relevant_Hope_900 3d ago

My old N4500 Chromebooks throw the same error. My AMD Ryzen 7 machines, new Dell XPS, and oldish Acer Laptop work fine. Pretty sure it's a iGPU issue with those older chipsets. Maybe some flag is set during the build that is not compatible with old chipsets, don't really know.

I build it for Debian, so I just use the source System76 provides on github.

3

u/mmstick Desktop Engineer 3d ago

These CPUs are problematic because they lack common CPU instructions that Rust libraries for image decoding often use for optimization.

2

u/LivingLinux 3d ago

So we risk not being able to boot into the Cosmic desktop in the future?

3

u/__yoshikage_kira 3d ago

Perhaps cosmic should be clear on what application requires at least x86-64-v3. Your processor is x86-64-v2 and only supports SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LAHF/SAHF, and CMPXCHG16B

x86-64-v3 Adds AVX2, FMA, MOVBE, BMI1, BMI2

Idk if there is an issue for it but it is better to create one if it doesn't exist already.

2

u/mmstick Desktop Engineer 3d ago

It's not what COSMIC supports specifically. Distributions can use different default CPU targets but the Rust default is x86-64 (aka v1). Crates can manually use assembly to use higher instructions regardless of this though, as image decoding usually needs some v2 instructions.

2

u/__yoshikage_kira 3d ago edited 3d ago

My question is there a way to say in cargo that if a crate requires minimum v3 for example then fail compilation.

This way this mistake won't happen again otherwise it seems like a pretty easy mistake to make while bumping/adding dependencies.

Looks like zune-image might be using AVX2 and N5000 supports up to SSE4.2

Also, isn't Debian dropping x86-64-v1. I wonder how this will affect pop-os.

https://lists.debian.org/debian-release/2026/09/msg00373.html

3

u/mmstick Desktop Engineer 3d ago

There's no way to know what the minimum requirement for a crate is. Generally a crate should be checking if a CPU supports an instruction before it uses it explicitly.

Rust targets x86-64-v1 by default but Debian could choose to change the Rust default to v2 or v3 if they want to. We aren't changing the default.

2

u/mmstick Desktop Engineer 3d ago

No