Looking at interfaces definition and snapd code, there’s no interface for these sysfs interfaces:
axp20x sysfs interface: /sys/power/axp_pmu/ac/connected
Non-standard interface and requires a patch.
Thermal interface: /sys/class/thermal/thermal_zone0/temp
Standard interface.
It makes sense to request a new interface for thermal as it is standard, but not for the first one…
Do you have plans to allow this thru gadget as it is hardware related ?
kyleN
July 9, 2018, 4:03pm
2
Hi,
It turns out that hardware-observe provides read access to the thermal path needed:
# used by lscpu and 'lspci -A intel-conf1/intel-conf2' capability sys_rawio, # see loaded kernel modules @{PROC}/modules r, # used by lspci capability sys_admin, /etc/modprobe.d/{,*} r, /lib/modprobe.d/{,*} r, # files in /sys pertaining to hardware (eg, 'lspci -A linux-sysfs') /sys/{block,bus,class,devices,firmware}/{,**} r, # files in /proc/bus/pci (eg, 'lspci -A linux-proc') @{PROC}/bus/pci/{,**} r, # DMI tables /sys/firmware/dmi/tables/DMI r, /sys/firmware/dmi/tables/smbios_entry_point r,
1 Like
vtinelli:
Looking at interfaces definition and snapd code, there’s no interface for these sysfs interfaces:
axp20x sysfs interface: /sys/power/axp_pmu/ac/connected
Do you just need read-only access? /sys/power is standard, even if /sys/power/axp_pmu is not, so this could be something to consider adding to hardware-observe.
read-only access is fine for our use-case.
snap already has hardware-observe, probably got confused by failures related to other path.
Will check again and update the thread.
Thanks, I’ll add this to the next batch of updates.