Search:  
Gentoo Wiki

Asus_F3JM

This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

Contents

About this Howto

Since this is my first howto this is far from perfect. I will write this in my spare time so could it can take some time until it is completed.

What works and what doesn't

Code: lspci
 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
 00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03)
 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)
 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)
 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)
 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)
 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
 00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)
 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
 01:00.0 VGA compatible controller: nVidia Corporation G70 [GeForce Go 7600] (rev a1)
 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
 03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
 06:01.0 FireWire (IEEE 1394): Ricoh Co Ltd Unknown device 0832
 06:01.1 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)
 06:01.2 System peripheral: Ricoh Co Ltd Unknown device 0843 (rev 01)
 06:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)

Audio: Works
Video: Works
USB: Works
Keyboard hotkeys: Works
Wifi: Works (optionally using acpi4asus)
Ethernet controller: Works
FireWire: Never tried
ExpressCard: Never tried
SDcard reader: Works
Bluetooth: Works (must be enabled via ACPI/acpi4asus)
Webcam: Never tried
Integrated modem: Never tried
DVD/CDRom DMA: run kernel with parameter hdc=noprobe

General

This Howto is about installing Gentoo 2006.1 (AMD64) or (x86).

make.conf examples

Note: To use both cores of the processor for compile you have to set MAKEOPTS to -j3 as shown below.

For 32-bit (x86) use this one:

File: /etc/make.conf
 CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
 CHOST="i686-pc-linux-gnu"
 CXXFLAGS="${CFLAGS}"
 MAKEOPTS="-j3"
 ...
 ...
 VIDEO_CARDS="nvidia"
 ALSA_CARDS="hda-intel"
 INPUT_DEVICES="evdev keyboard mouse synaptics"

For 64-bit (AMD64) use:

File: /etc/make.conf
 CFLAGS="-O2 -march=nocona -fomit-frame-pointer -pipe"
 CHOST="x86_64-pc-linux-gnu"
 CXXFLAGS="${CFLAGS}"
 MAKEOPTS="-j3"
 ...
 ...
 VIDEO_CARDS="nvidia"
 ALSA_CARDS="hda-intel"
 INPUT_DEVICES="evdev keyboard mouse synaptics"

Kernel Configuration Example x86

This example is for gentoo-sources2.6.18-r6 on x86 architecture.


Note: THIS IS FARE FROM BEEING FINISH. Keep in mind that this is only an example for the settings I use so don't blame me if it doesn't work or screw your system. Maybe you need some different settings because you like other things to do with your box.



Linux Kernel Configuration: Linux Kernel v2.6.18-gentoo-r6 Configuration
Code maturity level options  --->
[*] Prompt for development and/or incomplete code/drivers
Loadable module support--->
 [*] Enable loadable module support
 [*]   Module unloading
 [*]     Forced module unloading
 [*]   Automatic kernel module loading
General setup  --->
[*] Automatically append version information to the version string
[*] Support for paging of anonymous memory (swap) 
[*] System V IPC
[*] BSD Process Accounting
[*]   BSD Process Accounting version 3 file format
[*] Kernel .config support
 [*]   Enable access to .config through /proc/config.gz
Block layer  --->
   IO Schedulers  --->
     <*> CFQ I/O scheduler
     Default I/O scheduler (CFQ)  --->
Processor type and features  --->
 [*] Symmetric multi-processing support
     Subarchitecture Type (PC-compatible)  --->
     Processor family (Pentium M)  --->
 (2) Maximum number of CPUs (2-255)
 [*] Multi-core scheduler support
     Preemption Model (Voluntary Kernel Preemption (Desktop))  --->
 [*] Preempt The Big Kernel Lock
 [*] Machine Check Exception
 <*>   Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4
 <*> /dev/cpu/*/msr - Model-specific register support
 <*> /dev/cpu/*/cpuid - CPU information support
    High Memory Support (4GB)  ---> (Note: set it to 4GB although if you have only 1GB)
    Memory model (Flat Memory)  --->
 [*] MTRR (Memory Type Range Register) support
 [*] Enable kernel irq balancin
 [*] Use register arguments
     Timer frequency (100 HZ)  --->
 [*] kexec system call (EXPERIMENTAL)
 Power management options (ACPI, APM)  --->
   ACPI (Advanced Configuration and Power Interface) Support  --->
    [*] ACPI Support
    <*>   AC Adapter
    <*>   Battery
    <*>   Button
    <*>   Video
    <*>   Fan
    <*>   Processor
    <*>     Thermal Zone
    <*>   ASUS/Medion Laptop Extras (Note: Use this with caution)
    (0)   Disable ACPI for systems before Jan 1st this year
   CPU Frequency scaling  --->
    [*] CPU Frequency scaling 
    <*>   CPU frequency translation statistics
        Default CPUFreq governor (performance)  --->
    <*>   'powersave' governor
    <*>   'userspace' governor for userspace frequency scaling
    <*>   'ondemand' cpufreq policy governor
    <*>   'conservative' cpufreq governor
    <*>   ACPI Processor P-States driver
    <*>   Intel Enhanced SpeedStep
    [*]     Use ACPI tables to decode valid frequency/voltage pairs
    [*]     Built-in tables for Banias CPUs
   Bus options (PCI, PCMCIA, EISA, MCA, ISA)  --->
    [*] PCI support
        PCI access mode (Any)  --->
    [*]   PCI Express support
   Executable file formats  --->
    [*] Kernel support for ELF binaries
   Networking  --->
     Networking options  --->  (Note: The following options depending highly on what you want to do in your network)

