Linux Gigabyte GA-Z77M-D3H-MVP and i3-3225 as low as 16W
#1
I recently happened upon the knowledge that the my home entertainment center pulled over 150 watts while it wasn't even on. Given the quiescent power usage of my entire house is around 300 watts at idle, it seemed disproportional that I'd be blowing 3.6kWh a day (roughly $144 a year) to have episodes of Pawn Stars ready at my whim.

My old HTPC is an Intel Core 2 Duo E8400 with 4GB of RAM, two spinning hard drivers, and an optical drive. Replacing this machine with something that was capable of playing 1080p video seemed easy and cheap enough, but this machine also doubles as a Linux development box. When considering a replacement, I didn't want to trade power (CPU) for power (watts). I didn't want to upgrade a piece of equipment only to have it perform the same or worse than it did before. That would be like remarrying my ex-wife, and her facebook relationship status indicates that nobody wants that.

Everybody says they go with the i3-3225 processor to get a little extra oomph and I was no exception. I kept thinking that I might do some Steam gaming on it. Maybe I will. Maybe time travel really is possible. Maybe people really are innately good. Yeah, none of these things are true. I should have saved the $10 and gotten the standard i3-3220.

There was a little conflicting information about what size PicoPSU was required keep a system like this from crashing due to electron starvation, and not enough hard numbers. Here's some hard numbers (all numbers are AC at the wall):
  • Motherboard / CPU (with fan) only: 14W
  • Above + SSD (at Linux desktop): 16W
  • Above + DVD player: 18W
  • Above + 2TB Seagate Green 5900RPM drive: 22W
  • Same, except with hard drive spun down: 19W
  • In XBMC (dirtyregion, 0 flip): 25W
  • XBMC playback (VAAPI): 25W
  • make -j4: 58W

Assuming about 80% efficiency in the AC/DC converter, the computer is only pulling 47W at peak so it seems an 80W supply would probably provide plenty headroom. The extra 20W can be used to power USB-based remote control cooling mats. I hate when I pick up my remote and it is all warm, probably because someone's butt was on it.

Parts
Success

This machine is insanely fast. Full build time of one of my larger projects went from 12 minutes to 5 minutes. Boot time is about 7 seconds for all services, 10-12 seconds and the Xubuntu desktop is ready and idle. Shuttleworth can take his Unity 3D Turbo X Lens Flare Desktop and shove it. Xubuntu uses less RAM and CPU power, has a launch menu that doesn't try to include every file in the universe on it, and most importantly isn't brown. From this cold booted desktop, XBMC launches in about a second.

