# Power management on Intel Oak Trail platform

## GreatEmerald

I am attempting to set up Gentoo optimally on my tablet PC, Fujitsu Stylistic Q550, which is based on the Intel Oak Trail platform. So far the biggest problem I have is with power management.

I have followed the power management guide on the main Gentoo site, and I still can't get the panel brightness to be controlled. Not sure about the CPU frequency scaling, since setting up the panel control is more important right now.

A bit of a background is needed to explain the situation, I think. The processor on this device is an Intel Atom Z670, part of the Lincroft series. The whole device is the Oak Trail platform, which is based on the Moorestown platform. To me, the situation with the power management system here is rather confusing, to be honest - the Moorestown platform uses neither APM nor ACPI, but its very own SFI (Simple Firmware Interface). Since Oak Trail is based on Moorestown (in fact, executing /sbin/lspci on this device lists nothing else but Moorestown in each slot), I'd imagine that it too uses SFI. I have enabled the SFI configuration option in the kernel - although I'm not sure if that's enough to enable it by default, and there are no kernel boot options that I can find that relate to SFI at all. While compiling laptop-mode-tools, I used the acpi USE flag, since it also has no option for SFI, and according to the little documentation I could find on SFI, it may include hybrid SFI/ACPI support, even though it's not optimal.

I need to mention that with default settings that I have, the battery level is detected correctly (on XFCE, the battery plugin shows whether I have the AC power plugged in, and if not, how long will the battery last), and I can shut down the machine correctly, so it indicates that ACPI (SFI/ACPI?) works, at least partially.

Additionally, the Oak Trail platform (unfortunately) includes the GMA600 graphics chip, based on Poulsbo. Thankfully, the OSS driver included in the kernel (gma500_gfx) is being developed rapidly. In fact, with kernel 3.0.0 my machine could only display graphics without any form of acceleration, couldn't manage to set the native resolution and only worked with ACPI off, while with kernel 3.2 it could manage to set the native resolution, and now with kernel 3.4 it no longer crashes when ACPI is on. Now I'm trying to see if I can manage to set the panel brightness, as people on the Ubuntu forums have managed that on other devices running the GMA500 chip, so I would assume the same should be possible with GMA600 as well.

I have enabled the CONFIG_INTEL_OAKTRAIL and CONFG_DRM_GMA600 options, and either of those gave me an entry in /sys/class/backlight/ called oaktrail-bl/. However, if I change the file brightness inside that folder from the default 100 to, say, 10, I don't see any visual changes at all. Likewise, if I change /sys/class/backlight/acpi_video0/brightness from the default 15 to 5, nothing changes. I tried booting with the acpi_backlight=vendor option, but all that did was remove the acpi_video0 entry, I still couldn't change the panel brightness.

Like I mentioned, the gma500_gfx driver is still in development, and the GMA600 support is marked as experimental, so it's possible that it still doesn't support brightness changes; but I want to make sure of that, as GMA500 users can set it just fine. As a side note, the description of the CONFIG_DRM_GMA600 reads "support for GMA600 (Intel Moorestown/Oaktrail) platforms with LVDS ports. MIPI is not currently supported." - but I have no clue what LVDS ports or MIPI are...

So, to put this into perspective, is there anything else I could do to debug why the panel brightness is not changing when I'm setting the options in either of the entries? Which one should I try to set, anyway? Or perhaps I am missing some configuration or additional packages here?

----------

## GreatEmerald

And I just solved this issue myself! Got to love self-service, eh?  :Smile: 

The reason why it didn't work (as well as why I had a number of other problems, like PulseAudio not starting, and the xfce4-power-manager failing to start correctly and no option to suspend to RAM) was because the avahi daemon was not set to start up by default. I just had to execute rc-update add avahi-daemon default and all these problems just went away. Awesome!

I'm still confused about this SFI/ACPI business, but hey, it works, and that's the important part. In fact, with this last feature taken care of, my tablet PC is now pretty much production-ready and runs Gentoo a lot more smoothly than it ever ran Windows!

----------

## GreatEmerald

Hmm, now I have another issue with the backlight. Like I mentioned, changing the brightness works now - but turning the screen off entirely doesn't. When it should be turned off, the screen is just overlayed with black, but the backlight is still on, eating energy.

I tried running all of these:

```
xset dpms force standby

xset dpms force suspend

xset dpms force off

vbetool dpms off

# in console

setterm -blank 1
```

Each and every command there does the exact same thing - overlays the screen with black, but doesn't turn off the monitor itself. Same thing when selecting acpi_backlight=vendor (except, like I mentioned, this time even changing the brightness doesn't work). Any other things I could try?

----------

## cylent

i love how you're talking to yourself in this thread.

i do want to ask you though -not to steer away from your thread- i have a atom d2700 and it runs blazing hot under even kernel 3.4

do you know of a solution perhaps ; my thread is here: https://forums.gentoo.org/viewtopic-t-926782.html

----------

## GreatEmerald

Thanks for the bump, as the power management issue here is still unsolved, unfortunately.

My tablet PC also runs rather hot, when I think about it. It's probably due to missing CPU frequency scaling, although I'm not entirely certain about how to check what it's set to, and getting the backlight to turn off is kind of a priority for me right now...

----------

## cylent

have u tried another distro just for the sake of seeing if your backlight issue persists?

----------

## GreatEmerald

I did try others earlier (and they had the same issue, but then they also had ACPI issues). But I guess it's true, I should try a new beta version of another distro that ships with kernel 3.5, as from what I've read, it seems that there are some additional ACPI fixes in 3.5 compared to 3.4 that I have currently.

----------

## GreatEmerald

Tested with Ubuntu daily build just now, and the issue is there as well. It seems that turning off the screen is also what prevents it from suspending to RAM, as I can see the resolution being changed to a VGA one when attempting to suspend, but the screen stays lit. ACPI seems to be handled better, though, as the tablet PC is no longer running hot there.Last edited by GreatEmerald on Fri Jun 15, 2012 11:38 am; edited 1 time in total

----------

## cylent

Interesting about the heat issue. I may try to compile 3.5 on my test mint to see.

----------

## cylent

well i tried 3.5rc2. its simply crap! didnt do a thing for me.

hope your backlight issue gets resolved although i wouldnt keep my fingers crossed seeing as how linux on laptops or anything mobile is pure drama.

----------

