Smart Batterie

meeb

Well-Known Member
Hallo zusammen,

ich habe hier ein Travelmate 4000. Auf dem Teil hätte ich gerne FreeBSD installiert, möchte aber auch gerne den Batteriestatus auslesen. Verbaut ist eine Smartbatterie. Unter Linux lässt sich das wohl machen, wie ist das mit FreeBSD?
 
Wenn das Mainboard die von den Sensoren gelieferten Daten per ACPI zur Verfügung stellt, sollte dies kein Problem darstellen. Du brauchst nicht einmal das schrottige /proc ;)
 
Ob das so ist kann ich garnicht sagen. Bei meinem ersten und einzigen Versuch die Batterie mit FreeBSD auszulesen klappte das mal garnicht. Ich werde das wohl schlicht versuchen müssen.

Auf jeden Fall mal Danke.
 
Danke für die Antworten, aber ich werde das wohl einfach mal versuche müssen. Oder hat hier jemand so ein Travelmate unter FreeBSD am laufen und kann mir sicher sagen das das dann unter FreeBSD tut?
 
Smart batteries werden noch nicht unterstützt. Was unterstützt wird, sind die deutlich weiter verbreiteten control-method Batteries.
 
Naja, so low priority ist das nicht:

Date: Sun, 23 Oct 2005 00:20:13 +0000 (UTC)
From: Nate Lawson <njl@FreeBSD.org>
Subject: cvs commit: src/sys/dev/acpica acpi_smbat.c acpi_smbus.h
To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org,
cvs-all@FreeBSD.org
Message-ID: <200510230020.j9N0KD4g046756@repoman.freebsd.org>

njl 2005-10-23 00:20:13 UTC

FreeBSD src repository

Added files:
sys/dev/acpica acpi_smbat.c acpi_smbus.h
Log:
Import ACPI smart battery support. Newer systems (Acer, mostly) do not
support the CM-battery interface. Smart batteries can eventually be
supported without ACPI via a separate SMBus interface. The ACPI interface
uses the embedded controller for reading/writing to the SMBus, and normal
ASL definitions for locating the battery controller (since SMBus can't be
enumerated.) Also import definitions for the smart battery interface.

This was written by Hans Petter Selasky with minor cleanups from myself.

Submitted by: Hans Petter Selasky <hselasky / c2i.net>

Revision Changes Path
1.1 +402 -0 src/sys/dev/acpica/acpi_smbat.c (new)
1.1 +285 -0 src/sys/dev/acpica/acpi_smbus.h (new)
 
Ja, das darfst du so verstehen, ich weiß allerdings nicht, ob das schon komplett ist. Ist allerdings in current, habe keine Ahnung ob das noch nach 6.0 MFCed wird (habe es zumindest bis jetzt nicht gesehen). Fakt ist jedenfalls, daß sich da was tut (es waren mehrere committs btw).

HTH, Daniel
 
Im Nachgang dazu habe ich heute eine andere commit note von Nate gelesen, daß er das wohl in 2 Wochen MFCen wird, so interpretiere ich das zumindest.
 
Bevor ich hier das Windows von der Platte nehmen kann, muss ich sowieso erst noch ein, zwei Dinge prüfen (eigendlich nur ein Ding, aber das wäre hier OT). Aber es freut mich zu hören das sich betreffs der Batterie was tut.
 
Im Nachgang dazu der Vollständigkeit halber:

Date: Sat, 5 Nov 2005 23:55:56 +0000 (UTC)
From: Nate Lawson <njl@FreeBSD.org>
Subject: cvs commit: src/sys/conf files src/sys/modules/acpi/acpi
Makefile src/sys/dev/acpica acpi_battery.c acpi_smbat.c acpi_smbus.h
acpiio.h
To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org,
cvs-all@FreeBSD.org
Message-ID: <200511052355.jA5NtuPg026403@repoman.freebsd.org>

njl 2005-11-05 23:55:56 UTC

FreeBSD src repository

Modified files: (Branch: RELENG_6)
sys/conf files
sys/modules/acpi/acpi Makefile
sys/dev/acpica acpi_battery.c acpiio.h
Added files: (Branch: RELENG_6)
sys/dev/acpica acpi_smbat.c acpi_smbus.h
Log:
MFC: smart battery support

Revision Changes Path
1.1031.2.9 +1 -0 src/sys/conf/files
1.12.2.3 +122 -30 src/sys/dev/acpica/acpi_battery.c
1.1.2.1 +402 -0 src/sys/dev/acpica/acpi_smbat.c (new)
1.1.2.1 +285 -0 src/sys/dev/acpica/acpi_smbus.h (new)
1.14.2.2 +4 -1 src/sys/dev/acpica/acpiio.h
1.11.2.1 +1 -1 src/sys/modules/acpi/acpi/Makefile


