Friday, 1 February 2013

Power management in GNOME 3.8

In the past couple of weeks, apart from reviewing very many patches for gnome-control-center (especially for new and re-designed panels), I've been working on updating the power management handling in GNOME.

Test suite

The first change is that we have a test suite (currently with 15 separate tests) to test interaction between gnome-settings-daemon's power management and various session and system components. This is thanks to Martin Pitt, and his work on python-dbusmock.

We'll try and add new tests as bug reports come in to avoid regressions, although some cases will remain untested because of limitations in our logging.

 All clear

Screensaver and backlight interaction

With gnome-shell becoming the sole screensaver (after the removal of fallback mode, and the obsoletion of gnome-screensaver), we've been able to streamline the code handling the various screen backlight power levels.

Your screen will now turn off as soon as the screensaver kicks in, moving your mouse in the screensaver will turn it back on for 20 seconds before turning off again, and when to dim (if you've chosen so) is dependent on whether you're on battery or not, and the default idle time (eg. if your screen turns off after 5 minutes of inactivity, the screen will dim after 4). This makes the behaviour more consistent, and predictable, compared to the mish-mash of settings we had before, where some delays were available for change in the UI, and others only through GSettings or gnome-tweak-tool.

Those constants are separate from the code, and exported to the test suite so they are flexible and can be changed if the behaviour doesn't exactly match what users are expecting.

The other change relating to that, is that the screen shield will now always pop down when the screensaver kicks in (thanks to Giovanni for the gnome-shell work). This doesn't mean that you'll have to enter your password each time, but only after the "lock delay" if you've set one.

We've also added a number of nice touches, like the screen turning back on for a short period when you plug or unplug your laptop, made sure that your laptop screen gets turned off and your session locked when closing the lid and turn off the backlight for machines where suspend causes the backlight to come back on temporarily (as seen on MacBooks).

Very very idle

We've also added a long-requested feature: the ability to force logout after a period of idle. This is useful in kiosk and computer lab situations, and is only available through GSettings. As we've added support for this feature (warning prior to logging out, with the screen turning on for a couple of seconds when the warning shows up), we've realised that the infrastructure is the same for automatic suspend/hibernate situation. This means I expect to change the default "long idle" behaviour to suspending. This will still be changeable in the Power preferences. This should land after 3.7.5, and don't worry, we'll make this change very visible in the release notes :)

*I* am not suspending by default

Inhibit

But you don't want to suspend, you really don't.

GNOME supports the draft FreeDesktop "Idle inhibition" specification, as implemented by KDE, which hopefully means that more third-party applications should start behaving better when playing back films, in presentation mode, or for large overnight downloads. This should hopefully get out of draft status before the GNOME 3.8 release.

We also have a gnome-session-inhibit tool available in gnome-session for your scripting needs.

Colophon
 
All the changes mentioned should be available in GNOME 3.7.5, and I will be available to take complaints at FOSDEM this week-end.

Monday, 28 January 2013

Office-runner 1.0


Office Runner 1.0 is now available, downloadable at the usual location.

We had some pretty good comments on the original announcement, even though some people took this opportunity to start slinging insults, which is pretty uncool.

There's plenty of related power management work that's been happening in preparation of GNOME 3.8, and we're mostly waiting on GNOME Shell changes to land before I can talk to you about those. I hope it gets the same (positive) comments as Office Runner did, though I imagine some people will get angry about changes, as they are wont to do.

This version requires systemd for the suspend inhibition.

And don't forget to post your high scores ;)

Friday, 21 December 2012

Settings news

GNOME 3.7.3 just got released earlier today, and includes some great new work. I won't be posting screenshots, because some of the UIs aren't final, and we'll be iterating until 3.8 is released (and it's my birthday ;).

Cleaning up

We've cleaned up gnome-settings-daemon plug-ins, and gnome-control-center panels, as well as removing the support code for GNOME Fallback, saving us around 10k lines of code.

gnome-control-center (now "Settings" in the UI) is faster to start, and gnome-settings-daemon require less code to write additional plug-ins.

New panels

3 new panels got added:

  • Search panel, to control the search output in gnome-shell, as well as control which directories and file types Tracker should index.
  • Notifications, to manage the notifications that will show up on your desktop. The filtering is done in gnome-shell itself, and would allow you to only show specific notifications in the lock screen for example. See Giovanni's post if your application uses notifications.
  • Privacy, which still requires quite a bit of work, would be the go-to place to ensure your identity isn't leaked on the network, or visible on your system. You can see how some of the features in the two aforementioned panels will also affect your privacy.