Challenges
  • Drive read speed only 220MB/s. This was a bit disappointing, then I realized in the BIOS that the drive was set to ATA mode. Switched it to AHCI and read speeds went up over 500MB/s. If you try to do this to a Windows system after installation,you'll get a bluescreen booting because the system partition now can't be found. Linux is cool with this apparently though and that made my day.

  • No video acceleration. Another easy one, `sudo apt-get install i965-va-driver`

  • If the TV is off when the computer boots, X won't start on account of there not being a monitor connected. I solved this on the last machine by dumping the TV's EDID (timing definitions) and getting the nvidia driver to use that using the "CustomEDID" xorg.conf parameter. The intel driver doesn't appear to support it, but things have changed in the 5 years since I built the last computer. The kernel now supports “kernel mode switching”, which means the intel driver can rely on the kernel to provide valid modes and EDID. There's even a drm_kmw_helper module to fake EDID.

    To set it up, just put your edid file in /lib/firmware/edid (I'm not sure how you'd get this if I didn't already have it from the nvidia install). Now set your mode by adding to the kernel command line in /etc/default/grub
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="video=HDMI-A-2:1920x1080D drm_kms_helper.edid_firmware=HDMI-A-2:edid/direct-lg.edid drm_kms_helper.poll=0"
    HDMI-A-2 is the only HDMI port on my motherboard, but there are other ports are listed in /sys/class/drm if you need to know what they're called. The D on the end of the mode tells the kernel to force digital output even if nothing is connected. The firmware is a module parameter for the kms helper which points to the file in /lib/firmware. We also don't want the kms helper to poll for new devices, so we disable that by setting the poll parameter to 0.

    After editing /etc/default/grub, run update-grub and reboot for the changes to take effect.

    Code:
    [drm] Got external EDID base block and 1 extension from "edid/direct-lg.edid" for connector "HDMI-A-2"

    Now you'll get these messages in your event log every 10 seconds. That's terrible for the SSD, whose cells wear out over time. Also it is annoying to try and find other errors when there's debug spew every 10 seconds. This is the intel driver's display hotplug code probing connected monitors, so let's disable that. Create a file called /etc/X11/xorg.conf and put this in it:

    Code:
    Section "Device"
            Identifier "Intel HD Graphics"
            Driver "intel"
            Option "HotPlug" "false"
    EndSection

  • Once you force a kms video mode, guess what? Your sound won't work any more. For some reason the Intel audio driver does its own check to see if something is connected, in a way that goes around the kms helper. No worries, luckily they also provide a tool for poking the registers. You'll need to `sudo apt-get install intel-gpu-tools` for the intel_reg_write command, and put the following in your rc.local to have the port forced as being detected as HDMI (as opposed to DVI). Note this doesn't properly set up ELD but I couldn't figure out how to get that going. Sound comes out though, both in passthrough and GUI sounds in XBMC so who cares?
    Code:
    # These registers are for CougarPoint devices!
    # Set Video DIP enable, enable[AVI,SPD], select SPD, send every VSync
    intel_reg_write 0xE0200 0x81390000
    # Set HDMID register to HDMI mode, audio output enabled
    intel_reg_write 0xE1160 0x80000adc

  • My USB HP MCE IR Receiver wasn't working. The device was being found and the module was getting loaded but there was a communication problem that culminated in the summary
    Code:
    mceusb 1-1.4:1.0: 2 tx ports (0x0 cabled) and 2 rx sensors (0x0 active)
    Yeah 0 active receive sensors means you'll spend about 5 hours pulling your hair out trying to figure out why LIRC isn't responding to anything. Loading the mceusb driver with the debug=1 parameter showed me that it was getting garbage data which was shifting off the actual responses to the point it wasn't being recognized. Trying front-mounted USB ports, or USB 3.0 ports did nothing to remedy the issue. I did notice that USB device reported its endpoints were “bulk” endpoints, but the driver wanted them to be “interrupt” endpoints so it addressed them as such. When it did this, it switched the kernel representation of them to “interrupt”, and when the driver unloaded it left them this way. Subsequent loads of the driver correctly passed data without the garbage.

    This is a very hacky solution, but I don't know why the device would misreport its endpoints (they report correctly on the old system) so I'm ok with this solution: just reload the driver once on startup in /etc/rc.local:
    Code:
    # Unload and reload the mceusb driver as it seems to not want to communicate
    # the first time (only thing I can see different is the endpoint changes
    # from BULK to INTERRUPT)
    rmmod mceusb
    modprobe mceusb

  • Seeing how nice the new kernel system is for remote controls as input devices, I decided to use that instead of LIRC. The ir-keymaps package installed a default keymap that had the directional controls and enter working in XBMC but I expanded (replaced) it with my own mapping. This is a lot easier because the remote now sends keypresses so I can just map them to whatever key does what I want it in XBMC without editing a lircmap.xml. To get them to load automatically on boot, I added a udev rule to load them when the device is added /etc/udev/rules.d/99-ir-keytable.rules
    Code:
    ACTION=="add", SUBSYSTEM=="rc", RUN="/usr/bin/ir-keytable -s $name -c -w /etc/rc_keymaps/rc6_mce_custom"

    Xubuntu will also let you map keyboard commands to LIRC buttons from the Settings Manager -> Keyboard applet. I mapped the "Media" button to launching XBMC. In my previous Ubuntu system I did this with irexec.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
Gigabyte GA-Z77M-D3H-MVP and i3-3225 as low as 16W0