Das ist natürlich noch nicht absolut ausgereift und erfordert momentan ein Update auf RELENG_6, nur als info. ;)
 
Nochmals Danke. Ich werde dann, wenn ich das Notebook mit FreeBSD laufen habe, nochmal Rückmeldung geben. Vorher muss ich allerdings immernoch ein/zwei andere Probleme lösen.
 
Zuletzt bearbeitet:
Hallo,

ich habe nun mit folgender Kernel-Config

Code:
machine         i386
cpu             I686_CPU
ident           TM4000                       

#options        SCHED_ULE                # ULE scheduler
options         SCHED_4BSD               # 4BSD scheduler
options         PREEMPTION               # Enable kernel thread preemption
options         INET                            # InterNETworking
options         INET6                          # IPv6 communications protocols
options         FFS                              # Berkeley Fast Filesystem
options         SOFTUPDATES             # Enable FFS soft updates support
options         UFS_ACL                     # Support for access control lists
options         UFS_DIRHASH              # Improve performance on big directories
options         COMPAT_43                # Compatible with BSD 4.3 [KEEP THIS!]
options         COMPAT_FREEBSD4         # Compatible with FreeBSD4
options         COMPAT_FREEBSD5         # Compatible with FreeBSD5
options         KTRACE                        # ktrace(1) support
options         SYSVSHM                      # SYSV-style shared memory
options         SYSVMSG                      # SYSV-style message queues
options         SYSVSEM                      # SYSV-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         ADAPTIVE_GIANT           # Giant mutex is adaptive.

device          apic                              # I/O APIC

# Bus support.  Do not remove isa, even if you have no isa slots
device          isa
device          pci

# ATA and ATAPI devices
device          ata
device          atadisk                     # ATA disk drives
device          atapicd                     # ATAPI CDROM drives
device          atapicam
options         ATA_STATIC_ID      # Static device numbering

# SCSI peripherals
device          scbus                      # SCSI bus (required for SCSI)
device          da                           # Direct Access (disks)
device          cd                          # CD
device          pass                       # Passthrough device (direct SCSI access)
device          ses                         # SCSI Environmental Services (and SAF-TE)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc                   # AT keyboard controller
device          atkbd                    # AT keyboard
device          psm                      # PS/2 mouse
device          vga                       # VGA video card driver
device          sc                         # syscons is resembling an SCO console

# Floating point support - do not disable.
device          npx

# Add suspend/resume support for the i8254.
device          pmtimer

# Pseudo devices.
device          loop                     # Network loopback
device          ether                    # Ethernet support
device          pty                      # Pseudo-ttys (telnet etc)
device          md                      # Memory "disks"
device          bpf                      # Berkeley packet filter

# USB support
device          uhci                     # UHCI PCI->USB interface
device          ehci                     # EHCI PCI->USB interface (USB 2.0)
device          usb                     # USB Bus (required)
device          ugen                    # Generic
device          uhid                    # 'Human Interface Device'
device          ukbd                  # Keyboard
device          ulpt                    # Printer
device          umass                # Disks/Mass storage
device          ums                 # Mouse
device          uscanner           # Scanner

und folgenden Einträgen in der /boot/loader.conf

Code:
acpi_dsdt_load="YES"
miibus_load="YES"
if_bfe_load="YES"
if_iwi_load="YES"
wlan_load="YES"
wlan_xauth_load="YES"
wlan_wep_load="YES"
wlan_tkip_load="YES"
wlan_ccmp_load="YES"
sound_load="YES"
snd_ich_load="YES"
random_load="YES"
mem_load="YES"
io_load="YES"
ichsmb_load="YES"
ichwd_load="YES"
cpufreq_load="YES"
cbb_load="YES"
pccard_load="YES"
cardbus_load="YES"
firewire_load="YES"

mein Acer Travelmate 4002wlmi dazu gebracht (fast) vollständig zu funktionieren. Zumindest scheint es so.

Gkrellm zeigt mir den Batteriestatus an. USB, Sound, Brennen und was das Gerät erstmal tun soll, bzw. was ich bisher testete funktioniert.

Zu verdanken habe ich das den Einträgen in dieser (http://gerda.univie.ac.at/freebsd-laptops/index.pl?action=list_laptop_mf&mfid=2) Liste, insbesondere dem Eintrag zum TravelMate 4102wlmi.

Mit Speedstepping und wlan habe ich mich nocht nicht befasst und auch einen externen Monitor habe ich nocht nicht angeschlossen, das werde ich tun und dann hier Meldung geben.

BTW:Ich nutze FreeBSD 6.0-STABLE
 
Zurück
Oben