Showing posts with label gnome-shell. Show all posts
Showing posts with label gnome-shell. Show all posts

Monday, 4 May 2020

Dual-GPU support: Launch on the discrete GPU automatically

*reality TV show deep voice guy*

In 2016, we added a way to launch apps on the discrete GPU.

*swoosh effects*

In 2019, we added a way for that to work with the NVidia drivers.

*explosions*

In 2020, we're adding a way for applications to launch automatically on the discrete GPU.

*fast cuts of loads of applications being launched and quiet*




Introducing the (badly-named-but-if-you-can-come-up-with-a-better-name-youre-ready-for-computers) “PrefersNonDefaultGPU” desktop entry key.

From the specifications website:
If true, the application prefers to be run on a more powerful discrete GPU if available, which we describe as “a GPU other than the default one” in this spec to avoid the need to define what a discrete GPU is and in which cases it might be considered more powerful than the default GPU. This key is only a hint and support might not be present depending on the implementation. 
And support for that key is coming to GNOME Shell soon.

TL;DR

Add “PrefersNonDefaultGPU=true” to your application's .desktop file if it can benefit from being run on a more powerful GPU.

We've also added a switcherooctl command to recent versions of switcheroo-control so you can launch your apps on the right GPU from your scripts and tweaks.

Tuesday, 9 August 2016

Blog backlog, Post 4, Headset fixes for Dell machines

At the bottom of the release notes for GNOME 3.20, you might have seen the line:
If you plug in an audio device (such as a headset, headphones or microphone) and it cannot be identified, you will now be asked what kind of device it is. This addresses an issue that prevented headsets and microphones being used on many Dell computers.
Before I start explaining what this does, as a picture is worth a thousand words:


This selection dialogue is one you will get on some laptops and desktop machines when the hardware is not able to detect whether the plugged in device is headphones, a microphone, or a combination of both, probably because it doesn't have an impedance detection circuit to figure that out.

This functionality was integrated into Unity's gnome-settings-daemon version a couple of years ago, written by David Henningsson.

The code that existed for this functionality was completely independent, not using any of the facilities available in the media-keys plugin to volume keys, and it could probably have been split as an external binary with very little effort.

After a bit of to and fro, most of the sound backend functionality was merged into libgnome-volume-control, leaving just 2 entry points, one to signal that something was plugged into the jack, and another to select which type of device was plugged in, in response to the user selection. This means that the functionality should be easily implementable in other desktop environments that use libgnome-volume-control to interact with PulseAudio.

Many thanks to David Henningsson for the original code, and his help integrating the functionality into GNOME, Bednet for providing hardware to test and maintain this functionality, and Allan, Florian and Rui for working on the UI notification part of the functionality, and wiring it all up after I abandoned them to go on holidays ;)

Thursday, 7 August 2014

Post-GUADEC


  • If you have an orientation sensor in your laptop that works under Windows 8, this tool might be of interest to you.
  • Mattias will use that code as a base to add Compass support to Geoclue (you're on the hook!)
  • I've made a hack to load games metadata using Grilo and Lua plugins (everything looks like nail when you have a hammer ;)
  • I've replaced a Linux phone full of binary blobs by another Linux phone full of binary blobs
  • I believe David Herrmann missed out on asking for a VT, and getting something nice in return.
  • Cosimo will be writing some more animations for me! (and possibly for himself)
  • I now know more about core dumps and stack traces than I would want to, but far less than I probably will in the future.
  • Get Andrea to approve Timm Bädert's git account so he can move Corebird to GNOME. Don't forget to try out Charles, Timm!
  • My team won FreeFA, and it's not even why I'm smiling ;)
  • The cathedral has two towers!
Unfortunately for GUADEC guests, Bretzel Airlines opened its new (and first) shop on Friday, the last days of the BoFs.

(Lovely city, great job from Alexandre, Nathalie, Marc and all the volunteers, I'm sure I'll find excuses to come back :)

Monday, 14 April 2014

JDLL 2014 report

The 2014 "Journées du Logiciel Libre" took place in Lyon like (almost) every year this past week-end. It's a francophone free software event over 2 days with talks, and plenty of exhibitors from local Free Software organisations. I made the 600 metres trip to the venue, and helped man the GNOME booth with Frédéric Peters and Alexandre Franke's moustache.



