Debian kernel: blue heartbeat LED not working

Post Reply
bdrung
Posts: 4
Joined: Mon Dec 24, 2018 3:06 am
languages_spoken: English,German
ODROIDs: 2x HC1 and a C2
Contact:

Debian kernel: blue heartbeat LED not working

Unread post by bdrung » Mon Dec 24, 2018 3:24 am

I am using a stock Debian testing installation (based on the description on https://wiki.debian.org/InstallingDebianOn/OdroidHC1 with some tweaks) on my Odroid HC1. This includes the kernel from Debian. Also flash-kernel and u-boot from Debian are used. The only code from outside of Debian are the three boot blob files. exynos5422-odroidhc1.dtb from the kernel is used. The system is more or less working, but the blue LED is not working. It stays completely black. The kernel log shows errors regarding it:

Code: Select all

[   14.718000] leds_pwm pwmleds: unable to request PWM for blue:heartbeat: -517
[   14.731529] cpu cpu0: Linked as a consumer to regulator.44
[   14.731722] s3c2410-wdt 101d0000.watchdog: watchdog inactive, reset disabled, irq disabled
[   14.750653] exynos-trng 10830600.rng: Exynos True Random Number Generator.
[   14.752948] leds_pwm pwmleds: unable to request PWM for blue:heartbeat: -517
[   14.760407] cpu cpu4: Linked as a consumer to regulator.40
[   14.771394] leds_pwm pwmleds: unable to request PWM for blue:heartbeat: -517
[   14.799319] leds_pwm pwmleds: unable to request PWM for blue:heartbeat: -517
The full dmesg output is attached. It tested linux 4.18.20-2 (from testing) and 4.19.9-1 (from unstable). Both show the same log output and result.

I offer my help for debugging and bisecting.
Attachments
dmesg.log
(24.65 KiB) Downloaded 3 times
Debian & Ubuntu Developer

User avatar
igorpec
Posts: 270
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Contact:

Re: Debian kernel: blue heartbeat LED not working

Unread post by igorpec » Mon Dec 24, 2018 5:52 am

Generic Debian kernel is ... too generic - not every features gets upstream, gets late or they are intentionally left out/disabled.
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools

bdrung
Posts: 4
Joined: Mon Dec 24, 2018 3:06 am
languages_spoken: English,German
ODROIDs: 2x HC1 and a C2
Contact:

Re: Debian kernel: blue heartbeat LED not working

Unread post by bdrung » Fri Jan 11, 2019 10:34 am

That comment isn't helpful.

I figured out that the blue LED is working, but no trigger is configured by default causing the LED to stay off:

Code: Select all

cat /sys/class/leds/blue\:heartbeat/trigger 
[none] kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock usb-gadget usb-host disk-activity disk-read disk-write ide-disk mtd nand-disk cpu cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 panic mmc0
Linux 4.20 does not produce this kernel log message. A git bisect between 4.19 and 4.20 revealed following patch:

Code: Select all

commit 9aec30371fb095a0c9415f3f0146ae269c3713d8 (HEAD)
Author: Jerome Brunet <jbrunet@baylibre.com>
Date:   Thu Sep 6 15:59:04 2018 +0200

    leds: pwm: silently error out on EPROBE_DEFER

    When probing, if we fail to get the pwm due to probe deferal, we shouldn't
    print an error message. Just be silent in this case.

    Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
    Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>

diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c
index df80c89ebe7f..5d3faae51d59 100644
--- a/drivers/leds/leds-pwm.c
+++ b/drivers/leds/leds-pwm.c
@@ -100,8 +100,9 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
                led_data->pwm = devm_pwm_get(dev, led->name);
        if (IS_ERR(led_data->pwm)) {
                ret = PTR_ERR(led_data->pwm);
-               dev_err(dev, "unable to request PWM for %s: %d\n",
-                       led->name, ret);
+               if (ret != -EPROBE_DEFER)
+                       dev_err(dev, "unable to request PWM for %s: %d\n",
+                               led->name, ret);
                return ret;
        }
Debian & Ubuntu Developer

User avatar
igorpec
Posts: 270
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Contact:

Re: Debian kernel: blue heartbeat LED not working

Unread post by igorpec » Fri Jan 11, 2019 4:43 pm

bdrung wrote:
Fri Jan 11, 2019 10:34 am
That comment isn't helpful.
Big picture is generally more important than a single small problem you are facing ATM.

Board specific functions (LEDs are most banal example) are mostly only prepared (support is build into the kernel) but commonly disabled by default. You are facing typical issue/diff between board specific kernel and upstream kernel used in Debian/Ubuntu/*. Everything else might be the same, but such things. I am just telling you what you will eventually figure out by yourself.

This is forum and perhaps somebody else might be happy for not wasting afternoons figuring this out.
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest