J.R. Oldroyd
2006-May-10 22:31 UTC
Regression: apm no longer works between 6.1-RC1 and 6.1-STABLE 2006/05/09
I have just taken the system on a Sony Vaio PCG-Z505SX laptop from 6.1-RC1 (2006/03/23) to 6.1-STABLE (2006/05/09) using a cvsup update and full buildworld/buildkernel rebuild, while keeping the same kernel config. On booting the new system, apm no longer works. Now, acpi never work on this hardware anyway, but apm always worked fine. On the 6.1-STABLE kernel, it doesn't probe or load properly at boot time. For reasons I no longer recall, "device apm" is configured in this kernel, rather than loading it as a module, and this has been fine for years, in fact, since back in the 5.x days and for several 6.0 kernels as well as 6.1-RC1. Here's the pertinent boot info: FreeBSD 6.1-RC1 (2006/03/23): real memory = 134152192 (127 MB) avail memory = 121733120 (116 MB) ACPI disabled by blacklist. Contact your BIOS vendor. npx0: [FAST] npx0: <math processor> on motherboard npx0: INT 16 interface cpu0 on motherboard apm0: <APM BIOS> on motherboard apm0: found APM BIOS v1.2, connected at v1.2 pcib0: <Intel 82443BX host to PCI bridge (AGP disabled)> pcibus 0 on motherboard pir0: <PCI Interrupt Routing Table: 7 Entries> on motherboard FreeBSD 6.1-STABLE (2006/05/09): real memory = 134152192 (127 MB) avail memory = 121733120 (116 MB) ACPI disabled by blacklist. Contact your BIOS vendor. cpu0 on motherboard apm: Other PM system enabled. pcib0: <Intel 82443BX host to PCI bridge (AGP disabled)> pcibus 0 on motherboard pir0: <PCI Interrupt Routing Table: 7 Entries> on motherboard On 6.1-STABLE, the /dev/apm device is not created and so none of the apm tools work. I don't see any changes to any of the apm code (in the last year or so, actually), so this is presumably due to a change at a lower level? Any thoughts? -jr
David Malone
2006-May-11 08:42 UTC
Regression: apm no longer works between 6.1-RC1 and 6.1-STABLE 2006/05/09
On Wed, May 10, 2006 at 06:31:20PM -0400, J.R. Oldroyd wrote:> apm: Other PM system enabled.Could you edit /usr/src/sys/i386/bios/apm.c and a go to line which says: printf("apm: Other PM system enabled.\n"); and replace it with: printf("apm: Other (%d) PM system enabled.\n", (int)power_pm_get_type()); and recompile and install your kernels and modules? I suspect that it will show 1 for the type, which means that acpi has somehow claimed the power management even though it is supposed to be turned off. David.
J.R. Oldroyd
2006-May-11 15:39 UTC
Regression: apm no longer works between 6.1-RC1 and 6.1-STABLE 2006/05/09
On May 11, 09:41, David Malone wrote:> On Wed, May 10, 2006 at 06:31:20PM -0400, J.R. Oldroyd wrote: > > apm: Other PM system enabled. > > Could you edit /usr/src/sys/i386/bios/apm.c and a go to line > which says: > > printf("apm: Other PM system enabled.\n"); > > and replace it with: > > printf("apm: Other (%d) PM system enabled.\n", (int)power_pm_get_type()); > > and recompile and install your kernels and modules? I suspect that > it will show 1 for the type, which means that acpi has somehow > claimed the power management even though it is supposed to be turned > off. > > David.Well, I added this instrumentation, but at the same time I also removed "device apm" from the kernel config and added "apm_load="YES"" to loader.conf.local so that I could play with it more easily. Rebuilt... rebooted... needless to say, it works now! apm0: <APM BIOS> on motherboard apm0: found APM BIOS v1.2, connected at v1.2 Does loading it as a module change the order in which apm and acpi are probed? It looks like I had not edited this kernel config since late 2004, and had used it, i.e., with "device apm" included, for builds of several 6.0 and early 6.1 kernels with apm being fine. In the cvsup I did between 6.1-RC1 and the recent 6.1-STABLE, the following 149 files had been updated. Maybe this will help pinpoint where something was changed... sys/amd64/amd64/busdma_machdep.c sys/amd64/amd64/fpu.c sys/amd64/amd64/identcpu.c sys/amd64/amd64/initcpu.c sys/amd64/amd64/mp_machdep.c sys/amd64/amd64/pmap.c sys/amd64/conf/GENERIC sys/amd64/conf/NOTES sys/amd64/include/md_var.h sys/amd64/include/specialreg.h sys/boot/forth/beastie.4th sys/boot/i386/cdboot/cdboot.s sys/boot/i386/pxeldr/pxeldr.S sys/cam/scsi/scsi_cd.c sys/conf/NOTES sys/conf/files sys/conf/files.alpha sys/conf/files.amd64 sys/conf/files.i386 sys/conf/files.ia64 sys/conf/files.pc98 sys/conf/files.powerpc sys/conf/files.sparc64 sys/conf/newvers.sh sys/conf/options sys/contrib/pf/net/pf_norm.c sys/dev/acpica/Osd/OsdSchedule.c sys/dev/ata/ata-all.c sys/dev/ata/ata-all.h sys/dev/ata/ata-disk.c sys/dev/ata/ata-queue.c sys/dev/ata/ata-raid.c sys/dev/ata/atapi-cam.c sys/dev/ata/atapi-cd.c sys/dev/ata/atapi-fd.c sys/dev/ath/if_ath.c sys/dev/bfe/if_bfe.c sys/dev/fxp/if_fxp.c sys/dev/hme/if_hme.c sys/dev/mii/brgphy.c sys/dev/mii/miidevs sys/dev/sound/isa/ad1816.c sys/dev/sound/isa/mss.c sys/dev/sound/pci/csapcm.c sys/dev/sound/pci/ich.c sys/dev/sound/pci/via8233.c sys/dev/sound/pci/atiixp.c sys/dev/sound/pcm/channel.c sys/dev/sound/pcm/dsp.c sys/dev/sound/pcm/mixer.c sys/dev/sound/pcm/sound.c sys/dev/sound/pcm/sound.h sys/dev/sound/pcm/vchan.c sys/dev/sound/usb/uaudio.c sys/dev/usb/hid.c sys/dev/usb/umass.c sys/dev/usb/if_ural.c sys/dev/atkbdc/psm.c sys/dev/le/am7990.c sys/dev/le/am79900.c sys/dev/ipw/if_ipw.c sys/dev/ipw/if_ipwvar.h sys/fs/fifofs/fifo_vnops.c sys/geom/gate/g_gate.c sys/geom/gate/g_gate.h sys/geom/mirror/g_mirror.c sys/geom/geom_bsd.c sys/geom/nop/g_nop.c sys/geom/raid3/g_raid3.c sys/geom/stripe/g_stripe.c sys/geom/stripe/g_stripe.h sys/geom/shsec/g_shsec.c sys/geom/shsec/g_shsec.h sys/geom/eli/g_eli.c sys/geom/zero/g_zero.c sys/gnu/fs/ext2fs/ext2_bitops.h sys/i386/conf/GENERIC sys/i386/conf/NOTES sys/i386/i386/busdma_machdep.c sys/i386/i386/identcpu.c sys/i386/i386/initcpu.c sys/i386/i386/machdep.c sys/i386/i386/mem.c sys/i386/i386/mp_machdep.c sys/i386/include/md_var.h sys/i386/include/specialreg.h sys/i386/isa/npx.c sys/ia64/ia64/nexus.c sys/kern/kern_event.c sys/kern/kern_intr.c sys/kern/kern_synch.c sys/kern/kern_thread.c sys/kern/md5c.c sys/kern/subr_sleepqueue.c sys/kern/subr_taskqueue.c sys/kern/subr_turnstile.c sys/kern/subr_witness.c sys/kern/tty_pty.c sys/kern/uipc_mbuf.c sys/kern/vfs_lookup.c sys/kern/vfs_subr.c sys/modules/Makefile sys/modules/ath/Makefile sys/modules/smbfs/Makefile sys/net/if_bridge.c sys/net/if_media.h sys/net/if_ppp.c sys/net/route.h sys/net/rtsock.c sys/net80211/ieee80211_ioctl.c sys/net80211/ieee80211_output.c sys/netgraph/netflow/netflow.c sys/netgraph/netflow/netflow.h sys/netinet6/ip6_mroute.c sys/netinet6/ipsec.c sys/netinet6/nd6.c sys/netipsec/ipsec.h sys/netipsec/ipsec_mbuf.c sys/netipsec/xform.h sys/netipsec/xform_ah.c sys/netipsec/xform_esp.c sys/netipsec/xform_ipcomp.c sys/netipsec/xform_ipip.c sys/netipx/ipx_ip.c sys/netsmb/smb_crypt.c sys/netsmb/smb_smb.c sys/nfsclient/nfs_bio.c sys/nfsclient/nfs_socket.c sys/nfsclient/nfs_vnops.c sys/nfsserver/nfs_srvsubs.c sys/nfsserver/nfsrvcache.h sys/sparc64/include/asi.h sys/sparc64/sparc64/eeprom.c sys/sparc64/sparc64/exception.S sys/sparc64/sparc64/interrupt.S sys/sparc64/sparc64/machdep.c sys/sparc64/sparc64/mp_machdep.c sys/sparc64/sparc64/tick.c sys/sys/ata.h sys/sys/interrupt.h sys/sys/mbuf.h sys/sys/md5.h sys/sys/param.h sys/sys/systm.h sys/sys/taskqueue.h sys/ufs/ffs/ffs_softdep.c sys/ufs/ufs/ufs_quota.c sys/ufs/ufs/ufsmount.h sys/vm/vm_contig.c