Our demo computer was running GNOME 3.12, using Fedora 20 plus the GNOME 3.12 COPR repository which was working pretty well, bar some teething problems.

We kept the great GNOME 3.12 video running in Videos, showcasing the video websites integration, and regularly demo'd new applications to passers-by.

The majority of people we talked to were pretty impressed by the path GNOME has taken since GNOME 3.0 was released: the common design patterns across applications, the iterative nature of the various UI elements, the hardware integration or even the online services integration.

The stand-out changes for users were the Maps application which, though a bit bare bones still, impressed users, and the redesigned Videos.

We also spent time with a couple of users dispelling myths about "lightness" of certain desktop environments or the "heaviness" of GNOME. We're constantly working on reducing resource usage in GNOME, be it sluggishness due to the way certain components work (with the applications binary cache), memory usage (cf. the recent gjs improvements), or battery usage (cf. my wake-up reduction posts). The use of gnome-shell using tablet-grade hardware for desktop machines shows that we can offer a good user experience on hardware that's not top-of-the-line.

Our booth was opposite the ones from our good friends from Ubuntu and Fedora, and we routinely pointed to either of those booths for people that were interested in running the latest GNOME 3.12, whether using the Fedora COPR repository or Ubuntu GNOME.

We found a couple of bugs during demos, and promptly filed them in Bugzilla, or fixed them directly. In the future, we might want to run a stable branch version of GNOME Continuous to get fixes for embarrassing bugs quickly (such as a crash when enabling Zoom in gnome-shell which made an accessibility enthusiast tut at us).


GNOME and Rhône

Until next year in sunny Lyon.

(and thanks Alexandre for the photos in this article!)

Thursday, 17 October 2013

More power management changes

As is becoming common, we will have some more power management changes in GNOME 3.12, though those changes will also affect other desktops, whether they use UPower's D-Bus interface, or libupower-glib, the helper library.

The goals of the exercise were simple:

  • reduce wake-ups on the daemon and on the client side
  • reduce code duplication amongst desktop environments, and even within the same environment (composite battery, anyone?)
  • moving some policy actions to a lower level (one could not request hibernation or suspend when multiple users were logged in without interaction and passwords)
All those changes are now in UPower master ready for testing.

Out with the old

The deprecated interfaces for Suspend, Hibernate, etc. are finally removed, after being obsoleted by logind. We've also removed the QoS interface that nobody was using, and the out-dated battery recall support. It's not that batteries don't explode any more, it's that they don't all come from known-bad batches.

In with the new

We have 2 new properties on each of the devices.

WarningLevel which uses daemon-side configurations to tell you whether a device's battery level is low, critically low, or whether we're about to take action on that critical level.

We also have IconName, which replaces some cut'n'pasted code between desktop components. If your desktop environment has many more icons for all types of devices on low battery, for example, you can ignore this property and use the code you always have.

Using those new properties usefully is the new DisplayDevice object. It groups all the batteries and UPSes in the daemon into one, easy to use object that you can use to display a single status icon in your shell chrome. Obviously, if you want to show more devices, the individual batteries and UPSes are still available through the usual means. And it obviously has the 2 new properties mentioned above, so your session daemon can get told when to show notifications for low batteries.

And finally, using that new combined DisplayDevice is the critical battery action policies. As mentioned above, multi-user systems could not hibernate without requiring the user to enter an administrator password, which is less than convenient when your machine is running out of UPS power fast. The configuration for that policy is now in the daemon itself, with sane defaults, and it will hibernate the machine for you.

And to the modernisation

libupower-glib now uses GDBus, even if the daemon doesn't. The daemon however sends PropertiesChanged signals which means that modern D-Bus bindings will automatically get the new values for properties, instead of polling the daemon. The DeviceChanged and Changed signals have thus been removed.

API changes

They are numerous, too many to mention here. I've posted to the device-kit mailing-list with a list of changes that were made, reply there if you have any questions regarding using UPower in your application or session daemons.

Miscellaneous

systemd >= 207 will save your brightness settings across reboots, and the upcoming systemd 209 will have support for saving keyboard backlight across reboots.

I've made attempts at supporting Intel Rapid Start in systemd, but this will actually require kernel changes. Hopefully we should be able to land this by the time GNOME 3.12 is released.

Monday, 13 June 2011

IM, Contacts and Social Hackfest, day one

