Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5907

Troubleshooting • Re: Fan and USB wont shut down after shutdown / booting

$
0
0
take a fresh uSD with latest Raspberry Pi OS - https://www.raspberrypi.com/software/

Disconnect additional hardware - in particular USB drives as you may have one that back powers your Pi - and boot the Pi with only keyboard/mouse/monitor attached.
Report back on the fan behavior.
With a fresh install of the newest Raspberry Pi OS on a SD card and no usb plugged in (not even keyboard or mouse) I am able to shut down the rpi remotely using SSH and it still exhibits the same behavior. No matter what I do, SD card, USB stick or NVMe install it will now always spin up the fan loudly when the red light turns on. This just started happening recently out of the blue for seemingly no reason. I did install the newest eeprom recently but cannot be 100% sure that is what triggered it since I updated to see if it would fix another issue I was having with a corrupt SD card that I was trying to troubleshoot as I mention in my first post just in case that is relevant.

It seems that either something in the hardware got fried and luckily everything still works except the shutdown sequence, or else there is some kind of new bootloader or other permanent change that is causing this since it worked as expected for a few months.

As I mentioned above, I was even going as far to find out how to flip the fan to 0 speed with the help of chatgpt in a shutdown script and it would turn the fan completely off while the rpi was shutting down, but the green light was still on. As soon as it changes to a red light the fan spins up 100% speed and the only way to stop it is to pull the power cord.
this is either a damage to the fan itself or to your Pi.
As your able to use SSH with no issues run below commands and post the results:

1. check your hardware monitoring devices

Code:

ls -l /sys/class/hwmon/
on my DUT this gives me

Code:

total 0lrwxrwxrwx 1 root root 0 Jan  1  1970 hwmon0 -> ../../devices/virtual/thermal/thermal_zone0/hwmon0lrwxrwxrwx 1 root root 0 Jan  1  1970 hwmon1 -> ../../devices/platform/axi/1000110000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/nvme/nvme0/hwmon1lrwxrwxrwx 1 root root 0 Sep  9 11:24 hwmon2 -> ../../devices/platform/cooling_fan/hwmon/hwmon2lrwxrwxrwx 1 root root 0 Sep  9 11:24 hwmon3 -> ../../devices/platform/axi/1000120000.pcie/1f000c8000.adc/hwmon/hwmon3lrwxrwxrwx 1 root root 0 Sep  9 11:24 hwmon4 -> ../../devices/platform/soc/soc:firmware/raspberrypi-hwmon/hwmon/hwmon4
--> 'cooling_fan' is of interest!

2. Now get more details on that:

Code:

grep -s . /sys/class/thermal/thermal_zone*/* /sys/class/thermal/cooling_device*/*
on my DUT this gives me below data. Please not that I'm using a custom fan-curve, but post your results for review.

Code:

/sys/class/thermal/thermal_zone0/available_policies:step_wise /sys/class/thermal/thermal_zone0/available_policies:step_wise /sys/class/thermal/thermal_zone0/cdev0_trip_point:1/sys/class/thermal/thermal_zone0/cdev0_weight:0/sys/class/thermal/thermal_zone0/cdev1_trip_point:2/sys/class/thermal/thermal_zone0/cdev1_weight:0/sys/class/thermal/thermal_zone0/cdev2_trip_point:3/sys/class/thermal/thermal_zone0/cdev2_weight:0/sys/class/thermal/thermal_zone0/cdev3_trip_point:4/sys/class/thermal/thermal_zone0/cdev3_weight:0/sys/class/thermal/thermal_zone0/cdev4_trip_point:0/sys/class/thermal/thermal_zone0/cdev4_weight:0/sys/class/thermal/thermal_zone0/integral_cutoff:0/sys/class/thermal/thermal_zone0/k_d:0/sys/class/thermal/thermal_zone0/k_i:0/sys/class/thermal/thermal_zone0/k_po:0/sys/class/thermal/thermal_zone0/k_pu:0/sys/class/thermal/thermal_zone0/mode:enabled/sys/class/thermal/thermal_zone0/offset:450000/sys/class/thermal/thermal_zone0/policy:step_wise/sys/class/thermal/thermal_zone0/slope:-550/sys/class/thermal/thermal_zone0/sustainable_power:0/sys/class/thermal/thermal_zone0/temp:37500/sys/class/thermal/thermal_zone0/trip_point_0_hyst:0/sys/class/thermal/thermal_zone0/trip_point_0_temp:110000/sys/class/thermal/thermal_zone0/trip_point_0_type:critical/sys/class/thermal/thermal_zone0/trip_point_1_hyst:2000/sys/class/thermal/thermal_zone0/trip_point_1_temp:36000/sys/class/thermal/thermal_zone0/trip_point_1_type:active/sys/class/thermal/thermal_zone0/trip_point_2_hyst:3000/sys/class/thermal/thermal_zone0/trip_point_2_temp:40000/sys/class/thermal/thermal_zone0/trip_point_2_type:active/sys/class/thermal/thermal_zone0/trip_point_3_hyst:4000/sys/class/thermal/thermal_zone0/trip_point_3_temp:52000/sys/class/thermal/thermal_zone0/trip_point_3_type:active/sys/class/thermal/thermal_zone0/trip_point_4_hyst:5000/sys/class/thermal/thermal_zone0/trip_point_4_temp:58000/sys/class/thermal/thermal_zone0/trip_point_4_type:active/sys/class/thermal/thermal_zone0/type:cpu-thermal/sys/class/thermal/cooling_device0/cur_state:2/sys/class/thermal/cooling_device0/max_state:4/sys/class/thermal/cooling_device0/type:pwm-fan
3. read the current PWM value

Code:

sudo cat /sys/class/hwmon/hwmon2/pwm1
My fan is in 'state 2' --> the expected PWM value is 150.

As your fan is spinning full-speed you should read 255.

4. change the PWM to different values
-> Full-speed (as mine isn't running at full-speed atm)

Code:

echo "255" | sudo tee -a "/sys/class/hwmon/hwmon2/pwm1"
-> OFF

Code:

echo "0" | sudo tee -a "/sys/class/hwmon/hwmon2/pwm1"
-> Full-speed

Code:

echo "255" | sudo tee -a "/sys/class/hwmon/hwmon2/pwm1"
Whenever I switch to non-zero value the kernel driver takes over, switching to the value according to the defined fan-curve.

What are your results?

Statistics: Posted by aBUGSworstnightmare — Tue Oct 15, 2024 11:28 am



Viewing all articles
Browse latest Browse all 5907

Trending Articles