Benjamin-Loison / EmbeddedController

Embedded Controller firmware for the Framework Laptop
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Reduce power button brightness on Linux Mint #2

Open Benjamin-Loison opened 8 months ago

Benjamin-Loison commented 8 months ago

https://community.frame.work/t/turn-off-power-led/11967/3

Related to Benjamin-Loison/cinnamon/issues/67#issuecomment-2146256288 and #11.

+5

Benjamin-Loison commented 2 weeks ago

Related to #13.

Benjamin-Loison commented 2 weeks ago
ectool help
Output: ``` Usage: ectool [--dev=n] [--interface=dev|i2c|lpc] [--i2c_bus=n][--name=cros_ec|cros_fp|cros_pd|cros_scp|cros_ish] [--ascii] [params] --i2c_bus=n Specifies the number of an I2C bus to use. For example, to use /dev/i2c-7, pass --i2c_bus=7. Implies --interface=i2c. Commands: adcread Read an ADC channel. addentropy [reset] Add entropy to device secret apreset Issue AP reset autofanctrl Turn on automatic fan speed control. backlight Enable/disable LCD backlight battery Prints battery info batterycutoff [at-shutdown] Cut off battery output power batteryparam Read or write board-specific battery parameter boardversion Prints the board version button [vup|vdown|rec] Simulates button press. cbi Get/Set/Remove Cros Board Info chargecurrentlimit Set the maximum battery charging current chargecontrol Force the battery to stop charging or discharge chargeoverride Overrides charge port selection logic chargestate Handle commands related to charge state v2 (and later) chipinfo Prints chip info cmdversions Prints supported version mask for a command number console Prints the last output to the EC debug console cec Read or write CEC messages and settings echash [CMDS] Various EC hash commands eventclear Clears EC host events flags where mask has bits set eventclearb Clears EC host events flags copy B where mask has bits set eventget Prints raw EC host event flags eventgetb Prints raw EC host event flags copy B eventgetscimask Prints SCI mask for EC host events eventgetsmimask Prints SMI mask for EC host events eventgetwakemask Prints wake mask for EC host events eventsetscimask Sets the SCI mask for EC host events eventsetsmimask Sets the SMI mask for EC host events eventsetwakemask Sets the wake mask for EC host events extpwrlimit Set the maximum external power limit fanduty Forces the fan PWM to a constant duty cycle flasherase Erases EC flash flasheraseasync Erases EC flash asynchronously flashinfo Prints information on the EC flash flashspiinfo Prints information on EC SPI flash, if present flashpd Flash commands over PD flashprotect [now] [enable | disable] Prints or sets EC flash protection state flashread Reads from EC flash to a file flashwrite Writes to EC flash from a file forcelidopen Forces the lid switch to open position fpcontext Sets the fingerprint sensor context fpencstatus Prints status of Fingerprint sensor encryption engine fpframe Retrieve the finger image as a PGM image fpinfo Prints information about the Fingerprint sensor fpmode [capture|deepsleep|fingerdown|fingerup] Configure/Read the fingerprint sensor current mode fpseed Sets the value of the TPM seed. fpstats Prints timing statisitcs relating to capture and matching fptemplate [|] Add a template if is provided, else dump it gpioget Get the value of GPIO signal gpioset Set the value of GPIO signal hangdetect | stop | start Configure or start/stop the hang detect timer hello Checks for basic communication with EC hibdelay [sec] Set the delay before going into hibernation hostsleepstate Report host sleep state to the EC hostevent Get & set host event masks. i2cprotect [status] Protect EC's I2C bus i2cread Read I2C bus i2cwrite Write I2C bus i2cxfer [write bytes...] Perform I2C transfer on EC's I2C bus infopddev Get info about USB type-C accessory attached to port inventory Return the list of supported features kbfactorytest Scan out keyboard if any pins are shorted kbid Get keyboard ID of supported keyboards kbinfo Dump keyboard matrix dimensions kbpress Simulate key press keyscan Test low-level key scanning led | =...> Set the color of an LED or query brightness range lightbar [CMDS] Various lightbar control commands mkbpget Get MKBP buttons/switches supported mask and current state mkbpwakemask [mask] Get or Set the MKBP event wake mask, or host event wake mask motionsense [CMDS] Various motion sense control commands panicinfo Prints saved panic info pause_in_s5 [on|off] Whether or not the AP should pause in S5 on shutdown pdcontrol [suspend|resume|reset|disable|on] Controls the PD chip pdchipinfo Get PD chip information pdlog Prints the PD event log entries pdwritelog Writes a PD event log of the given pdgetmode Get All USB-PD alternate SVIDs and modes on pdsetmode Set USB-PD alternate SVID and mode on port80flood Rapidly write bytes to port 80 port80read Print history of port 80 write powerinfo Prints power-related information protoinfo Prints EC host protocol information pse Get and set PoE PSE port power status pstoreinfo Prints information on the EC host persistent storage pstoreread Reads from EC host persistent storage to a file pstorewrite Writes to EC host persistent storage from a file pwmgetfanrpm [ | all] Prints current fan RPM pwmgetkblight Prints current keyboard backlight percent pwmgetnumfans Prints the number of fans present pwmgetduty Prints the current 16 bit duty cycle for given PWM pwmsetfanrpm Set target fan RPM pwmsetkblight Set keyboard backlight in percent pwmsetduty Set 16 bit duty cycle of given PWM rand generate of random numbers readtest Reads a pattern from the EC via LPC reboot_ec [at-shutdown|switch-slot] Reboot EC to RO or RW reboot_ap_on_g3 Requests that the EC will automatically reboot the AP the next time we enter the G3 power state. rollbackinfo Print rollback block information rtcget Print real-time clock rtcgetalarm Print # of seconds before real-time clock alarm goes off. rtcset

pwm occurrences do not seem interesting.

Should check entry by entry and possible new commits.

Benjamin-Loison commented 1 week ago

Note that sometimes the power LED is blinking for an unknown reason and being able to set a lower brightness or even 0 would be nice.

Benjamin-Loison commented 2 days ago

Especially relevant when laptop is suspend, hence the power LED is blinking and the lid is not closed, as it can literally light up the whole room in the dark.