Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Conversation

@GaugeAndGravity
Copy link

I copied this from https://gitlab.archlinux.org/archlinux/packaging/packages/fastfetch/-/blob/main/PKGBUILD?ref_type=heads with a little edit, and it works fine for me. Fixes #10

Only tested on my MOREFINE Loongson-3A6000-HV-7A2000-NUC...

@CarterLi
Copy link

Hello, fastfetch author there. Can you paste the content of /proc/cpuinfo for debugging?

@GaugeAndGravity
Copy link
Author

Hello, fastfetch author there. Can you paste the content of /proc/cpuinfo for debugging?

Hi, sure!

system type		: generic-loongson-machine

processor		: 0
package			: 0
core			: 0
global_id		: 0
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A6000-HV
CPU Revision		: 0x00
FPU Revision		: 0x00
CPU MHz			: 2500.00
BogoMIPS		: 5000.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx crc32 lvz lbt_x86 lbt_arm lbt_mips
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 4

processor		: 1
package			: 0
core			: 0
global_id		: 1
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A6000-HV
CPU Revision		: 0x00
FPU Revision		: 0x00
CPU MHz			: 2500.00
BogoMIPS		: 5000.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx crc32 lvz lbt_x86 lbt_arm lbt_mips
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 4

processor		: 2
package			: 0
core			: 1
global_id		: 2
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A6000-HV
CPU Revision		: 0x00
FPU Revision		: 0x00
CPU MHz			: 2500.00
BogoMIPS		: 5000.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx crc32 lvz lbt_x86 lbt_arm lbt_mips
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 4

processor		: 3
package			: 0
core			: 1
global_id		: 3
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A6000-HV
CPU Revision		: 0x00
FPU Revision		: 0x00
CPU MHz			: 2500.00
BogoMIPS		: 5000.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx crc32 lvz lbt_x86 lbt_arm lbt_mips
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 4

processor		: 4
package			: 0
core			: 2
global_id		: 4
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A6000-HV
CPU Revision		: 0x00
FPU Revision		: 0x00
CPU MHz			: 2500.00
BogoMIPS		: 5000.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx crc32 lvz lbt_x86 lbt_arm lbt_mips
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 4

processor		: 5
package			: 0
core			: 2
global_id		: 5
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A6000-HV
CPU Revision		: 0x00
FPU Revision		: 0x00
CPU MHz			: 2500.00
BogoMIPS		: 5000.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx crc32 lvz lbt_x86 lbt_arm lbt_mips
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 4

processor		: 6
package			: 0
core			: 3
global_id		: 6
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A6000-HV
CPU Revision		: 0x00
FPU Revision		: 0x00
CPU MHz			: 2500.00
BogoMIPS		: 5000.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx crc32 lvz lbt_x86 lbt_arm lbt_mips
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 4

processor		: 7
package			: 0
core			: 3
global_id		: 7
CPU Family		: Loongson-64bit
Model Name		: Loongson-3A6000-HV
CPU Revision		: 0x00
FPU Revision		: 0x00
CPU MHz			: 2500.00
BogoMIPS		: 5000.00
TLB Entries		: 2112
Address Sizes		: 48 bits physical, 48 bits virtual
ISA			: loongarch32 loongarch64
Features		: cpucfg lam ual fpu lsx lasx crc32 lvz lbt_x86 lbt_arm lbt_mips
Hardware Watchpoint	: yes, iwatch count: 8, dwatch count: 4

BTW, the empty line after the first line stops parseCpuInfo(), so CPU shows as "Unknown".

Backported the logic from upstream dev branch commit 96905012a413f4ded49c33a182105f1d6a98b8cf ("Fix #1204 CPU (Linux): support loongarch") to fastfetch 2.31.3.

This patch enables fastfetch to correctly parse LoongArch CPU information on Loong Arch Linux. The patch should be removed once a new upstream release that includes the fix is available.
@GaugeAndGravity GaugeAndGravity changed the title update: fastfetch 2.21.3 fastfetch: update to 2.21.3 and fix CPU info Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fastfetch: segmentation fault

3 participants