• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

HOWTO: FreeBSD 9.1-RELEASE on Asus Eee PC 1018P

cpm@

Moderator
Staff member
Moderator
Developer

Thanks: 890
Messages: 2,100

#1
Index
  1. Hardware
  2. ACPI Video Extensions
  3. Bluetooth
  4. CPU's Temperature
  5. Ethernet
  6. Hotkeys
  7. Sound
  8. SD card reader
  9. Graphics
  10. Suspend/resume
  11. Wireless
  12. Webcam
  13. Tuning Power Consumption

1. Hardware


More about all hardware specifications, here.


2. ACPI Video Extensions

To control display switching and backlight brightness is necessary add in loader.con(5) the following line:
Code:
acpi_video_load="YES"

3. Bluetooth

To enable bluetooth USB device, load the module from /boot/loader.conf
Code:
ng_ubt_load="YES"
Add the following lines in rc.conf(5) file:
Code:
hcsecd_enable="YES"
sdpd_enable="YES"
Then copy /etc/defaults/bluetooth.device.conf to /etc/bluetooth directory:
# cp /etc/defaults/bluetooth.device.conf /etc/bluetooth/ubt0.conf

Uncomment those options as default in ubt0.conf
Code:
authentication_enable="NO"
connectable="YES"
discoverable="YES"
role_switch="YES"
Read 32.4 Bluetooth section as reference to configure properly the bluetooth device.

To transfer objects (images, movies, address book items) from phone to PC, install comms/obexapp and start the obexapp server:
Code:
# mkdir /home/user/bluetooth
# obexapp -s -S -C 10 -u user -r /home/user/bluetooth
Then, when initiate transfer it will send automatically to that directory in our PC.

Moreover, to transfer from PC to phone, just run obexapp as client as follow:
# obexapp -a BD_ADDR -C opush -n put file_to_send

See obexapp(1) for help.


4. CPU's Temperature

To monitoring of the CPU temperature load the coretemp(4) module:
# kldload coretemp

You can check your CPU's temperature, just running:
Code:
[CMD]% sysctl -a | grep temperature[/CMD]
hw.acpi.thermal.tz0.temperature: 59.0C
dev.cpu.0.temperature: 54.0C
dev.cpu.1.temperature: 54.0C
You should add this line to /boot/loader.conf to load module during boot-time:
Code:
coretemp_load="YES"

5. Ethernet

Add this line in /etc/rc.conf
Code:
ifconfig_alc0="DHCP media 100baseTX"

6. Hotkeys

The acpi_asus driver provides support for the extra ACPI-controlled gadgets (hotkeys and leds).

Not tested.


7. Sound

To check the sound card via the /dev/sndstat file:
Code:
[CMD]% cat /dev/sndstat[/CMD]
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC269 (Right Analog Mic)> (rec)
Mixer values. More details can be found in the mixer(8) man page.
Code:
[CMD]% mixer[/CMD]
Mixer vol      is currently set to  98:98
Mixer pcm      is currently set to  98:98
Mixer speaker  is currently set to  64:64
Mixer rec      is currently set to  71:71
Mixer igain    is currently set to  70:70
Mixer ogain    is currently set to  70:70
Mixer monitor  is currently set to  94:94
Recording source: monitor
For more information, read 8.2 Setting Up the Sound Card.


8. SD card reader

Need adding the following drivers in /boot/loader.conf
Code:
mmc_load="YES"
mmcsd_load="YES"
sdhci_load="YES"
 
Last edited:

cpm@

Moderator
Staff member
Moderator
Developer

Thanks: 890
Messages: 2,100

#2
9. Graphics

To get working Intel Pineview (M) video card just follow instructions described in Intel_GPU.

Summarizing the steps:

Add those variables in /etc/make.conf
Code:
WITH_KMS=yes
WITH_NEW_XORG=yes
Update your ports tree with portsnap(8) and perform an upgrade for the next ports:

> graphics/libdrm
> graphics/dri
> graphics/libGL
> graphics/libGLU
> x11-servers/xorg-server

Finally rebuild all xorg-* related ports, including x11-drivers/xf86-video-intel.

Check results:
Code:
[CMD]# grep drmn /var/log/dmesg.today[/CMD]
drmn0: <Intel Pineview (M)> on vgapci0
drmn0: taking over the fictitious range 0xd0000000-0xe0000000

[CMD]# grep info /var/log/dmesg.today[/CMD]
info: [drm] MSI enabled 1 message(s)
info: [drm] AGP at 0xd0000000 256MB
info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
info: [drm] Driver supports precise vblank timestamp query.
[drm:KMS:pid1928:parse_sdvo_device_mapping] No SDVO device info is found in VBT
info: [drm] initialized overlay support
info: [drm] Initialized i915 1.6.0 20080730
Here is the glxinfo output.


10. Suspend/resume

Only works suspend to RAM from text mode, press Fn+F1 or run # acpiconf -s 3 to put on S3 state. To resume, press <any> button to wake up the machine.

Read Suspend/Resume for more information.


11. Wireless

Install converters/libiconv port.

