laptop-mode-tools icon indicating copy to clipboard operation
laptop-mode-tools copied to clipboard

USB-C power supply might not be reported

Open rwappler opened this issue 2 years ago • 0 comments

Describe the bug I am sitting here on a Thinkpad T14 AMD Gen 2a. The power supply is connected via USB-C. However, kernel does not report it as USB-Device or power delivery. Therefore /sys/class/power_supply/*/online will never be 1. Therefore laptop-mode will always be active.

Fix suggested in https://github.com/rickysarraf/laptop-mode-tools/pull/192

To Reproduce Steps to reproduce the behavior:

  1. Use power supply via USB-C that is not detected by the kernel
  2. run laptop_mode status
  3. laptop-mode will always be active.

Expected behavior

In absence of an AC power supply, the battery status should be used, to determine, whether to activate laptop-mode or not. I.e. activate it based on BATTERY_NOT_DISCHARGING

Screenshots n/a

Important Information:

  • Distribution: gentoo
  • Linux Kernel: 6.0.3 x86_64
  • Laptop Mode Tools version: 1.74
  • Desktop Environment, if any: kde plasma
  • Relevant System Logs: n/a
  • Laptop Mode Tools verbose logs: n/a

Additional context Add any other context about the problem here.

rwappler avatar Oct 29 '22 17:10 rwappler