Audio

Normally intel-hda works out of the box. But not on the F3JM.
You have to use alsa-driver not the kernel alsa and add the following to the modules configuration:


Note: The Headphone-jack is only working since alsa-driver-1.0.14_rc1.


For alsa-driver <= alsa-driver-1.0.13 add:

File: /etc/modprobe.d/alsa
 options snd-hda-intel model=uniwill-m31
 


For alsa-driver >=alsa-driver-1.0.14_rc1 add:

File: /etc/modprobe.d/alsa
 options snd-hda-intel model=asus-laptop
 

Afterwards run update-modules.


Note: Some users get trouble when setting up alsamixer: Even if the sound was working, they weren't able to change the master volume. Image:F3JC-alsamixer.png
A solution could be to change the volume via the PCM value or by changing the volume directly into the player.

Graphics Card

The Graphics Card is no problem. Just emerge nvidia-drivers and have fun.

TODO: Add relevant party of xorg.conf

LAN

The LAN-Card is an RTL8168 it is not supported on the Gentoo Minimal CD (Version 2006.1). I copied the stage3 and portage archive using an USB Key and after emerging suspend-sources i could use the r1000-driver to get it working.

TODO: Add compilation howto for the r1000 driver

If you use gentoo-sources you can use the kernel driver.

Linux Kernel Configuration: Linux Kernel v2.6.18-gentoo-r6 Configuration
Device Drivers  --->
   Network device support  --->
     Ethernet (1000 Mbit)  --->
       <*> Realtek 8169 gigabit ethernet support 

WLAN

See this guide.

Multimedia-Keys

Since i don't like keys without a function i wrote (and copied) some scripts to make most of them work. The basics were taken from: [1]

Because i am using KDE i bound the Play/Stop/Next/Prev - Keys to amarok using dcop.

What works:

 Mail 
 Browser
 Touchpad On/Off
 Volume Muting
 Volume Up
 Volume Down
 Play/Pause
 Stop
 Next
 Previous

What doesn't work:

 Sleep
 Wireless
 "Running Man"
File: /etc/acpi/events/hotkey
  event=button.sleep
  action=hibernate # <- I have not yet figured out 
                   #    how to make this actually work 
  
  event=hotkey ATKD .*
  action=/etc/acpi/hotkey.sh %e
File: /etc/acpi/hotkey.sh
  #!/bin/sh
  user=`who| grep " :0" | awk '{print $1}'`
  export XAUTHORITY=/home/$user/.Xauthority
  export DISPLAY=:0

  function osdtext()
  {
    killall -9 -q osd_cat
    echo $1 | osd_cat -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso8859-1" -c Green -s 1 -p bottom -A center -d 2&
  }

  case "$3" in
    # Mute
    00000032)         /etc/acpi/actions/vol_mute
                      ;;
    # Volume Up
    00000030)         /etc/acpi/actions/vol up
                      ;;
    # Volume Down
    00000031)         /etc/acpi/actions/vol down
                      ;;
    # "Running Man"
    0000005c)         /etc/acpi/actions/cpuspeed # Not working yet
                      ;;
    # Touchpad
    0000006b)         /etc/acpi/actions/touchpad
                      ;;
    # Rewind button
    00000040)         osdtext "Amarok Prev"
                      /usr/kde/3.5/bin/dcop amarok player prev
                      ;;
    # Stop button
    00000043)         osdtext "Amarok Stop"
                      /usr/kde/3.5/bin/dcop amarok player stop
                      ;;
    # Play/pause button
    00000045)
                      if [ $(/usr/kde/3.5/bin/dcop --user $user amarok player isPlaying) == "true" ]; then
                         osdtext "Amarok Pause"
                         /usr/kde/3.5/bin/dcop --user $user amarok player pause
                      else
                         osdtext "Amarok Play"
                         /usr/kde/3.5/bin/dcop --user $user amarok player play
                      fi
                      ;;
    # Forward button
    00000041)         osdtext "Amarok Next"
                      /usr/kde/3.5/bin/dcop --user $user amarok player next
                      ;;
    # Mail button
    00000050)         osdtext "Thunderbird"
                      su - $user -c "thunderbird --display=:0.0"
                      ;;
    # Web button
    00000051)         osdtext "Firefox"
                      su - $user -c "firefox --display=:0.0"
                      ;;
  esac
