aBUGSworstnightmare
Posts: 1079
Joined: Tue Jun 30, 2015 1:35 pm

Trigger(s)/conditions for power symbol in taskbar

Fri Sep 07, 2018 7:19 am

Hi,
I'm currently working on a 'dt-blob.bin' for my CM3L baseboard and hit a problem which I would like to get answered.

Sometimes I have a better symbol in my taskbar, which shows battery status (charge) is 0%, running on external power.
battery symbol.jpg
battery symbol
battery symbol.jpg (11.55 KiB) Viewed 380 times
I now need to know what is triggering this symbol (as there is neither a battery, nor a charge circuit in my design).
2018-09-06-203136_1280x800_scrot.jpg
screenshot of the desktop
2018-09-06-203136_1280x800_scrot.jpg (62.7 KiB) Viewed 380 times
Here is the device tree source which leads (sometimes) to this.

Code: Select all

/dts-v1/;

/ {
  videocore {

    pins_cm {

      pin_config {

        [email protected] {
          polarity = "active_high";
          termination = "pull_down";
          startup_state = "inactive";
          function = "input";
        }; // pin

        // BANK 0 - USER GPIO //
        [email protected]  { function = "input";   termination = "pull_up";    }; // GPU WILL USE THIS PIN FOR CAMERA 0 I2C0 SDA
        [email protected]  { function = "input";   termination = "pull_up";    }; // GPU WILL USE THIS PIN FOR CAMERA 0 I2C0 SCL
        [email protected]  { function = "output";  termination = "no_pulling"; }; // GPU WILL USE THIS PIN FOR CAMERA 0 LED
        [email protected]  { function = "output";  termination = "no_pulling"; }; // GPU WILL USE THIS PIN FOR CAMERA 0 SHUTDOWN
        [email protected]  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        [email protected]  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        [email protected]  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        [email protected]  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        [email protected]  { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        [email protected]  { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
///////////////////////////////////////////
// TO ENABLE UART0 UNCOMMENT THESE 2 LINES:
//       [email protected] { function = "uart0";   termination = "no_pulling"; }; // UART0 TX
//       [email protected] { function = "uart0";   termination = "pull_up";    }; // UART0 RX
// AND COMMENT OUT/REMOVE THESE 2 LINES:
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
///////////////////////////////////////////
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE

        // BANK 1 - USER GPIO//
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE WAS INPUT NO PULL
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE WAS INPUT NO PULL
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_up";    }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE WAS INPUT NO PULL
        [email protected] { function = "input";   termination = "pull_down";  }; // DEFAULT STATE WAS INPUT NO PULL

        // BANK 2 - DON'T TOUCH UNLESS YOU KNOW WHAT YOU'RE DOING //
        [email protected] { function = "input";   termination = "no_pulling"; drive_strength_mA = <8>; polarity = "active_high"; }; // HPD_N
        [email protected] { function = "output";  termination = "no_pulling"; drive_strength_mA = <8>; polarity = "active_low"; startup_state = "active"; }; // STATUS LED / EMMC_DISABLE_N CONTROL
        [email protected] { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD CLK
        [email protected] { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD CMD
        [email protected] { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD D0
        [email protected] { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD D1
        [email protected] { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD D2
        [email protected] { function = "sdcard";  termination = "pull_up";    drive_strength_mA = <8>; }; // SD D3

      }; // pin_config

      pin_defines {
        [email protected]_ENABLE {
           type = "internal";
           number = <47>;
        };
        [email protected]_CAMERAS {
          type = "internal";
          number = <1>;
        };
        [email protected]_0_LED {
          type = "internal";
          number = <2>;
        };
        [email protected]_0_SHUTDOWN {
          type = "internal";
          number = <3>;
        };
        [email protected]_0_UNICAM_PORT {
          type = "internal";
          number = <1>;
        };
        [email protected]_0_I2C_PORT {
          type = "internal";
          number = <0>;
        };
        [email protected]_0_SDA_PIN {
          type = "internal";
          number = <0>;
        };
        [email protected]_0_SCL_PIN {
          type = "internal";
          number = <1>;
        };
      }; // pin_defines

    }; // pins_cm

    pins_cm3 {

      pin_config {

        [email protected] {
           polarity = "active_high";
           termination = "pull_down";
           startup_state = "inactive";
           function = "input";
        }; // pin

        [email protected]  { function = "input";  termination = "pull_up";    }; // CAMERA 0 I2C0 SDA
        [email protected]  { function = "input";  termination = "pull_up";    }; // CAMERA 0 I2C0 SCL
        [email protected]  { function = "output"; termination = "no_pulling"; }; // CAMERA 0 LED
        [email protected]  { function = "output"; termination = "no_pulling"; }; // CAMERA 0 SHUTDOWN
        [email protected]  { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // BL_EN
        [email protected]  { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // PWM


        [email protected] { function = "uart0";  termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0
        [email protected] { function = "uart0";  termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0
        [email protected] { function = "input";  termination = "pull_up";    }; // SMPS_SCL
        [email protected] { function = "input";  termination = "pull_up";    }; // SMPS_SDA
        [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD CLK
        [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD CMD
        [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D0
        [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D1
        [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D2
        [email protected] { function = "sdcard"; termination = "pull_up";    drive_strength_mA = < 8 >; }; // SD D3
        [email protected] { function = "input";  termination = "no_pulling"; polarity = "active_low"; }; // Hotplug
        [email protected] { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N
      }; // pin_config

      pin_defines {
        [email protected]_CONTROL_ATTACHED {
           type = "external";
           number = <0>;
        };
        [email protected]_ENABLE {
           type = "external";
           number = <1>;
        };
        [email protected]_LOW {
           type = "absent";
        };
        [email protected]_DISK_ACTIVITY {
           type = "absent";
        };
        [email protected]_RUN {
           type = "absent";
        };
        [email protected]_SDA {
           type = "internal";
           number = <46>;
        };
        [email protected]_SCL {
           type = "internal";
           number = <47>;
        };
        [email protected]_CLK {
           type = "absent";
        };
        [email protected]_LPO_CLK {
           type = "absent";
        };
        [email protected]_LIMIT_1A2 {
           type = "absent";
        };
        [email protected]_1V8_SEL {
           type = "absent";
        };
        [email protected] {
           type = "absent";
        };
        [email protected] {
           type = "absent";
        };
        [email protected]_MODE {
           type = "absent";
        };
        [email protected]_CARD_DETECT {
           type = "absent";
        };
        [email protected]_SDA {
           type = "absent";
        };
        [email protected]_SCL {
           type = "absent";
        };

        [email protected]_CAMERAS {
          type = "internal";
          number = <1>;
        };
        [email protected]_0_LED {
          type = "internal";
          number = <43>;
        };
        [email protected]_0_SHUTDOWN {
          type = "internal";
          number = <42>;
        };
        [email protected]_0_UNICAM_PORT {
          type = "internal";
          number = <0>;
        };
        [email protected]_0_I2C_PORT {
          type = "internal";
          number = <0>;
        };
        [email protected]_0_SDA_PIN {
          type = "internal";
          number = <44>;
        };
        [email protected]_0_SCL_PIN {
          type = "internal";
          number = <45>;
        };
      }; // pin_defines

    }; // pins_cm3

  };

};

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1879
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Trigger(s)/conditions for power symbol in taskbar

Fri Sep 07, 2018 8:12 am

Interesting. When you see the battery plugin appear, does "/sys/class/power_supply" exist? If so, can you "tar" up the contents (something like:

Code: Select all

tar cvf power.tar -C /sys/class/power_supply .
) and upload it somewhere I can download it?

douglas5962
Posts: 17
Joined: Thu Mar 29, 2018 2:22 pm

Re: Trigger(s)/conditions for power symbol in taskbar

Fri Sep 07, 2018 4:19 pm

Just to chime in, I am having a very similar issue on Raspbian whenever I plug in a Symbol barcode reader. If you hover over the icon there's a tool tip that says the indicator is for the Pi-top laptop battery. For me this is happening with clean Raspbian installs on a CM3 and 3B+ with absolutely no Pi-top software installed.

aBUGSworstnightmare
Posts: 1079
Joined: Tue Jun 30, 2015 1:35 pm

Re: Trigger(s)/conditions for power symbol in taskbar

Thu Sep 13, 2018 7:32 am

Did not manage to replicate the issue. As I'm still in testing phase, changing things on my dt-blob frequently, I will keep looking for this.

First (quick feedback): "/sys/class/power_supply" always exists on my system. I've had a brief look and it shows records/reference of my BT keyboards battery. Honestly speaking, never had any issues/reports of low batteries so far on Raspbian (only know my Apple is reporting this)

Return to “Compute Module”