With the above panels merged, we're left with the re-design of the Power panel, which should mean the end of the "Screen & Brightness" panel (half of the settings went to the Privacy panel, the other half will go to the Power panel).

New backend features

First, users of Wacom tablets, you'll be happy to know there's now a button you can press to see, in an OSD, the current configuration of your tablet buttons. This feature has been long in the making, but the results are great. There's coverage for every tablet known to libwacom, and support for touchrings, touchstrips and modeswitch buttons. Select the button you want to use for the help in the Settings panel.

Secondly, we now support the draft "Idle Inhibition" specification from Freedesktop.org.

We also have some unfinished features.

The remote-display plugin will disable animations in the desktop when using the desktop over VNC or Spice.

And the cursor plugin will hide the mouse cursor until first used, or when using a touchscreen, similarly to what Windows 8 supports (it's the only system other than ours that supports both cursor pointers and touchscreens).

Those 2 plugins should hopefully be working by the time of the GNOME 3.8 release.

Until next time.

Friday, 9 November 2012

Jobs change

Seeing as everyone is making job-related posts, I thought I'd join in the fun.

After 10 years of service, I've left Red Hat UK on the 31st of October to join Red Hat France on the 1st of November.

I now live in the birthplace of cinema and of French gastronomy, so poke me if you want to talk GNOME or Linux over beers. I've already found the English pub.

Wednesday, 23 May 2012

System Settings shell changes

 While Jon McCann made changes to the System Settings UI, I was busy implementing an animated notebook, to make the switch between panels, overview and search less jarring.



Video on YouTube.

Here's a list of what we fixed:

  • Avoid scrollbars at all costs on startup (made possible by some GTK+ sizing bug fixes)
  • Make the default window bigger, while supporting small displays (800x600 displays should now be usable)
  • Bigger icons to match the Shell's overview
  • Better layout of search results
  • Animated transitions between panels, overview and search results

Before


After

There will most likely be more tweaks of the UI between now and the GNOME 3.6 release, which I'll make sure to let you know about.

PS: Before you ask, we cannot animate window size changes. Hopefully this will be possible in the future.

Update: Fixed a double-negative. Also note that there are some differences between my screenshots and reality, like the separators, as my system wasn't fully updated.

Friday, 18 May 2012

Notes on Apple IR remotes reverse-engineering

In 2009, I wrote a driver to make the infra-red remote on my original MacBookAir work out-of-the-box on Linux. The driver was rejected upstream on the basis that the device would soon be supported through more generic means. In the meanwhile, it lived in Fedora's kernel tree, and I took some notes about implementing pairing, so that only your remote would work with your computer.

I'm posting this now because I wanted to poke at a MacOS X application today, and couldn't for the life of me remember the name of the program to monitor disk-activity. Hope this finds its way to a search engine near you.


  • Launched the System Preferences, Security, and unlock the panel.
  • In a terminal: sudo fs_usage -f filesys -w and check the output when enabling/disabling the remote.
  • We can see the modified file is /Library/Preferences/com.apple.driver.AppleIRController.plist
  • Installed PlistEditPro and opened the file up.
  • Now try to pair a remote (menu and next together)
  • You can see the UID value changing in the file. I named the remotes I had available to me:
    • New remote: UID = 145 
    • Old clean remote: UID = 24
    • Old dirty remote: UID = 227 
  • After adding some debug to the aforementioned appleir driver, in Linux, I got:
    • New remote: appleir: received (5 bytes) 25 87 e0 91 02
    • Old clean remote: appleir: received (5 bytes) 25 87 e0 18 03
    • Old dirty remote: appleir: received (5 bytes) 25 87 e0 e3 02
  • So the 4th byte is the remote's UID.
Now one could implement remote pairing using a sysfs attribute, a udev helper to apply the pairing across reboots, and PolicyKit helper to set and save the paired UID.

This will be left as an exercise to the reader :)

Wednesday, 29 February 2012

Wacom tablets in GNOME 3.4 (part #2)

Since the last report, "mapping" has been the order of the day. We now have support for:

Display mapping

Not as pretty as mocked up, but it's functional. We hope to have the nicer version done for the next development cycle.

and

Button mapping

The button mapping will show you the actual keys, with translated names, for your device, instead of every possible combination of buttons which end up doing nothing.

We've also made a big number of layout changes and fixes, which means that the main window isn't as awkward as it used to be.

There are a number of features that unfortunately didn't make the cut, mostly due to the lack of support from the X.org drivers. Mode switching currently doesn't advertise the current mode by changing the LED, and the OLEDs that show the bindings for each key stand empty.