Code:
# cd /tmp/
# fetch http://gugus69.free.fr/freebsd/Broadcom_BCM43xx_5.100.235.19_win5x.tgz
# tar xzvf Broadcom_BCM43xx_5.100.235.19_win5x.tgz
# cd Broadcom_BCM43xx_5.100.235.19_win5x/
# cp bcmwl5.inf bcm43xx.cat bcmwl5.sys bcmwlcoi.dll /usr/src/sys/modules/if_ndis
# cd /usr/src/sys/modules/if_ndis
Create the *.ko modules:
Code:
# ndisgen bcmwl5.inf bcm43xx.cat bcmwl5.sys bcmwlcoi.dll
# ls
bcm43xx.cat bcmwl5_sys.ko Makefile bcm43xx.cat.ko bcmwl5.inf bcmwlcoi.dll bcmwl5.sys bcmwlcoi.dll.ko
# cp bcmwlcoi.dll.ko bcm43xx.cat.ko bcmwl5_sys.ko /boot/modules
Load the modules:
Code:
# kldload ndis
# kldload bcmwl5_sys
# kldload bcm43xx.cat
# kldload bcmwlcoi.dll
Check the condition:
# ifconfig wlan0

Create the device as follow:
# ifconfig wlan0 create wlandev ndis0

Don't add ndis(4) in /boot/loader.conf because the Windows NDIS driver wants functions that are not currently implemented in the FreeBSD NDIS driver and causes kernel panic at boot.

Add this lines to /etc/rc.conf
Code:
wlans_ndis0="wlan0"
ifconfig_wlan0="WPA DHCP"
wpa_supplicant_enable="YES"
Create an startup script named /etc/wifi_up
Code:
#!/bin/sh

kldload bcm43xx.cat bcmwl5_sys bcmwlcoi.dll
ifconfig wlan0 create wlandev ndis0
ifconfig wlan0 up
wpa_supplicant -D ndis -i wlan0 -c /etc/wpa_supplicant.conf & dhclient wlan0
# chmod 1555 /etc/wifi_up

Edit /etc/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
        ssid="YOUR-SSID-NAME"
        key_mgmt=NONE
        wep_key0=YOUR-WEPKEY
        wep_tx_keyidx=0
}

network={
        ssid="YOUR-SSID-NAME"
        key_mgmt=WPA-PSK
        psk="WPA-YOUR-KEY"
}

network={
        ssid="YOUR-SSID-NAME"
        proto=WPA RSN
        key_mgmt=WPA-PSK
        psk="WPA-YOUR-KEY"
}
See wpa_supplicant.conf(5) man page for more options.

If you have problems to connect, just do the following to re/connect:
Code:
# dhclient wlan0
dhclient already running, pid: 42012.
exiting.
# kill 42012
# ifconfig wlan0 down
# ifconfig wlan0 up
# dhclient wlan0
 
Last edited:

cpm@

Moderator
Staff member
Moderator
Developer

Thanks: 890
Messages: 2,100

#3
12. Webcam

Install multimedia/webcamd port.

Add this line in /boot/loader.conf
Code:
cuse4bsd_load="YES"
Also need to add this line in /etc/rc.conf
Code:
webcamd_enable="YES"
Configure webcam device as follow:
Code:
# kldload cuse4bsd
# dmesg | grep ugen
# webcamd -d ugen4.2 -i 0 -v 0
Quoted from /usr/ports/UPDATING dated entry 20110421:
Code:
20110421:
  AFFECTS: users of multimedia/webcamd
  AUTHOR: kwm@FreeBSD.org

  Webcamd now creates device nodes with 0660 permission and webcamd:webcamd
  ownership. To get access to the webcamd devices just add yourself to the
  webcamd group.
Add user to the webcamd group:
# pw group mod webcamd -m user

To test if works, install multimedia/pwcview and run:
Code:
[CMD]% pwcview[/CMD]
Webcam set to: 320x240 (sif) at 5 fps
See the pwcview(1) man page for details.


13. Tuning Power Consumption

Some hints to obtain better performance:

Add in /boot/loader.conf
Code:
# Disable throttling control
hint.p4tcc.0.disabled=1
hint.acpi_throttle.0.disabled=1

# Number of clock ticks per second
kern.hz=100
Edit /etc/rc.conf
Code:
powerd_enable="YES"
powerd_flags="-a adaptive -b adaptive -n adaptive"
performance_cx_lowest="C2"
economy_cx_lowest="C2"
Checking ACPI battery to see the improvements:
Code:
[CMD]# acpiconf -i0[/CMD]
Design capacity:        6000 mAh
Last full capacity:     5479 mAh
Technology:             secondary (rechargeable)
Design voltage:         7400 mV
Capacity (warn):        548 mAh
Capacity (low):         274 mAh
Low/warn granularity:   60 mAh
Warn/full granularity:  60 mAh
Model number:           1018P
Serial number:          
Type:                   LION
OEM info:               ASUS
State:                  discharging
Remaining capacity:     100%
Remaining time:         4:27
Present rate:           1231 mA (10187 mW)
Present voltage:        8276 mV
Read Tuning Power Consumption for details.

Also see https://wiki.freebsd.org/AsusEee for other ASUS Eee family models.

P.S. This HOWTO is subject to future updates, please, any suggestion or correction is welcome :)
 
Last edited:
Top