Incorrect Hardware Detection Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
ldg346
Posts: 4
Joined: Wed Dec 11, 2019 7:04 pm

Incorrect Hardware Detection

Post by ldg346 »

Hello together!

I'm new to this forum, new to DietPi and fairly new to linux in general, but i already run into a problem, which i hope to solve with some help here :)

So i installed DietPi onto a Raspberry Pi 4, configured it (which is super easy - great work!), and successfully ran it for a few days. Then i looked into overclocking Raspberry Pis, and thought to give it a try.

I noticed in the DietPi-Config, that the "extreme" overclocking-option sets the CPU frequency to 1025MHz, which is odd considering the RPi4 runs at 1500MHz out of the box. I googled if somebody had the same issue, but didn't really find nothing helpful, so i tried to solve it on my own and found 2 files:
dietpi-obtain_hw_model
.hw_model
and i figured dietpi-obtain_hw_model creates .hw_model, where the hardware-specs are stored.
Looking at .hw_model, i think that DietPi thinks it is an RPi2.

I edited dietpi-obtain_hw_model according to RPi4 hardware (just edited the "echo"-part at the end), and obviously i didn't do a too bad job, because after a reboot it showed the correct overclocking options in DietPi-Config, and it worked.

But this is just a work around, and i have absolutely no idea why this is happening in the first place, so hopefully someone here can help me figure it out :D


Thanks!
User avatar
MichaIng
Site Admin
Posts: 2418
Joined: Sat Nov 18, 2017 6:21 pm

Re: Incorrect Hardware Detection

Post by MichaIng »

Thanks for reporting. Interesting, actually we estimate the model by revision code. Could you paste the following: cat /proc/cpuinfo
ldg346
Posts: 4
Joined: Wed Dec 11, 2019 7:04 pm

Re: Incorrect Hardware Detection

Post by ldg346 »

Hi MichaIng, thanks for your response!

Here you go:

Code: Select all

dietpi@DietPi:~$ cat /proc/cpuinfo
processor	: 0
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 36.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 1
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 36.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 2
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 36.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 3
model name	: ARMv7 Processor rev 3 (v7l)
BogoMIPS	: 36.00
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

Hardware	: BCM2835
Revision	: c03112
Serial		: 10000000b57243ec
Model		: Raspberry Pi 4 Model B Rev 1.2
dietpi@DietPi:~$ 
Shouldn't the model name of the cpu say ARMv8 or something like that?
At the bottom line it says Pi4 though :?
User avatar
MichaIng
Site Admin
Posts: 2418
Joined: Sat Nov 18, 2017 6:21 pm

Re: Incorrect Hardware Detection

Post by MichaIng »

@ldg346
Indeed you own a new revision that has not been listed anywhere so far. I just added support for it to dev code: https://github.com/MichaIng/DietPi/issu ... -565410350
To apply now:
https://github.com/MichaIng/DietPi/issu ... -565440203
ldg346
Posts: 4
Joined: Wed Dec 11, 2019 7:04 pm

Re: Incorrect Hardware Detection

Post by ldg346 »

Hey MichaIng!
Thanks a lot, it seems like it works now!!

But i'm not sure if i did everything of what you postet in that github-comment right (regarding terminal commands), could you please have a schort look at this?

Code: Select all

dietpi@DietPi:~$ sudo wget https://raw.githubusercontent.com/MichaIng/DietPi/dev/dietpi/func/dietpi-obtain_hw_model -O /DietPi/dietpi/func/dietpi-obtain_hw_model
--2019-12-13 15:26:55--  https://raw.githubusercontent.com/MichaIng/DietPi/dev/dietpi/func/dietpi-obtain_hw_model
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20850 (20K) [text/plain]
Saving to: ‘/DietPi/dietpi/func/dietpi-obtain_hw_model’

/DietPi/dietpi/func/dietpi-obtain_hw_ 100%[=======================================================================>]  20.36K  --.-KB/s    in 0.04s   

2019-12-13 15:26:56 (491 KB/s) - ‘/DietPi/dietpi/func/dietpi-obtain_hw_model’ saved [20850/20850]

dietpi@DietPi:~$ sudo /DietPi/dietpi/func/dietpi-obtain_hw_model
dietpi@DietPi:~$ . /DietPi/dietpi/func/dietpi-globals
dietpi@DietPi:~$ echo $G_HW_MODEL # should now print "4"
4
dietpi@DietPi:~$ sudo /DietPi/dietpi/func/dietpi-set_hardware rpi-eeprom # Install EEPROM updater + update related firmware

 DietPi-Set_hardware
─────────────────────────────────────────────────────
 Mode: rpi-eeprom ()

[ INFO ] DietPi-Set_hardware | Unknown input name (rpi-eeprom). Nothing has been applied.

Available commands:
/DietPi/dietpi/func/dietpi-set_hardware	enableipv6		enable/disable
/DietPi/dietpi/func/dietpi-set_hardware	preferipv4		enable/disable
/DietPi/dietpi/func/dietpi-set_hardware	eth-forcespeed		10/100/1000/disable
/DietPi/dietpi/func/dietpi-set_hardware	wifimodules		enable/disable/onboard_enable/onboard_disable
/DietPi/dietpi/func/dietpi-set_hardware	wificountrycode		GB/US/DE/...
/DietPi/dietpi/func/dietpi-set_hardware	bluetooth		enable/disable
/DietPi/dietpi/func/dietpi-set_hardware	serialconsole		enable/disable		[tty(S|AMA|SAC)[0-9]] (optional Serial/UART device)
/DietPi/dietpi/func/dietpi-set_hardware	i2c			enable/disable/khz
/DietPi/dietpi/func/dietpi-set_hardware	soundcard		target_card (non-matching name for reset to default). Add '-eq' to target_card string to enable ALSA equalizer on card. HW:x,x (specify target card and device index eg: HW:9,1)
/DietPi/dietpi/func/dietpi-set_hardware	remoteir		odroid_remote/justboom_ir_remote # Odroid/RPi only
/DietPi/dietpi/func/dietpi-set_hardware	lcdpanel		target_panel (none to remove all)
/DietPi/dietpi/func/dietpi-set_hardware	headless		enable/disable
/DietPi/dietpi/func/dietpi-set_hardware	gpumemsplit		64/128/256 # RPi only
/DietPi/dietpi/func/dietpi-set_hardware	rpi-camera		enable/disable
/DietPi/dietpi/func/dietpi-set_hardware	rpi-opengl		vc4-kms-v3d/vc4-fkms-v3d/disable
/DietPi/dietpi/func/dietpi-set_hardware	rpi3_usb_boot		enable

[FAILED] rpi-eeprom  | An issue has occurred
dietpi@DietPi:~$ sudo rpi-eeprom
sudo: rpi-eeprom: command not found
dietpi@DietPi:~$ 
--> i just saw after inserting that terminal output, that eeprom-implementation comes with V6.27, so i guess i repeat that steps when i did the update?

Thank you very much!
User avatar
MichaIng
Site Admin
Posts: 2418
Joined: Sat Nov 18, 2017 6:21 pm

Re: Incorrect Hardware Detection

Post by MichaIng »

Ah jep, the EEPROM implementation comes with v6.27
Everything else went fine.

Just in case, please do not apply to beta until I merged v6.27.1 to have the fixed RPi4 implementation inside ;).
ldg346
Posts: 4
Joined: Wed Dec 11, 2019 7:04 pm

Re: Incorrect Hardware Detection

Post by ldg346 »

Alright!

Again, thank you very much!

Good work should be rewarded, so I'm going to donate a few euros :) Keep it up!
Post Reply