GNOME Bugzilla – Bug 777149
Does not detect AC adapter on Apple hardware
Last modified: 2017-03-13 12:49:13 UTC
It is "ADPx" on (some?) Apple hardware instead of "ACx". Relevant line is 249 in src/power-monitor.c
Created attachment 343435 [details] [review] Detect AC adapter on Apple hardware On Apple hardware the sysfs directory for the mains power supply is called ADPx and not ACx.
You should either use UPower, or check for the power_supply type for udev devices instead of hardcoding names.
I completely agree that utilizing udev is be the right way to go but, after also consulting Own on that matter, we agreed that for now I will commit that quick fix and them maybe later rewrite the whole code to use udev.
Attachment 343435 [details] pushed as c7c2928 - Detect AC adapter on Apple hardware