File: /etc/acpi/actions/touchpad
  #!/bin/bash
  export DISPLAY=:0

  killall -9 -q osd_cat

  if [ $# = 1 ]; then
    synclient TouchpadOff=$1
  else
    state=$(synclient -l | grep TouchpadOff | awk -F"= " '{print $2}')
    if [ "$state" = "0" ]; then
            synclient TouchpadOff=1
            echo "Touchpad inactive" | osd_cat -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100 -p-182-iso8859-1" -c Red -s 1 -p bottom -A center  -d 2 &
    else
            synclient TouchpadOff=0
            echo "Touchpad active" | osd_cat -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p -182-iso8859-1" -c Green -s 1 -p bottom -A center  -d 2 &
    fi
  fi
File: /etc/acpi/actions/vol
  #!/bin/bash
  export DISPLAY=:0

  if [ "$(amixer get Front | grep Left: | awk -F" " '{print $4}')" = "[off]" ]; then
        amixer -q set Front toggle
  fi

  if [ "$1" = "up" ]; then
        amixer -q set PCM 5+
  elif [ "$1" = "down" ]; then
        amixer -q set PCM 5-
  fi

  killall -9 -q osd_cat

  osd_cat -p bottom -s 1 -o 120   -A center -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso8859-1" -c green -b percentage -P $(amixer get PCM | grep Left: | awk -F" " '{print $5}' | tr -d "[]") -T "Volume"&
File: /etc/acpi/actions/vol_mute
  #!/bin/bash
  export DISPLAY=:0

  amixer -q set Front toggle

  killall -9 -q osd_cat

  if [ "$(amixer get Front | grep Left: | awk -F" " '{print $4}')" = "[off]" ]; then
        echo "MUTE" | osd_cat -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso8859-1" -c Red -s 1 -p bottom -A center  -d 2&
  else
        echo "Sound active"| osd_cat -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso 8859-1" -c Green -s 1 -p bottom -A center -d 2&
  fi


The next one is only for testing. It throttles the CPU (both, the F3JM has a dual core) ... But only for 2 Seconds. After that, a second event brings it back up. Maybe it is of help, as it does as expected if manually called.

File: /etc/acpi/actions/cpuspeed
  #!/bin/bash
  throt_min=0
  throt_max=5

  for cpu in $(find /proc/acpi/processor -name "CPU*"); do
    #echo $cpu/throttling
    if [ $(cat $cpu/throttling|grep active|sed s/.*T//) -gt 0 ]; then
      # CPU throttled
      echo $throt_min >$cpu/throttling
      echo "CPU(s) full speed." | \
      osd_cat -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso8859-1" -c Green -s 1 -p bottom -Acenter -d 2
    else
      # CPU at full speed
      echo $throt_max >$cpu/throttling
      echo "CPU(s) throttled." | osd_cat -f "-adobe-new century schoolbook-medium-i-normal--34-240-100-100-p-182-iso8859-1" -c Green -s 1 -p bottom -Acenter -d 2
    fi
  done

You will say that i could use the osdtext-function in all scripts. You're right. But i did not have the time to clean this up yet.

Webcam

The webcam is not fully working yet. But there is a driver project on sourceforge for the integrated webcam in the F3Jm series. Syntekdriver is a driver under developpement (so use it at your own risk) that tries to support DC1125 and STK1135 webcams (maybe other models too). There is currently no ebuild in portage for that driver, if someone could write an ebuild for it ...

http://bugs.gentoo.org/show_bug.cgi?id=178946 here i found the working ebuild :)

Version 1.00 recently come out.

Retrieved from "http://www.gentoo-wiki.info/Asus_F3JM"

Last modified: Mon, 11 Aug 2008 04:29:00 +0000 Hits: 9,273