HARDWARE Intel G33, Q35, and Q33 Chipsets
From Gentoo Linux Wiki
| Laptops • TV Tuner Cards • Wireless • Servers • Storage • Other Hardware • Motherboards • Related |
This document is licensed under the Creative Commons Attribution-ShareAlike 3.0 License
This document describes the kernel configuration and Gentoo user-space settings to maximize the use of the hardware components found on Intel's G33, G35, and Q33-based chipsets.
Contents |
[edit] Hardware
[edit] Status
| Device | Works? | Note | |
| SATA | Yes | ||
| PATA | Yes | ||
| Graphics | Yes | ||
| Ethernet | Yes | ||
| Sound | Yes | ||
| USB | Yes | ||
| Firewire | untested | ||
| Sensors | Yes | ||
| ACPI | partly | There is no support for 'Fan' and 'Thermal Zone' |
[edit] Specific Components
The specific system this article is loosely based on has the following components:
- Motherboard: Gigabyte GA-G33M-S2H
- Processor: 64bit Intel Core 2 Duo 4400 @ 2.75Ghz
- Memory: 2 x 1GB 800Mhz DDR2
- Graphics: Integrated Intel Graphics Media Accelerator 3100 (Intel GMA 3100) with VGA and HDMI outputs.
- Audio: Intel HD Audio via Realtek ALC889A codec with DTS and optical SPDIF
- Ethernet: Realtek RTL 8110SC chip (10/100/1000 Mbit)
- Southbridge SATA: Intel ICH9 SATA II
- Southbridge PATA: JMicron 368 chip
- Firewire: Texas Instruments TSB43AB23 chip
- USB: Intel ICH9 (USB2 and USB1)
[edit] Detailed Listing
| Code: lspci |
00:00.0 Host bridge: Intel Corporation DRAM Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation PCI Express Port 1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation LPC Interface Controller (rev 02) 00:1f.3 SMBus: Intel Corporation SMBus Controller (rev 02) 00:1a.0 USB Controller: Intel Corporation USB UHCI Controller #4 (rev 02) 00:1a.7 USB Controller: Intel Corporation USB2 EHCI Controller #2 (rev 02) 00:1f.2 SATA controller: Intel Corporation 4 port SATA AHCI Controller (rev 02) 03:07.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link) 00:02.1 Display controller: Intel Corporation Integrated Graphics Controller (rev 02) 00:02.0 VGA compatible controller: Intel Corporation Integrated Graphics Controller (rev 02) 00:1b.0 Audio device: Intel Corporation HD Audio Controller (rev 02) 02:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller 03:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10) |
[edit] BIOS settings
- Check with your motherboard vendor for BIOS upgrades
- Enabled SATA "Native" mode (avoid emulating PATA/IDE controller)
- Enable AHCI (enables native command & queuing, hot plugging, and 64-bit DMA transfers)
- Enable CPU EIST (enabled speedstep)
[edit] Kernel 2.6.24 Realtime Configuration
Listed below is a lean static kernel configuration with only those options necessary to enable the following features:
- Core2 specific optimization w/ speedstep
- Select realtime patch features
- Acpi power button and idle states
- Ethernet
- ICH9 Serial ATA with AHCI
- Parallel ATA (IDE)
- ICH9 Intel HD Audio
- Onboard GMA 3100, OpenGL and Direct Rendering
not enabled:
- Firewire
- PC speaker(beeper)
- Framebuffer & boot-splash
- Suspend to RAM or Disk
All settings not shown in this listing should be disabled. Download the full .config here: Intel G33 Kernel 2.6.24 Configuration.
[edit] General Settings
| Linux Kernel Configuration: General Settings |
General setup --->
[*] Prompt for development and/or incomplete code/drivers
[*] Automatically append version information to the version string
[*] System V IPC
(16) Kernel log buffer size (16 => 64KB, 17 => 128KB)
[*] Optimize for size (Look out for broken compilers!)
[*] Enable concurrent radix tree operations (EXPERIMENTAL)
[*] Enabled optimistic locking (EXPERIMENTAL)
Choose SLAB allocator (SLUB (Unqueued Allocator))
[ ] Enable loadable module support
[*] Enable the block layer --->
[*] Block layer SG support v4 (EXPERIMENTAL)
IO Schedulers --->
[*] CFQ I/O scheduler
|
[edit] Processor Settings
| Code: cat /proc/cpuinfo |
processor : 0 vendor_id : GenuineIntel model name : Intel(R) Core(TM)2 CPU 4400 @ 2.00GHz processor : 1 vendor_id : GenuineIntel model name : Intel(R) Core(TM)2 CPU 4400 @ 2.00GHz |
| Linux Kernel Configuration: Processor |
Processor type and features --->
[*] Tickless System (Dynamic Ticks)
[*] High Resolution Timer Support
Processor family (Intel Core2 / newer Xeon)
<*> /dev/cpu/*/msr - Model-specific register support
<*> /dev/cpu/*/cpuid - CPU information support
[*] MTRR (Memory Type Range Register) support
[*] Symmetric multi-processing support
[*] Multi-core scheduler support
Preemption Mode (Preemptible Kernel (Low-Latency Desktop))
--- Thread Softirqs
[*] Thread Hardirqs
RCU implementation type: (Preemptible RCU)
[*] Enable priority boosting of RCU read-side critical sections
(2) Maximum number of CPUs (2-256)
[*] Provide RTC interrupt
[*] Machine check support
[*] Intel MCE features
Timer frequency (1000 HZ)
|
[edit] Power Saving and Monitoring Features
| Linux Kernel Configuration: Power management |
Power management options ---> [*] Power Management support [*] Suspend to RAM and standby ACPI (Advanced Configuration and Power Interface) Support ---> [*] Deprecated /proc/acpi files [*] Deprecated /proc/acpi/event files <*> Button <*> Processor <*> Thermal Zone [*] Power Management Timer Support CPU Frequency scaling ---> [*] CPU Frequency scaling Default CPUFreq governor (performance) <*> 'ondemand' cpufreq policy governor <*> ACPI Processor P-States driver CPU idle PM support ---> [*] 'menu' governor Device Drivers ---> I2C support ---> I2C Algorithms ---> [*] I2C bit-banging interfaces I2C Hardware Bus support ---> <*> Intel 82801 (ICH) Device Drivers ---> [*] Hardware Monitoring support ---> [*] Intel Core (2) Duo/Solo temperature sensor |
[edit] Bus Settings
Intel's SATA AHCI implementation supports message signaled interrupts. "this enables a device to generate an interrupt using an inbound Memory Write on its PCI bus instead of asserting a device IRQ pin." [Kernel 2.6.23]. We'll want to take advantage of this feature, shown below:
| Code: cat /proc/interrupts |
CPU0 CPU1
0: 101 9 IO-APIC-edge timer
1: 8610 8640 IO-APIC-edge i8042
7: 0 0 IO-APIC-edge lpptest
8: 0 1 IO-APIC-edge rtc
317: 375 371 PCI-MSI-edge ahci
NMI: 0 0
LOC: 2023669 2499122
ERR: 0
|
| Linux Kernel Configuration: Bus options |
Bus options (PCI etc.) ---> [*] PCI support [*] Support mmconfig PCI config space access [*] PCI Express support [*] Message Signaled Interrupts (MSI and MSI-X) |
[edit] Serial and Parallel ATA Drivers
| Code: lspci |
SATA controller: Intel Corporation 4 port SATA AHCI Controller IDE interface: JMicron Technologies, Inc. JMB368 IDE controller |
| Linux Kernel Configuration: ATA Drivers |
Device Drivers ---> SCSI device support ---> <*> SCSI disk support <*> SCSI CDROM support <*> SCSI generic support [*] Serial ATA (prod) and Parallel ATA (experimental) drivers ---> <*> AHCI SATA support [*] JMicron PATA support |
[edit] Network Drivers
| Code: lspci |
Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet |
| Linux Kernel Configuration: Network Drivers |
Device Drivers ---> [*] Network device support ---> [*] Ethernet (1000 Mbit) ---> [*] Realtek 8169 gigabit ethernet support |
[edit] Graphics Drivers
| Code: lspci |
Display controller: Intel Corporation Integrated Graphics Controller VGA compatible controller: Intel Corporation Integrated Graphics Controller |
See this HowTo.
[edit] Sound Drivers
| Code: lspci |
Audio device: Intel Corporation HD Audio Controller |
| Linux Kernel Configuration: General Settings |
Device Drivers ---> Sound ---> <*> Sound card support <*> Advanced Linux Sound Architecture [*] RTC Timer support PCI devices ---> <*> Intel HD Audio [*] Enable generic HD-audio codec parser [*] Aggressive power-saving on HD-audio (1) Default time-out for HD-audio power-save mode [*] Intel/SiS/nVidia/AMD/ALi AC97 Controller [*] AC97 Power-Saving Mode (1) Default time-out for AC97 power-save mode |
[edit] USB Drivers
| Code: lspci |
USB Controller: Intel Corporation USB2 EHCI Controller USB Controller: Intel Corporation USB UHCI Controller |
| Linux Kernel Configuration: USB Drivers |
Device Drivers ---> USB support ---> [*] Support for Host-side USB [*] USB device filesystem [*] USB selective suspend/resume and wakeup (EXPERIMENTAL) <*> EHCI HCD (USB 2.0) support [*] Full speed ISO transactions (EXPERIMENTAL) <*> UHCI HCD (most Intel and VIA) support <*> USB Printer support <*> USB Mass Storage support Device Drivers ---> [*] HID Devices ---> [*] USB Human Interface Device (full HID) support |
[edit] User-space Configuration
[edit] GMA 3100 Setup
As of 13 Nov 2007, the GMA 3100 chipset is supported in MESA 7.0.2, which is available in portage.
[edit] make.conf
In your /etc/make.conf file, set the VIDEO_CARDS variable to "i810" and optionally add opengl, dri, and xv to your USE flags:
| File: /etc/make.conf |
VIDEO_CARDS="i810" USE="opengl dri xv" |
[edit] Emerge xorg-x11 and mesa
echo media-libs/mesa >> /etc/portage/package.keywords emerge --sync emerge -DNuav xorg-server
[edit] /etc/X11/xorg.conf
As root, edit /etc/X11/xorg.conf:
| File: /etc/X11/xorg.conf |
Section "Module"
...
Load "glx"
Load "dri"
...
EndSection
Section "Device"
...
Driver "intel"
Option "DRI" "true"
Option "UseFBDev" "true"
Option "PageFlip" "true"
Option "TripleBuffer" "true"
Option "XAANoOffscreenPixmaps" "true"
Option "FramebufferCompression" "false"
# Enable offload of Motion Compensation (XvMC)
Option "LinearAlloc" "16384"
Option "Cachelines" "2048"
Option "XvMCSurfaces" "7"
...
EndSection
Section "Extensions"
Option "Composite" "true"
EndSection
Section "DRI"
Group 0
Mode 0666
EndSection
|
Check if OpenGL and Direct Rendering are working by starting X and executing:
glxinfo | grep rendering
should you tell you "yes".
[edit] Tear-Free Video Playback
When combined, the following xorg, dri, and mplayer settings have been tested to minimize CPU usage and prevent screen tearing.
[edit] X-Org Configuration
Start by locking down your screen's vertical refresh using gtf to generate a sane modeline. This should be equal to the exact native refresh rate of your device (usually 60hz for LCD). Some LCD's accept and sync at >60 Hz but still physically refresh at 60Hz, and this difference can result in tearing.
For a typical LCD screen or HDTV lock this down to 60.00 Hz as shown in this example:
gtf 1280 1024 60.00 # 1280x1024 @ 60.00 Hz (GTF) hsync: 63.60 kHz; pclk: 108.88 MHz Modeline "1280x1024_60.00" 108.88 1280 1360 1496 1712 1024 1025 1028 1060 -HSync +Vsync
Place the generated Modeline in the Monitor and Screen sections in your xorg.conf:
| File: /etc/X11/xorg.conf |
Section "Monitor"
...
Modeline "1280x1024_60.00" 108.88 1280 1360 1496 1712 1024 1025 1028 1060 -HSync +Vsync
...
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024_60.00"
EndSubSection
EndSection
|
[edit] DRI Configuration
The most important setting here is vblank_mode, which, when set to 3, forces opengl to sync its output with the screen refresh rate.
| File: /etc/drirc |
<driconf>
<device screen="0" driver="i915">
<application name="all">
<option name="force_s3tc_enable" value="true" />
<option name="fthrottle_mode" value="2" />
<option name="vblank_mode" value="3" />
<option name="allow_large_textures" value="1" />
</application>
</device>
</driconf>
|
Provided you are now also using the above fixed modeline in xorg.conf, you can now check this using glxgears:
glxgears libGL warning: 3D driver claims to not support visual 0x6e 301 frames in 5.0 seconds = 60.072 FPS 299 frames in 5.0 seconds = 59.762 FPS 301 frames in 5.0 seconds = 60.072 FPS 299 frames in 5.0 seconds = 59.762 FPS
Good enough. A nice side effect is CPU usage will drop for applications that would normally render more frames than your monitor can actually display.
Ensure this DRI configuration takes effect for all the users on your system by removing their personal .drirc files (check with them first). As root, execute:
ls /home/*/.drirc ~/.drirc | xargs rm -i
[edit] Mplayer Configuration
Finally, we must configure mplayer to use opengl to render video along with some performance tweaks to make sure 720p and 1080p videos are playable without dropping frames.
echo media-video/mplayer mad a52 dts -mp2 X aac alsa dvd dvdread gif -gtk iconv -ipv6 jpeg lzo -mad opengl png -rtc sdl speex sse sse2 sse3 theora truetype unicode vorbis win32codecs x264 xv xvid >> /etc/portage/package.use emerge -DNuav mplayer
| File: /etc/mplayer/mplayer.conf |
vo=gl:rectangle=1:swapinterval=1:slice-height=0 lavdopts=fast=1:skiploopfilter=all:threads=3 vfm=ffmpeg cache=8128 dr=true double=false vsync=true autosync=30 framedrop=true noborder=true colorkey="0x101010" brightness=5 # really-quiet=true afm=mp3lib ao=alsa stop-xscreensaver=true ## # Subtitles # font="/usr/share/fonts/corefonts/times.ttf" ffactor="1" # black outline sub-bg-alpha="0" # background color ala closed captions sub-bg-color="0" # black to white subpos="90" # By default subtitles are too low subalign="2" spuaa=4 # Anti-alias subs. (4: best and slowest) slang=en,eng sub-fuzziness=1 # Find subtitle files. subfont-autoscale=2 # Set font size. (2: proportional to movie width) subfont-blur=2.0 # Set font blur radius. (default: 2) subfont-outline=2.0 # Set font outline thickness. (default: 2) subfont-text-scale=4.4 # Set autoscale coefficient. (default: 5) subfont-osd-scale=4.4 # Set autoscale coefficient. (default: 6) |
Some users will have their own mplayer configuration files which may incorrectly override the video-output option in the system configuration. Check this as root with the following:
ls /home/*/.mplayer/config ~/.mplayer/config | xargs grep vo
[edit] Make.conf Settings
The follow CFLAGS have been tested to produce optimized binaries for the Core2 architecture and the LDFLAGS reduce load times by minimizing the number of and sorting the dynamic links withing the binary.
| File: /etc/make.conf |
CFLAGS="-Os -pipe -march=nocona -msse3 -fomit-frame-pointer \
-momit-leaf-frame-pointer -mpreferred-stack-boundary=4 \
-maccumulate-outgoing-args -mieee-fp -ffast-math"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
FFLAGS="${CFLAGS} -funroll-all-loops"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -Wl,--as-needed -s"
MAKEOPTS="-j2"
PORTAGE_NICENESS="15"
INPUT_DEVICES="keyboard mouse evdev"
VIDEO_CARDS="i810"
ALSA_CARDS="hda-intel"
|
[edit] Power Saving Settings
The following apply kernel parameters and user-space daemon settings to minimize the frequency of CPU wake-ups. To test these settings, emerge and run powertop as root:
[edit] Powertop
| File: powertop output |
< Detailed C-state information is only available on Mobile CPUs (laptops) > Wakeups-from-idle per second : 21.7 interval: 10.0s Top causes for wakeups: 69.4% ( 12.0) <kernel module> : usb_hcd_poll_rh_status (rh_timer_func) 11.6% ( 2.0) <kernel core> : clocksource_register (clocksource_watchdog) 5.8% ( 1.0) fluxbox : schedule_timeout (process_timeout) 1.7% ( 0.3) krcupreemptd : schedule_timeout (process_timeout) 1.2% ( 0.2) <interrupt> : eth2, uhci_hcd:usb4 1.2% ( 0.2) ifconfig : __netdev_watchdog_up (dev_watchdog) |
[edit] sysctl settings
The bootmisc init.d script runs sysctl, which configures the settings in /etc/sysctl.conf. First, make sure bootmisc is enabled:
rc-update show | grep bootmisc bootmisc | boot
Then update your /etc/sysctl.conf as shown below:
| File: /etc/sysctl.conf |
## # minimize swapping while putting additional pressure # on the VFS to flush out old data and inode cache entries # vm.vfs_cache_pressure = 100000 vm.swappiness = 0 vm.overcommit_memory = 2 vm.overcommit_ratio = 100 ## # disable laptop mode and the NMI watchdog timer # kernel.nmi_watchdog = 0 vm.laptop_mode = 0 ## # maximize the use of cache and decrease the flush # frequency of the dirty cache and XFS file-system # vm.dirty_ratio = 95 vm.dirty_background_ratio = 5 vm.dirty_expire_centisecs = 3000 vm.dirty_writeback_centisecs = 6000 fs.xfs.xfsbufd_centisecs = 4320 |
[edit] Kernel Boot Parameters
The following are kernel command-line arguments passed via the bootloader.
- Enable USB auto-suspend: usbcore.autosuspend=1
- Enable AC97 power saving: snd_ac97_codec.power_save=1
- Disable IRQ balancing, which provides no performance benefit for low SMP (ie: dualcore) systems: acpi_irq_balance=0
- Disable the NMI watchdog: nmi_watchdog=0
| File: /boot/grub/grub.conf |
kernel /bzImage-2.6.23.1-rt ro usbcore.autosuspend=1 snd_ac97_codec.power_save=1 acpi_irq_balance=0 nmi_watchdog=0 root=/dev/sdb5 |
[edit] Local Start Settings
The following settings:
- Enable improved multi-core scheduling
- Enable the ondemand scheduler, decrease its rate-change frequency to 3Hz, and sets the ramp up point when usage exceeds 40%.
- Disable wake-on LAN, because it draws continuous power
- Increase the polling frequency for USB mice, which doesn't affect CPU wake-ups-per-second
- Allow the suspending of the USB subsystem and its devices
- Enable power savings on the SATA links while inactive
- Enable soundcard power savings after one second of inactivity
- Increase each disks readahead to 2MB and set them to spin down after 10 minutes of inactivity.
| File: /etc/conf.d/local.start |
# enable process scheduling optimized for multicore processors
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
# Sets the ondemand governor for one or more CPUs or cores.
#
cd /sys/devices/system/cpu/
maxfreq=cpu0/cpufreq/cpuinfo_max_freq
for c in cpu*/cpufreq/; do
echo ondemand > $c/scaling_governor
cat $maxfreq > $c/scaling_max_freq
echo 333333 > $c/ondemand/sampling_rate
echo 40 > $c/ondemand/up_threshold
done
# Disable wake-on-LAN because it draws power
ethtool -s eth0 wol d
# make the system more responsive to mouse actions
# 2 = 500hz
# 1 = 1000Hz
echo 2 > /sys/module/usbhid/parameters/mousepoll
# Enable USB auto-suspend for all USB devices
for state in $(find /sys -name autosuspend -type f); do echo 1 > $state; done
# Enable SATA link power management
for i in /sys/class/scsi_host/host*/link_power_management_policy; do echo min_power > $i; done
# enable soundcard power savings, which requires inputs to be muted
amixer set Line mute nocap
amixer set Mic mute nocap
echo Y > /sys/module/snd_ac97_codec/parameters/power_save
echo 1 > /sys/module/snd_hda_intel/parameters/power_save
# increase read-ahead and set spin-down timeout to 10 minutes
hdparm -A1 -a1024 -W1 -S 120 /dev/sda
hdparm -A1 -a1024 -W1 -S 120 /dev/sdb
for i in /sys/block/*/queue/{read_ahead_kb,nr_requests}; do echo 2048 > $i; done
|
[edit] Filesystem Table (fstab) Settings
The commit settings in the following example decrease the file-system driven commit rate to once every 12 hours, which effectively allows your disks to spin down. Writes to the filesystem are now fully driven by the VM system and only occur when pressure on the dirty forces eviction to disk. Without this, the filesystem will wake up every 5 seconds and flush.
Note that the commit setting for XFS filesystems is globally set in sysctl.conf, and not per-filesystem in fstab.
| File: /etc/fstab |
# <fs> <mountpoint> <type> <opts> <dump/pass> /dev/sda5 / reiserfs noatime,commit=43200 0 1 /dev/sdb1 /home ext3 noatime,commit=43200 0 1 /dev/sda3 /data xfs noatime,nodiratime,logbufs=8,logbsize=32768 0 1 |
[edit] Network Settings
Stretch out the frequency that the interface plug daemon, ifplugd, polls for a cable (or lack of cable) by increasing the poll-time variable to once every 15 seconds, in /etc/conf.d/net:
| File: /etc/conf.d/net |
ifplugd_eth0="--poll-time=15" |
