Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mate-power-manager: brightness UI broken when used under non-compositing window manager #110

Closed
lexa2 opened this issue Sep 17, 2014 · 16 comments

Comments

@lexa2
Copy link

lexa2 commented Sep 17, 2014

After I had updated from mate 1.6 to 1.8 I have no meaningfull UI when press keys to change laptop screen brightness or laptop keyboard backlight brightness. All I get is a tiny grey square at the middle of the active display.

Looking at the mate-power-manager source code I suspected that something might got broken in the non-compositing draw codepath for 1.8. I had tried to enable marco's built-in desktop compositing and it fixed the issue.

At the same time OSD popup with non-compositing codepath works great in mate-settings-daemon (i.e. I got normal "classic" popups when press volume change keys) so it most probably is a regression in mate-power-daemon OSD handling.

Packages I use and their versions:

ii  mate-power-manager                                          1.8.0+dfsg1-3+b2                  amd64        power management tool for the MATE desktop
ii  mate-power-manager-common                                   1.8.0+dfsg1-3                     all          power management tool for the MATE desktop (common files)
ii  mate-settings-daemon                                        1.8.1-2                           all          MATE session settings daemon (metapackage)
ii  mate-settings-daemon-common                                 1.8.1-2                           all          MATE session settings daemon (common files)
ii  mate-settings-daemon-pulse                                  1.8.1-2                           amd64        MATE session settings daemon (PulseAudio version)
@SukkoPera
Copy link

I have exactly the same problem, and it seems many other people are experiencing it:

http://forums.mate-desktop.org/viewtopic.php?f=16&t=3261

@nachanon
Copy link
Contributor

A relevant bug report on Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1142224

@raveit65
Copy link
Member

Can confirm that it works great with compositing enabled in fedora-21/20 with mate-1.8.x, with marco or compiz as WM.

@flexiondotorg
Copy link
Member

Also reported for Ubuntu MATE.

https://bugs.launchpad.net/ubuntu-mate/+bug/1365415

@clefebvre
Copy link
Contributor

After troubleshooting this with infirit, the regression was caused by this commit 4fd2ae3

The commit reverts cleanly but there are a few commits made after that which modify applets/, so it won't compile out of the box by just reverting that one on its own.

@lexa2
Copy link
Author

lexa2 commented Nov 21, 2014

Yep, I also traced this problem down to this commit. I don't think reverting it is a way to go - it seems that original intension was to reuse the UI OSD code from mate-settings-daemon and it seems that MSD OSD UI doesn't suffer from this bug. IMO the real fix would be to debug what are differences in the usage patter between MSD and mate-power-manager and change it in a way so OSD works as it should.

Unfortunatelly I can't debug this myself due to lack of time.

21.11.2014, 17:59, "Clement Lefebvre" notifications@github.com:

After troubleshooting this with infirit, the regression was caused by this commit 4fd2ae3

The commit reverts cleanly but there are a few commits made after that which modify applets/, so it won't compile out of the box by just reverting that one on its own.


Reply to this email directly or view it on GitHub.

Best regards,
Alexey Loukianov
*nix Specialist
System Engineer
Tel.: 79262181320

@Nazonight
Copy link

I had a similar problem on a fresh install of ubuntuMate, and what seemed to fix it was 'enable compisiting' under mate tweak - interface

@raveit65
Copy link
Member

raveit65 commented Jan 3, 2015

Can we revert 4fd2ae3
for 1.8 branch?
It makes no sense to include a bug in a stable branch if no one fix it.

@lurwas
Copy link

lurwas commented Jan 6, 2015

Nazonight, your tweak helped me a bit on the way. Now I can see the brightness controls going up and down.
But...the actual brightness of the display is not changed :(
(This is on a HP EliteBook).

Anyone got a fix for this yet?

@nachanon
Copy link
Contributor

nachanon commented Jan 7, 2015

In function msd_media_keys_window_init() in gsd-media-keys-window.c, it seems that object named acme_box does not exist, according to acme.ui (/usr/share/mate-power-manager/acme.ui) GTKBuilder script. But acme_frame still exists (as used in revision 971fadd, a commit before the regression).
This patch brought it back to the code.

Patch:
https://gist.github.com/nachanon/6a34fdd5ace9fc59fea9

Following screenshot is captured after applied the patch:

You'd see that backlight popup is now displayed with progress bar and icon, though there's some excess border around the window.

MATE: MATE Power Manager 1.8.0, MATE 1.8.1 (patched against source package from Debian Wheezy backports repository)
System: Debian GNU/Linux 7.0 Wheezy i386

@nachanon
Copy link
Contributor

nachanon commented Jan 7, 2015

An alternative approach is to fix the object name in acme.ui script directly. I found no other code in mate-power-manager that tried to use acme_frame or acme_vbox from acme.ui, so there shouldn't be a problem.

Regarding the excess border issue, I compared it to mate-settings-daemon's acme.ui GTKBuilder script (/usr/share/mate-settings-daemon/acme.ui), and found that mate-settings-daemon's one does not have a nested GTKFrame container, it uses GTKVBox acme_box directly inside GTKWindow.

mate-power-manager's one does have the corresponding GTKVBox container, but it was named acme_vbox rather than acme_box, and has an additional 12-pixel border width.

So, this is an alternative patch which fixes GTKVBox object name, removes the excess border, and eliminates the unnecessary GTKFrame:
https://gist.github.com/nachanon/2c3f43a30bdab1786fd3

Following screenshot is captured after applied this alternative patch:

You'd see that backlight popup is now displayed properly with progress bar and icon, and looked consistent with all other media key popup dialogs.

For users that didn't want to recompile mate-power-manager, can use the following patch to fix the already-installed /usr/share/mate-power-manager/acme.ui script directly as well:
https://gist.github.com/nachanon/458ea39d53518d63f87c

Then just logout and re-login to see the result.

MATE: MATE Power Manager 1.8.0, MATE 1.8.1 (patched against source package from Debian Wheezy backports repository)
System: Debian GNU/Linux 7.0 Wheezy i386

@raveit65
Copy link
Member

raveit65 commented Jan 7, 2015

I can confirm that 1003_fix-backlight-popup.patch works.
But using the other patches for acme.ui gives me always a square as osd.
Which is the right acme.ui patch for using together with 1003_fix-backlight-popup.patch?

First i tried only the mate-power-manager_fix-backlight-popup-gtkbuilder.patch without success.

@raveit65
Copy link
Member

raveit65 commented Jan 7, 2015

Using the merged version of the patch a7d224c
fix the issue for me.

@lexa2
Copy link
Author

lexa2 commented Jan 9, 2015

acme.ui patch works for me. Thanks nachanon et al for your work on fixing this issue.

@freed00m
Copy link

https://gist.github.com/nachanon/458ea39d53518d63f87c helped me in linux mint 17.1, thanks you :) @nachanon

@prankurgit
Copy link

Nachanon .. thanks man .. the patch works out of the box .. awesum stuff 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests