Categories
Computers

HDMI on the 1015PN

Necessity is the mother of invention. In this case, it’s the mother of learning how to make HDMI work on my netbook.

If you’re a fellow traveler eschewing desktops like Gnome or KDE for the relative compactness of a window manager this post might be of interest. I wasn’t really surprised to learn the HDMI port didn’t “just work” on my 1015PN. I was surprised at how straight forward it ended up being. It just took a fair amount of research, and a little luck following links from Google searches. I’ll skip the blow-by-blow and get right to the point describing the setup.

First, as anyone familiar with Linux might expect, X is the key player getting HDMI to work. I haven’t found out how to get the HDMI port working for the initial terminal screens during bootup; and, I’m not entirely convinced it can be done. Also, the VGA toggle button has nothing whatsoever to do with it.

Seeing as the key to the whole thing is X, it won’t come as a surprise that we’ll be creating a new xorg.conf. The basic idea is to tell the X server that there are 2 monitors to work with. Each monitor will be driven by it’s own device created in the xorg.conf file. From there, the NVidia GPU takes care of the rest.

So with that simple overview in mind, here’s my new xorg.conf:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" rightof "Screen0"
    Option         "Xinerama" "0"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "HannStar Display Corp"
    HorizSync       37.5 - 41.5
    VertRefresh     60.0 - 65.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier  "HDMIMonitor"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "HDMIMonitor"
    DefaultDepth    24
    Option         "metamodes" "DFP-1: nvidia-auto-select"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    BusID          "PCI:4:0:0"
    VendorName     "NVIDIA Corporation"
    BoardName      "ION"
    Screen         0
    Option         "NoLogo" "true"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    BusID          "PCI:4:0:0"
    VendorName     "NVIDIA Corporation"
    BoardName      "ION"
    Screen         1
    Option         "NoLogo" "true"
EndSection

Much of this is duplicative with differences only in the Identifier field. NVidia has a lot of custom options for there hardware that X can take advantage of. Here’s a list.

The ServerLayout section is probably the most interesting as this is the area that ties it all together. For my purposes, I wanted 2 separate screens maintained completely individually. NVidia supports a mode called Twinview where the screens are overlayed and this would require a different setup. The screen with identifier 0 is the laptop’s LCD. Whatever display is plugged into the HDMI port gets screen ID 1 and it will be to the right of screen 0. Other possibilities are above, below and left. Probably not too surprising there.

Once confident about the new xorg.conf, restart the X server with the HDMI cable plugged into a monitor or TV. If a monitor is not attached to the HDMI port during the restart, X won’t bother creating the new screen. There may be a way to use udev to allow hotplugging of the HDMI cable, but I haven’t investigated further there.

At this point, video should be working and pretty well I might add. Unfortunately, sound will not be working.

This, too, can be remedied.

Use the speaker-test utility to determine the card and device number combination to send audio out the HDMI port. Use aplay -L to get a list of the audio devices. The following worked in my case:

speaker-test -Dplughw:1,7

Alternatively, aplay can be used with a wave file. For instance:

aplay -Dplughw:1,7 test.wav

I’ll note that for aplay, the device had to be specified as plughw as opposed to hw or hdmi.

Once the device has been determined, edit(or create) the file ~/.asoundrc and use something like the following:

pcm.!default {
    type hw
    card NVidia
    device 7
}

I don’t think this is the best solution because now all sound will be sent through the HDMI port. So far, near as I can tell anyway, the only way to change it requires fiddling with this .asoundrc file, though it may be as simple as renaming it to force use of the onboard sound.

Now it’s time to take a break and stream some video’s to a nice 1080P flat panel.

Leave a Reply

Your email address will not be published. Required fields are marked *