Date: Sun, 07 Dec 2014 01:04:04 -0800 From: Colin Percival <cperciva@freebsd.org> To: freebsd-acpi@freebsd.org Subject: Re: ENXIOing non-present battery Message-ID: <54841804.5050700@freebsd.org> In-Reply-To: <54840FBA.5050409@obluda.cz> References: <54840781.70603@freebsd.org> <54840FBA.5050409@obluda.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/07/14 00:28, Dan Lukes wrote: > Colin Percival wrote: >> it seems like not attaching a non-present battery would be a good idea. This shouldn't be the default behaviour, since >> there are plenty of systems where a non-present battery might be inserted at >> a later time; but I see nothing wrong with adding an option. >> >> The attached patch adds a acpi.cmbat.hide_not_present loader tunable which, >> as the name suggests, hides non-present batteries; this is done in the probe >> code by returning ENXIO >> >> Any objections to me committing this? > > No, but it may be more useful to create more generalized interface. I agree in theory, but do you have any idea how to do this? > A remember broken ACPI with issues related to ghost floppy drive when no > real floppy drive has been present. > > Not only battery, but any device should be considered non-attachable > upon administrator request. In the case of my laptop, the only way I can see to distinguish between the real battery and the "ghost" battery is that the latter returns zero from acpi_BatteryIsPresent; and that won't work for non-battery devices. There is, of course, the option of using debug.apci.disabled to disable complete subsystems, but I only want to hide the ghost battery, not the real one. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54841804.5050700>