Pages

Thursday, October 7, 2010

MSI PR201 and linux: bluetooth, fingerprint, Intel video, Intel audio and card reader

Hi everybody,

today I'm going to write about some tricks to fully handle MSI PR201 features. As comes out of the title we are going to treat 5 main areas: bluetooth dongle, fingerprint sensor, Intel Graphics, Intel audio and MSI PR201 is a small but complete notebook, it comes in a small and lightweight chassis, with a 12" screen. It has a Montevina chipset, so it won't support latest Intel processors (i5, i7 etc), but can run up to the T9900 or X9100 with 3,1GHz clock. The ram supported is DDR2 up to 8GB. Our hardware is going to be:
Device 002: ID 0db0:a97a Micro Star International Bluetooth EDR Device
Device 002: ID 147e:1000 Upek (fingerprint sensor)
VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller
Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller
?? Card Reader ??

So let's begin from the bluetooth device. It's fully supported out of the box, so you won't need strange patches or custom drivers if you have a quite new kernel. The software infrastructure is carried by the bluez package, so first of all let's emerge it: (as alway double check you use flags so you install it in the way you want)
emerge -av bluez
Once it's done we have to add the rc script to init sequence:
sudo rc-update add bluetooth default
Till this point it seems right-forward, but you'll find a great surprise as it won't work :P. The trouble stands in the system policy to manage rights on bt device. So nothing new, we just need to edit the right file and get it work:
sudo nano /etc/dbus-1/system.d/bluetooth.conf
This is an xml-like file which carries the information we need to modify. As you can read rights are granted just to root user. Your user should already be in "plugdev" group, so let's punch another hole adding the followin lines before or after the "root" section:
  <policy group="plugdev">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent"/>
    <allow send_interface="org.bluez.HandsfreeAgent"/>
    <allow send_interface="org.bluez.MediaEndpoint"/>
  </policy>
If you don't want to use plugdev group or don't want to give full rights just modify that in the way you prefer.

Moving on to fingerprint sensor I have to admit that the only feature available (user password replacement) is quite useless: you can always tell someone your pw in case of emergency and let someone use your pc, unless you can make a copy of your fingerprint and leave it in a safe place. ;]
Anyway if you are interested I set it last year following this guide, but I'm not going to set it up again, unless a new bunch of features for fingerprint sensors comes out.

Intel Graphics GMA 4500HD comes with GM45 chipset, and still can render stuff decently. I decided to renounce having a dedicated graphics, preferring a smaller and lighter laptop (less than 2kg and sized as a paper sheet). To spit some juice out of our box is a good advice to move to newest video environment, so let's "x11" overlay using layman (emerge -pv layman):
sudo layman -a x11
if you don't care about bleeding edge keep it this way, if you want to risk some more unmask the 9999 serie. So let's get ready to upgrade our system. First of all we need to add a new videocard:
sudo nano /etc/make.conf
the line should look:
VIDEO_CARDS="intel i965"
as our chipset core is supported by "i965". Now looking at the future I suggest adding "gallium" USE too. It enables the new sw rendering. Later we'll see some stuff about it. Now we can update those packages:
emerge -avuD mesa mesa-progs xorg-server xorg-drivers xf86-video-intel xf86-input-synaptics libdrm
and be sure to add all the drivers installed as we are going to update (hopefully) the xorg server so they will not work anymore. Almost done. Now reboot in your system and test if all drivers are working. If they are broken rebuild them against the newer xorg version.
If everything it's ok, it worths a try enabling gallium mesa rendering. So check you have glxgears. Read carefully, you might get a stuck environment: try enabling it with
eselect mesa set i965 gallium
actually now the rendering does not work, but in the past it did work, maybe is a temporary bug. Before running the following command the right procedure to go back is:
  • logging in another console with (Ctrl+Alt+F2),
  • eselect mesa set i965 classic
  • sudo reboot
now you know how to go back you can try:
glxgears
;]
If you want to set up a custom xorg.conf you can find loads of infos here: Intel Linux Graphics: Documentation

Great. Intel HD Audio device relies on the modules:
snd_hda_intel,
snd_hda_codec_realtek,
snd_hda_codec_si3054,
snd_hda_codec_intelhdmi
you can enable them in your kernel under the path:
-> Device Drivers
-> Sound card support
-> Advanced Linux Sound Architecture
-> PCI sound devices
-> Intel HD Audio
be sure to build them as modules. When you are done be sure to have working audio. A tragic issue of this hardware is the management of headphone output and system speakers. Jack sensing (auto swap from speakers to headphone and vice-versa) seems to be implemented via software in windoze driver, so here we have a great possibility (to use both speakers and headphone together). This may let someone think he can't turn off speakers using headphone, but it's not true. All you need is to load the driver with a particular option, so we can have a single slide for volume out and a couple of switches to toggle those lines:
sudo nano /etc/modprobe.d/alsa.conf
and append this line, with which you ask a 2 channel switch (speaker vs headphones)
options snd-hda-intel model=targa-2ch-dig
now at boot you'll have your hardware configured correctly.

Last, but not least important is card reader. Whoa.... it drives me mad. I still can't even find it in pci, usb or whatever. I'm still trying to get it work, but I don't know even the name. In future I'm going to install windoze on a temporary HD drive and see the info from the proprietary driver. It happened that last firmware update blew up my usb-boot with windoze, so I have to phisically change the drive to make this test. I remember that it looked something like a simulated serial drive but nothing more.

I'll come back with more info, as always.

Cheers

No comments:

Post a Comment