Re: HP 6720s automatic shutdown on low battery

2008-04-02 Thread Michael Neumann

Ivailo Bonev wrote:
I have a new HP 6720s laptop. When discharge battery, FreeBSD don't 
shutdown automatically on low battery.

How can set that?


I've an 6710b and experienced similar "shutdowns" :)

Try this:

/etc/rc.conf:

  devd_enable="YES"

/etc/devd.conf:

  notify 10 {
match "system" "ACPI";
match "subsystem"  "CMBAT";
match "notify" "0x80";
action "/etc/acpi_battery 30 5";
  };

/etc/acpi_battery:

  #!/bin/sh

  warn_level=$1
  shutdown_level=$2

  life=`sysctl -n hw.acpi.battery.life`

  if [ "$life" -lt $shutdown_level ]; then
echo "shutdown"
/sbin/shutdown -h now
  elif [ "$life" -lt $warn_level ]; then
echo "warn"
  fi

There might be an easier way, if there is a different notify command for 
battery low. I guess 0x80 is just battery info.


Regards,

  Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: HP 6720s automatic shutdown on low battery

2008-04-02 Thread Michael Neumann

Ivailo Bonev wrote:


- Original Message - From: "Michael Neumann" <[EMAIL PROTECTED]>
Newsgroups: gmane.os.freebsd.questions
To: "Ivailo Bonev" <[EMAIL PROTECTED]>
Cc: 
Sent: Wednesday, April 02, 2008 2:25 PM
Subject: Re: HP 6720s automatic shutdown on low battery



Ivailo Bonev wrote:
I have a new HP 6720s laptop. When discharge battery, FreeBSD don't 
shutdown automatically on low battery.

How can set that?


I've an 6710b and experienced similar "shutdowns" :)

Try this:

/etc/rc.conf:

  devd_enable="YES"

/etc/devd.conf:

  notify 10 {
match "system" "ACPI";
match "subsystem"  "CMBAT";
match "notify" "0x80";
action "/etc/acpi_battery 30 5";

Is thiese numbers after "acpi_battery" are minutes?

  };

/etc/acpi_battery:

  #!/bin/sh

  warn_level=$1
  shutdown_level=$2

  life=`sysctl -n hw.acpi.battery.life`

  if [ "$life" -lt $shutdown_level ]; then
echo "shutdown"
/sbin/shutdown -h now
  elif [ "$life" -lt $warn_level ]; then
echo "warn"
  fi

There might be an easier way, if there is a different notify command 
for battery low. I guess 0x80 is just battery info.


Regards,

  Michael


Thanks, I'll try script when battery is up, to see if works for me.


I think the following script is even more advanced (I found it a few 
seconds after I wrote the email :)


http://www.chruetertee.ch/files/download/battery
http://www.chruetertee.ch/blog/archive/2006/05/27/freebsd-automatisch-herunterfahren-wenn-batterie-leer-ist.html

Regards,

  Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


tap -> wireless client bridging (WPA)

2008-05-10 Thread Michael Neumann

Hi,

I'd like to run Qemu on FreeBSD 7.0 and be able to connect from the Qemu
instance to the internet. For this to work, I'd like to use a tap device
and bridge it with a wireless (wpi) device.  But it seems like both lagg
and if_bridge doesn't yet support WPA security (or wireless clients).

Anyone knows if this support will be added in 7.1 or maybe another good
approach to my problem?

Regards,

  Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: tap -> wireless client bridging (WPA)

2008-05-11 Thread Michael Neumann

Michael Neumann wrote:
> Hi,
>
> I'd like to run Qemu on FreeBSD 7.0 and be able to connect from the Qemu
> instance to the internet. For this to work, I'd like to use a tap device
> and bridge it with a wireless (wpi) device.  But it seems like both lagg
> and if_bridge doesn't yet support WPA security (or wireless clients).

In the meanwhile I found the answer myself... the solution is to use
natd.

Regards,

  Michael

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Very bad performances with wpi driver and 7.0-RC1

2008-01-15 Thread Michael Neumann

Nicolas Letellier wrote:

Hello,

I use FreeBSD 7.0-RC1 with my laptop (Asustek A6000 Series).
Performances with wpi are very very bad: in my LAN, I download a file at 
4 k/s. In Internet, I would believe I use a 56 k connection :-)


In this laptop, I have a NIC (chipset re), and I don't have any problem 
with. The connection is very very stable. The problem is juste with wpi 
and my Wireless NIC.