In Cambridge (the proper one, in Cambridgeshire), at the Collabora offices, for the first day of our IM, Contacts and Social Hackfest.

Today, we:
  • discussed end-user problems with Telepathy and Empathy's gnome-shell integration (and started the specifications necessary to fixing some of those bugs) (everyone for the problems listing, Danni and Guillaume for the start of bug fixing)
  • started working on integrating gnome-keyring dialogues into the Shell (Stef Walter)
  • fixed libfolks bugs (Philip), and discussed a potential problem API problem in the folks to evolution-data-server synchronisation code (which will be used in the Contacts API) (Travis, Raul, Bastien)
  • packaged up gnome-online-accounts for Fedora (Bastien)
  • worked on better high-level tp-glib support for file transfers (Morten)
  • HMAC support in glib (Stef Walter)
Tomorrow we'll have Rob Bradford joining us, and probably start talking about GNOME Online Accounts integration with libsocialweb, as a way to kickstart its use all across the desktop.

Wednesday, 8 June 2011

Small tablet improvements

I recently added two new plugins to gnome-settings-daemon, which should make life a little bit better on tablet computers, such as the WeTab/ExoPC that most MeeGo developers seem to have lying around.

The first plugin is the orientation plugin, which will read the orientation from udev (which itself reads it from the accelerometer), and rotate the display and the input touchscreen as appropriate.

The second plugin is the cursor plugin, which will simply hide the mouse cursor when you don't have a mouse attached to a computer with a touchscreen.

Related to those are two gnome-shell bugs. Related to orientation is this bug about providing smoother XRandR transitions in gnome-shell, and related to cursor is a way to show activity in the shell panel when a busy cursor would be shown.

No screenshots, because a vertical desktop with no cursor isn't that interesting.

If you're interested in testing out this on a WeTab, you'll need the accelerometer driver in the kernel, udev git (or udev 172 when it's released) and gnome-settings-daemon master.

And if you want support for another tablet device, check out this discussion on the linux-input list, and drop me a mail if you need more guidance.

Tuesday, 12 April 2011

Want to debug an old status icon applet?

If you want to debug an "old" status icon when running the GNOME Shell, and it duplicates functionality from a icon in the shell itself (say Bluetooth or Sound volume, in my cases), there's two tricks available.

The shell looks at the WMNAME for the applet when choosing to hide it, or show it.
  • For most applets, gtk_status_icon_set_name() isn't called, we just need to change the binary name. Create a symbolic link to your binary with a different name (say, "test-applet"), and launch your application from that.
  • If the applet calls gtk_status_icon_set_name(), just name it differently. Unfortunately, that will require recompilation.
With those tricks, I fixed the volume status icon for the fallback mode, and helped Frédéric Crozat pin-point a (likely) bug in the Bluetooth menu in the shell, as we could not reproduce the bug with the fallback status icon.

Saturday, 5 February 2011

GNOME 3 Test Day

On Wednesday evening, Fedora Desktop hackers were frantically building GNOME 2.91.6 into rawhide, including a number of rebuilds against newer versions of GTK+, and beta testing Live CD images to make sure they were usable.

On Thursday morning (European time), ISO images were being uploaded by the our favourite QA insomniac. Quite a few people came to test the Live CD, and many bugs were filed.

There were plenty of questions about GNOME Shell itself, and some about the design decisions. So if you did try out one of the many GNOME 3 live CDs, and asked yourself the following questions, we'll try and provide some answers.

Q: The dash is broken, I can't add more than 13 favourites to it!?
A: It's known problem, which also fits into the dash resizing when you drag'n'drop new items to it.

Q: I can't read the full name of certain applications when searching for them in overview mode. Can I haz tooltips?
A: Tooltips, maybe not, but a solution is being worked on. Follow the discussion in this bug.

Q: I can't change my font size, really?
A: You can change it for the applications, in the Universal Access settings. For the shell, it's currently not possible, but it will get fixed.

Q: I don't like how hard it is to create workspaces. Is this the final design?
A: It's not. Owen has been working on implementing Jakub's video mockups. See this bug for all the links.

Q: I use 2 monitors, and GNOME Shell is very difficult to use. Is it going to get fixed in time?
A: Hopefully yes. There are two bugs you can monitor. One is about a bug when using two monitors (or at least, more prominent when using two monitors), the other about the plans for even better multi-screen support.

Q: How do I restart my computer?
A: Type "reboot" in a terminal? Unfortunate, but how to present it needs a bit of design work. Just adding another menu item in the system menu just muddles it.

Q: This is way slick. But the NetworkManager applet looks really out-of-place. Can you make it look cool?
A: Yes! System status legend Giovanni is on the case.

Q: My machine can't run GNOME Shell. What about the fallback mode?
A: It looks pretty sad at the moment. There's plenty of room for improvements here. Feel free to jump in if you want to help those not fortunate enough to be able to run GNOME Shell.

Also notable is the fact that plenty of bugs were filed, and quite a few fixed, that we are exercising the graphics drivers and finding bugs, and that despite some complaints (some of them constructive, but not always), GNOME 3 is looking better and even more usable than GNOME 2 by the day.

PS: We even had KDE make GNOME crash. Or close enough.

Monday, 8 November 2010

Bluetooth in gnome-shell

Even though I'm still gnome-shell impaired (waiting on 3D support landing for my Radeon video card), I helped out Giovanni Campagna into getting Bluetooth support in the gnome-shell.

My work was to review Giovanni's code for gnome-bluetooth, and making sure that the gnome-shell behaviour matched that of the existing GNOME Bluetooth applet.

A lot of to-and-fro, but the gnome-bluetooth changes are now in, and waiting on sub-menu fixes for gnome-shell itself. Owen was kind enough to provide me with a screenshot for your enjoyment.

Bluetooth in the shell

This wasn't my first interaction with Giovanni, as, in another long-winded bug, we hashed out the volume control shell icon. This work is already merged, and lives in gnome-shell.

Tuesday, 27 April 2010

Symbolic icons support in GTK+

The design

Discussed as part of the GNOME-Shell design plans, and at the Usability hackfest we had in London earlier this year, we wanted to have icons that would only draw attention to themselves when needed. Unlike what Mark proposed, we wanted to use the theme colours and sizes so as to avoid problems, for users either with or without a visual impairment.

The tricks

To load and theme the icons, we use a CSS style-sheet, with the "!important" keyword, overriding every colour in the SVG file itself. Here's an example of what it might look like.

The second trick is using the tray's colours for GtkStatusIcons. Matthias has more X-fu than me, so using X11 atoms, we export the colours we care about for the icon from the tray, to the out-of-process status icon. Seeing that the shell might not end up using status icons, and that the panel would have the same GTK+ theme as the rest of the desktop, it might not be quite as important for the long term.

Building the icon theme

Jakub updated the instructions on what it took to create the symbolic icon theme, along with some explanations of what's necessary to allow the recolouring.

To test out your created icons, you can also use the SVG snippet above, modify the colours, change the file path for the xi:include, and open the SVG file created with eog, or another gdk-pixbuf powered image viewer.

What does it mean for me, GTK+ theme designer

We chose to only export 3 colours for use by the icons, one warning ("orange"), one error ("red"), and a positive feedback one ("green"). Those are named colours in the GTK+ theme, and you can use Jakub's commit as an example on how to add support for those in your GTK theme.

The main part of the icon (the usually white, or gray-ish bit) will use the text foreground colour for drawing. This means that dark-on-bright and bright-on-dark themes should work out of the box without having two separate icon themes (as was done for Ubuntu's latest release).

What does it mean for me, application writer

Many of the GNOME desktop components already had bugs filed against them, to start using symbolic icons when available. First, review your icons, and see whether they match the use cases mentioned in the design documents. Check whether an icon exists for your application in the gnome-icon-theme-symbolic git repository. Make a patch against your application (example patch), and file it in a bug.

Then, drop by the #usability channel on GIMPNet IRC, or drop a mail to the usability list and ask for your patch to be reviewed.

Testing it out

Just like the famous quatre-quarts, 4 equal quantities of:
  • libcroco from git master
  • librsvg from git master
  • GTK+ from git master
  • gnome-icon-theme-symbolic from git master
Sprinkle with your favourite application for testing, or use gtk-demo.

Thanks

Hiroyuki Ikezoe for his librsvg and libcroco fixes, Jakub, Hylke and Lapo for their work on the symbolic icon theme, and Matthias for his original GTK+ patch.

And my icon turned itself into a symbol, *shting*

A few bugs to kill off before symbolic icons support is in GTK+. But we have some screenshot action for it!