I test OpenBSD-current, and I didn't have any problem with wpi. The 
problem is juste with FreeBSD 7.0-RC1. I have any firewalls, nothing. 
All is perfect with my NIC re.


I test with GENERIC, and I build my own kernel (with wpi support build 
into kernel). The problem is the same.


See more informations here:

numenor# cat /boot/loader.conf nvidia_load="YES"
wpifw_load="YES"
legal.intel_wpi.license_ack=1

numenor# cat /etc/rc.conf defaultrouter="192.168.1.249"
hostname="numenor."
ifconfig_wpi0="inet 192.168.1.4 ssid Nicoelro_Wifi"
numenor# ifconfig wpi0
wpi0: flags=8843 metric 0 mtu 1500
   ether 00:13:02:dd:05:5f
   inet 192.168.1.4 netmask 0xff00 broadcast 192.168.1.255
   media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/36Mbps)
   status: associated
   ssid Nicoelro_Wifi channel 10 (2457 Mhz 11g) bssid 00:0f:b5:b9:9f:cc
   authmode OPEN privacy OFF txpower 50 bmiss 7 scanvalid 60
   protmode CTS


Sometimes, I see this message:
  wpi0: discard frame w/o packet header

numenor# sysctl -a | grep wpi
net.wlan.0.%parent: wpi0
debug.wpi: 0
dev.wpi.0.%desc: Intel(R) PRO/Wireless 3945ABG
dev.wpi.0.%driver: wpi
dev.wpi.0.%location: slot=0 function=0 handle=\_SB_.PCI0.P0P7.WLAN
dev.wpi.0.%pnpinfo: vendor=0x8086 device=0x4222 subvendor=0x8086 
subdevice=0x1001 class=0x028000

dev.wpi.0.%parent: pci3


numenor# dmesg
*Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
  The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-RC1 #1: Mon Jan 14 18:12:58 CET 2008
  [EMAIL PROTECTED]:/usr/obj/usr/src/sys/NUMENOR
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Genuine Intel(R) CPU   T2300  @ 1.66GHz (1662.52-MHz 
686-class CPU)

Origin = "GenuineIntel"  Id = 0x6e8  Stepping = 8

Features=0xbfe9fbff 


Features2=0xc189
AMD Features=0x10
Cores per package: 2
real memory  = 1073545216 (1023 MB)
avail memory = 1032773632 (984 MB)
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID:  0
cpu1 (AP): APIC ID:  1
ioapic0  irqs 0-23 on motherboard
kbd1 at kbdmux0
hptrr: HPT RocketRAID controller driver v1.1 (Jan 14 2008 18:12:38)
acpi0:  on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a (3) failed
acpi0: reservation of 10, 3ff0 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_ec0:  port 0x62,0x66 on acpi0
cpu0:  on acpi0
est0:  on cpu0
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 6130a2c06000613
device_attach: est0 attach returned 6
p4tcc0:  on cpu0
cpu1:  on acpi0
ACPI Warning (tbutils-0243): Incorrect checksum in table [SSDT] -  D6, 
should be 9C [20070320]

est1:  on cpu1
p4tcc1:  on cpu1
pcib0:  port 0xcf8-0xcff on acpi0
pci0:  on pcib0
pcib1:  irq 16 at device 1.0 on pci0
pci1:  on pcib1
nvidia0:  mem 
0xfd00-0xfdff,0xc000-0xcfff,0xfc00-0xfcff irq 16 
at device 0.0 on pci1

nvidia0: [GIANT-LOCKED]
nvidia0: [ITHREAD]
pcm0:  mem 
0xfebfc000-0xfebf irq 21 at device 27.0 on pci0

pcm0: [ITHREAD]
pcib2:  irq 16 at device 28.0 on pci0
pci2:  on pcib2
re0:  port 0xc800-0xc8ff mem 
0xfe0ff000-0xfe0f irq 16 at device 0.0 on pci2

re0: Using 2 MSI messages
miibus0:  on re0
rgephy0:  PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto

re0: Ethernet address: 00:18:f3:5b:f6:31
re0: [FILTER]
re0: [FILTER]
pcib3:  irq 19 at device 28.3 on pci0
pci3:  on pcib3
wpi0:  mem 0xfe1ff000-0xfe1f irq 19 
at device 0.0 on pci3

bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align memory properly.
bus_dmamem_alloc failed to align mem