Unity blocks other programs from binding globally to Super+* (* = any key)

Bug #950160 reported by Hanine HAMZIOUI on 2012-03-08
274
This bug affects 53 people
Affects Status Importance Assigned to Milestone
Compiz
High
Brandon Schaefer
0.9.8
High
Brandon Schaefer
Compiz Core
High
Unassigned
OEM Priority Project
High
James M. Leddy
Precise
High
James M. Leddy
Unity
Fix Released
High
Brandon Schaefer
5.0
Triaged
Undecided
Unassigned
6.0
In Progress
High
Brandon Schaefer
gnome-settings-daemon
Fix Released
Medium
compiz (Ubuntu)
High
Brandon Schaefer
Precise
Undecided
Unassigned
Quantal
Undecided
Unassigned
gnome-settings-daemon (Ubuntu)
High
Unassigned
Precise
High
Unassigned
Quantal
High
Unassigned
unity (Ubuntu)
Undecided
Brandon Schaefer
Precise
Undecided
Unassigned
Quantal
Undecided
Brandon Schaefer

Bug Description

WORKAROUND 1:
Run CCSM and under "Ubuntu Unity Plugin" change the key binding for "Key to show the launcher" to something else (e.g. Super+U). Then log out and in again. As long as no compiz plugin is bound to the single Super key any more, compiz will no longer block other apps from binding to Super+other_keys.

WORKAROUND 2:
1. Write a script or figure out the command to do the action you want.
2. Run ccsm.
3. Enable the "Commands" plugin
4. In the Commands settings, fill in the command line you want and bind it to key Super+P.
Now Unity will run your specified command on Super+P, but still handle the Super key as usual.

[Precise SRU Justification]

[Impact] Any shortcut with Super, Hyper, Meta virtual modifiers does not work

[Test Case] Attach an external monitor to the laptop, press Super+P, it should do the video switch as this function is implemented in gnome-settings-daemon. A patch in comment #12 is now accepted upstream and a test package with that patch is available in comment #14. From the test result, the patch at least fixes Unity-2D.

[Regression Potential] The patch is accepted upstream and is also cherry-picked in the gnome-3-4 branch of g-s-d git tree. g-s-d version in Precise is 3.4.2. So the risk of regression should be rather low.

[Other] I prepare a debdiff in comment #31 for convenience. I hope the patch can be in both Quantal and Precise.

ORIGINAL DESCRIPTION:
Using : 12.04 Beta 1, updated. and Unity.

In 11.10 clicking:

- the function key (Fn) + (F1) allowed to switch between the laptop screen and the external monitor.

After upgrading to 12.04 this no more works and instead I get an unexpected behavior: see the video.

https://www.youtube.com/watch?v=-vEnrV5TwXo

System: Dell XPS 15 L502X

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ubuntu-sso-client 2.99.90-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-18.28-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
ApportVersion: 1.94.1-0ubuntu1
Architecture: amd64
Date: Thu Mar 8 19:18:42 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: ubuntu-sso-client
UpgradeStatus: Upgraded to precise on 2012-03-02 (6 days ago)

Related branches

lp:~brandontschaefer/compiz/disable-tap-detection
Daniel van Vugt: Approve on 2012-10-03
jenkins (community): Needs Fixing (continuous-integration) on 2012-10-02
lp:~brandontschaefer/unity/disable-tap-for-super
Rejected for merging into lp:unity
Daniel van Vugt: Approve on 2012-10-03
lp:~brandontschaefer/unity/disable-super-tap-detection
Stephen M. Webb: Approve on 2012-10-03
lp:~brandontschaefer/compiz/fix-950160-6.0
On hold for merging into lp:compiz/0.9.8
Compiz Maintainers: Pending requested 2012-11-05
lp:~brandontschaefer/unity/fix-950160-6.0
On hold for merging into lp:unity/6.0
Unity Team: Pending requested 2012-11-05
Hanine HAMZIOUI (hanynowsky) wrote :
Jorge Castro (jorge) on 2012-03-08
no longer affects: ubuntu-sso-client (Ubuntu)
Rick McBride (rmcbride) on 2012-04-06
affects: ubuntu-sso-client → unity
Rocko (rockorequin) wrote :

Yes, pressing FN-F1 just shows the unity launcher for me too. (Although I never tried it on 11.10, so I don't know what it used to do, the symbols on the keys certainly indicate that it should toggle laptop and external monitor modes).

Hanine HAMZIOUI (hanynowsky) wrote :

Thanks for confirming @Rocko
In 11.10 it definitely used to switch between the two monitors (laptop screen and external monitor). (I tried recently 11.10 on another L502X and the (Fn + F1) worked just fine.

In any case, in 12.04 ( Fn + F1 ) is the only BIOS key combination that does not work. Yet, it is a vital feature for multi monitoring and those doing presentations frequently.

I still do not know wether it's a kernel issue or just that the new Unity Hotkeys implementation conflicts with the Dell XPS 15 BIOS keyboard shortcuts.

Changed in unity:
status: New → Confirmed
Ramon (ram130-gmail) wrote :

Also having this issue since upgrading to 12.04. Any solution? it use to work fine with 11.10 on my HP laptop. My combination is usually FN + F4 though.

Edoiks (nowymarluk) wrote :

Aditionaly for DELL XPS l502x the special function keys, these above the keybord is incorrect (see the picture).

Edoiks (nowymarluk) wrote :

I mean that the keys behavior is incorrect. They are probably wrongly mapped.

Hanine HAMZIOUI (hanynowsky) wrote :

@Edoiks The ked Keys above the keyboard are indeed wrongly binded (One is empty and the two others are duplicated of other function keys). See : http://hanynowsky.wordpress.com/2012/04/07/dell-xps-15-l502x-ubuntu-linux/

But as they had the same behavior in 11.10, I thought about filing a new bug later. If you want you can file a separate bug.

Anthony Wong (anthonywong) wrote :

This was fixed in gnome-settings-daemon according to bug 539477, perhaps a regression in there?

affects: unity → gnome-settings-daemon (Ubuntu)
Keng-Yu Lin (lexical) wrote :

It is likely that the key generates two key codes (Windows key + P) and the windows key triggers the Unity launcher.

Personally I found that Super+P key combination for switching the video output no longer works in 12.04.

It will be very appreciated if anyone can review the attached patch, and it fixes for me.

A g-s-d package with the patch is uploaded to https://launchpad.net/~lexical/+archive/gsd for testing too.

Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → High
tags: added: blocks-hwcert-enablement
Changed in oem-priority:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Anthony Wong (anthonywong)

The attachment "mod4_modifier_videoswitch.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in gnome-settings-daemon:
importance: Unknown → Medium
status: Unknown → New

Further investigating this issue could occur in
  gtk+3.0.4.1/gdk/x11/gdkkeys-x11.c : gdk_x11_keymap_map_virtual_modifiers()

       *state |= 1 << i;
        without unsettling the original state value.

The attached patch is confirmed to make the super+P key works.

Changed in gtk+3.0 (Ubuntu):
status: New → Triaged
importance: Undecided → High
Keng-Yu Lin (lexical) on 2012-05-21
Changed in gtk+3.0 (Ubuntu):
assignee: nobody → Keng-Yu Lin (lexical)
status: Triaged → In Progress
description: updated
description: updated
Keng-Yu Lin (lexical) wrote :

I formed another patch and had it in the upstream bug for review.

Changed in gnome-settings-daemon (Ubuntu):
assignee: nobody → Keng-Yu Lin (lexical)
status: Confirmed → In Progress
Keng-Yu Lin (lexical) on 2012-05-23
Changed in gtk+3.0 (Ubuntu):
status: In Progress → Invalid
Keng-Yu Lin (lexical) wrote :

The patch in comment 12 is accepted and waiting for committing (https://bugzilla.gnome.org/review?bug=676300&attachment=214634).

Keng-Yu Lin (lexical) wrote :

A gnome-settings-daemon package with the patch in the comment 13 is available at the PPA (https://launchpad.net/~lexical/+archive/gsd/) for testing.

Hanine HAMZIOUI (hanynowsky) wrote :

Just installed (gnome-settings-daemon_3.4.1-0ubuntu1.1kengyu2_amd64.deb) and tested but in vain.
Still the same behavior. Neither ( Super + P) nor ( Fn + F2) work.
--------------------------------
hanynowsky@L502X:~$ dpkg -s gnome-settings-daemon
Package: gnome-settings-daemon
Status: install ok installed
Priority: optional
Section: gnome
Installed-Size: 6279
Maintainer: Ubuntu Desktop Team <email address hidden>
Architecture: amd64
Version: 3.4.1-0ubuntu1.1kengyu2
Depends: gconf-service, libappindicator3-1 (>= 0.4.90), libc6 (>= 2.14), libcairo2 (>= 1.10.0), libcanberra-gtk3-0 (>= 0.25), libcanberra0 (>= 0.2), libcolord1 (>= 0.1.12), libcups2 (>= 1.4.0), libdbus-glib-1-2 (>= 0.88), libfontconfig1 (>= 2.8.0), libgconf-2-4 (>= 2.31.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.31.8), libgnome-desktop-3-2 (>= 3.3.4), libgnomekbd7 (>= 2.91.90), libgtk-3-0 (>= 3.3.4), libgudev-1.0-0 (>= 147), liblcms2-2 (>= 2.2+git20110628-2), libnotify4 (>= 0.7.3), libnspr4 (>= 1.8.0.10), libnss3 (>= 3.12.0~1.9b1), libpolkit-gobject-1-0 (>= 0.99), libpulse-mainloop-glib0 (>= 1:0.99.1), libpulse0 (>= 1:0.99.1), libupower-glib1 (>= 0.9.9), libwacom2 (>= 0.3), libx11-6, libxfixes3 (>= 1:4.0.1), libxi6 (>= 2:1.2.99.4), libxklavier16 (>= 5.0), libxtst6, dconf-gsettings-backend | gsettings-backend, gsettings-desktop-schemas (>= 3.3.90-0ubuntu2), nautilus-data (>= 2.91.3-1)
Recommends: pulseaudio
Suggests: x11-xserver-utils, gnome-screensaver, metacity | x-window-manager
Breaks: banshee (<< 0.13.2+dfsg-7), gnome-color-manager (<< 3.0), gnome-control-center (<< 1:2.21.5), gnome-screensaver (<< 2.28.0), gnome-session (<< 2.24), rhythmbox (<< 0.11.5), totem (<< 2.22.0), unity-greeter (<< 0.2.1-0ubuntu1)
Conffiles:
 /etc/xdg/autostart/gnome-settings-daemon.desktop d80fe6e07c196b0b069fc6185d3e3a29
 /etc/xdg/autostart/gnome-fallback-mount-helper.desktop 58e84e1f8fd68806037a2f70265af2f9
 /etc/dbus-1/system.d/org.gnome.SettingsDaemon.DateTimeMechanism.conf 0c753d296e5fe10239b210c97c1f20e7
Description: daemon handling the GNOME session settings
 This package contains the daemon which is responsible for setting the
 various parameters of a GNOME session and the applications that run
 under it. It handles the following kinds of settings:
 .
  * Keyboard: layout, accessibility options, shortcuts, media keys
  * Clipboard management
  * Theming: background, icons, GTK+ applications
  * Cleanup of unused files
  * Mouse: cursors, speed, accessibility options
  * Startup of other daemons: screensaver, sound daemon
  * Typing break
 .
 It also sets various application settings through X resources and
 freedesktop.org XSETTINGS.
Original-Maintainer: Debian GNOME Maintainers <email address hidden>

Keng-Yu Lin (lexical) wrote :

@hanynowsky
  You will have to restart gnome-settings-daemon to make it work. The simplest way is to log out and log in again.

Hanine HAMZIOUI (hanynowsky) wrote :

@Keng-Yu Lin
Well, That's what I did, I rebooted before testing. But the problem remains.

I am going to give it another shot again.
Thanks for your appreciated feedback.

Tammy Yang (wanchingy) wrote :

Test g-s-d 3.4.1-0ubuntu1.1kengyu2 in https://launchpad.net/~lexical/+archive/gsd/ PPA on a HP model. Fn+F4 is expected to switch between monitors and it didn't work. Fn+F4 works after installing g-s-d 3.4.1-0ubuntu1.1kengyu2 with the patch Kent-Yu provided.

On my Dell Precision M4400 the monitor switch key is Fn+F8. I tried the new g-s-d 3.4.1-0ubuntu1.1kengyu2 from the ppa provided, but no luck. My symptoms are exactly the ones described in https://bugs.launchpad.net/bugs/539477.

Hanine HAMZIOUI (hanynowsky) wrote :

I retried again with the patch, it does not work on the Dell XPS 15 as specified above.
Ubuntu 11.10 works just fine.

Hanine HAMZIOUI (hanynowsky) wrote :

Output of (Fn+F1) using xev command :

FocusOut event, serial 43, synthetic NO, window 0x5600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 43, synthetic NO, window 0x5600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 43, synthetic NO, window 0x0,
    keys: 4294967222 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0
           32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

KeyPress event, serial 43, synthetic NO, window 0x5600001,
    root 0xb6, subw 0x0, time 47593338, (-564,599), root:(2124,811),
    state 0x50, keycode 33 (keysym 0x70, p), same_screen YES,
    XLookupString gives 1 bytes: (70) "p"
    XmbLookupString gives 1 bytes: (70) "p"
    XFilterEvent returns: False

KeyRelease event, serial 43, synthetic NO, window 0x5600001,
    root 0xb6, subw 0x0, time 47593493, (-564,599), root:(2124,811),
    state 0x50, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 43, synthetic NO, window 0x5600001,
    root 0xb6, subw 0x0, time 47593578, (-564,599), root:(2124,811),
    state 0x10, keycode 33 (keysym 0x70, p), same_screen YES,
    XLookupString gives 1 bytes: (70) "p"
    XFilterEvent returns: False

Keng-Yu Lin (lexical) wrote :

After a few rounds of testing, I think there is different result to run g-s-d with and without the "--debug" argument.

This is what I do:
  kill -9 `pgrep "gnome-settings"`; gnome-settings-daemon --debug

And then press the video switch hotkey or super+p and observe if the xrandr-plugin is called. There will be log like:

(gnome-settings-daemon:21343): xrandr-plugin-DEBUG: applying
=== Applying Configuration Configuration ===
  Clone: false
  Output: (null) attached to VGA1
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
  Output: BenQ 22" attached to HDMI1
     status: on
     width: 1920
     height: 1080
     rate: 60
     primary: true
     position: 0 0
  Output: (null) attached to DP1
     status: off
     width: -1
     height: -1
     rate: -1
     primary: false
     position: -1 -1
(gnome-settings-daemon:21343): xrandr-plugin-DEBUG: done handling fn-f7

However when testing without killing the g-s-d process first and without the --debug argument. The video switch does not work.

This could be a race of grabbing the key or some timing issue as it seems.

Keng-Yu Lin (lexical) wrote :

with the g-s-d package in my PPA installed and log in Unity-2D, the super+p works well as it makes the video switch.

So this could be another bug in Unity causing this.

Changed in gnome-settings-daemon (Ubuntu):
status: In Progress → Triaged
Omer Akram (om26er) wrote :

So the fix works for Unity2D session and not for Unity(3D). probably compiz is doing something here.

no longer affects: gtk+3.0 (Ubuntu)
affects: unity (Ubuntu) → unity
Hanine HAMZIOUI (hanynowsky) wrote :

Retried again.

The debugging command : kill -9 `pgrep "gnome-settings"`; gnome-settings-daemon --debug
made the patch work for Unity 3D temporarily. I had a similar output as in comment #22 (xrandr Identified monitors...etc) and the monitor switch also worked.
After logout/login, the patch is no more effective for Unity 3D. I also noticed that there was a second instance of compiz running with a huge memory consumption (if the debugging command is triggered).

Case 2 : The patch work fine in Unity 2D. (Fn+F1) and (Super + P) do work fine.

Changed in oem-priority:
importance: High → Critical

This is a regression of bug 704231. However Unity in its current form needs to take over Super+everything in order to accurately detect Super key taps. So unless we change the Unity dash to use some other key than Super, this bug can't be fixed right now.

[https://bugs.launchpad.net/ubuntu/+source/unity/+bug/704231/comments/47]

summary: - Keyboard function key to switch between monitors no more works
+ Unity blocks other programs from receiving <super> key-press events.
Changed in unity:
status: New → Confirmed
Changed in compiz (Ubuntu):
status: New → Confirmed
Anthony Wong (anthonywong) wrote :

Daniel, I understand why Unity is doing that, but that leads to a serious implication that on the many laptops which already have the video switch hotkey sends super+p, the hotkey now becomes non-functional.

Daniel van Vugt (vanvugt) wrote :

I would love to see a fix for this bug too. However making one that still gives Unity complete control over the Super key and doesn't accidentally open the dash on fast Super+other_key taps, does not presently appear to be possible. But I'd like for someone to prove me wrong...

Workaround: Run CCSM and under "Ubuntu Unity Plugin" change the key binding for "Key to show the launcher" to something else (e.g. Super+U). Then log out and in again. As long as no compiz plugin is bound to the single Super key any more, compiz will no longer block other apps from binding to Super+other_keys.

Daniel van Vugt (vanvugt) wrote :

Here's another (better) workaround:

1. Write a script or figure out the command to do what you want the action to be.
2. Run ccsm.
3. Enable the "Commands" plugin
4. In the Commands settings, fill in the command line you want and bind it to key Super+P.

Now Unity will run your specified command on Super+P, but still handle the Super key as usual.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
summary: - Unity blocks other programs from receiving <super> key-press events.
+ Unity blocks other programs from binding globally to Super+* or Alt+* (*
+ = any key)
Changed in gnome-settings-daemon:
status: New → Fix Released
Keng-Yu Lin (lexical) on 2012-06-13
Changed in gnome-settings-daemon (Ubuntu):
status: Triaged → In Progress

For the g-s-d part, the patch has arrived in the upstream git. So I would like it have it in Ubuntu too. (At least it fixes Ubuntu-2d).

debdiff attached, I will need sponsoring too.

description: updated
Anthony Wong (anthonywong) wrote :

Hi Daniel,

Your workaround may not work for the super+P (video out switch event), because it is handled by gnome-settings-daemon. (of course technically it can be done, but that means we need to write a new program to do that)

And I want to know what has changed in 12.04 Unity with regard to the Super key, because the "Super+P" key sequence, which is sent by the video out hotkeys, has been working fine in 11.10 and before.

Thanks,
Anthony

Daniel van Vugt (vanvugt) wrote :

Anthony, "what has changed" is described in comment #26.

Keng-Yu Lin (lexical) on 2012-06-19
description: updated
description: updated
Rex Tsai (chihchun) wrote :

Confirmed lexical's patch also works for Unity 3D in Precise (12.04).

tags: added: regression-release uds-q-mgr-tracking
tags: added: rls-mgr-q-tracking
removed: uds-q-mgr-tracking
piotrekkr (piotrekkr) wrote :

I would test patch from http://launchpad.net/~lexical/+archive/gsd/ but I can't install deb because I apparently have newer version instaled few months ago gnome-settings-daemon 3.4.2-0ubuntu0.2 :/ Will it work if I change version number in deb filename?

tags: added: rls-q-incomming
removed: rls-mgr-q-tracking
Colin Watson (cjwatson) on 2012-06-25
tags: added: rls-q-incoming
removed: rls-q-incomming

Fix Committed for Quantal: the patch is applied on the packaging branch lp:~ubuntu-desktop/gnome-settings-daemon/ubuntu; pending upload once compiz lands (since what is in the branch also changes gconf/gsettings behavior and affects compiz)

Changed in compiz (Ubuntu Precise):
status: New → Confirmed
Changed in gnome-settings-daemon (Ubuntu Precise):
status: New → In Progress
importance: Undecided → High
Changed in unity (Ubuntu Precise):
status: New → Confirmed
Changed in gnome-settings-daemon (Ubuntu Quantal):
assignee: Keng-Yu Lin (lexical) → nobody
status: In Progress → Fix Committed

Uploaded the fix to precise-proposed, waiting for review by the SRU team.

Rex Tsai (chihchun) wrote :

I could not find the fix in precise-proposed[1], could you point out where I can find the fixed deb for precise?

[1] https://launchpad.net/ubuntu/+source/gnome-settings-daemon

Hello hanynowsky, or anyone else affected,

Accepted into precise-proposed. The package will build now and be available in a fewhours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in compiz (Ubuntu Precise):
status: Confirmed → Fix Committed
Changed in gnome-settings-daemon (Ubuntu Precise):
status: In Progress → Fix Committed
Changed in unity (Ubuntu Precise):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in compiz (Ubuntu Precise):
status: Fix Committed → Confirmed
Changed in unity (Ubuntu Precise):
status: Fix Committed → Confirmed
tags: added: verification-failed
removed: verification-needed
Rex Tsai (chihchun) on 2012-07-09
Changed in gnome-settings-daemon (Ubuntu Precise):
status: Fix Committed → Confirmed
Changed in gnome-settings-daemon (Ubuntu Precise):
status: Confirmed → Fix Committed
tags: removed: verification-failed
tags: added: verification-needed
tags: removed: rls-q-incoming
tags: added: verification-done
removed: verification-needed
Changed in gnome-settings-daemon (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in oem-priority:
status: Confirmed → Fix Released
Changed in gnome-settings-daemon (Ubuntu Quantal):
status: Fix Committed → Fix Released
Changed in oem-priority:
status: Fix Released → Triaged
22 comments hidden view all 102 comments

gnome-settings-daemon - 3.4.2-0ubuntu9 does not fix the Super+P issue on some machines.

Hao-Ran Liu (hzliu123) wrote :

Another factor of this bug is in compiz (bug 741869).

Changed in unity:
status: Confirmed → Triaged
Changed in compiz (Ubuntu Precise):
status: Confirmed → Triaged
Changed in compiz (Ubuntu Quantal):
status: Confirmed → Triaged
Changed in unity (Ubuntu Precise):
status: Confirmed → Triaged
Changed in unity (Ubuntu Quantal):
status: Confirmed → Triaged
James M. Leddy (jm-leddy) wrote :

Hi Hao-Ran,

How are these two bugs different, this and bug 7419869?

James M. Leddy (jm-leddy) wrote :

Time for a status update:

We know that there is a workaround that if you start g-s-d after compiz starts, you _can_ use super+p to switch the monitor. We're not sure if this is the way it was done in 11.10 and if that's why it works in 11.10 but not in 12.04. However, the easiest fix is probably to make sure that g-s-d is started after compiz in whatever application starts both.

For the oem-prio task, I am going to leave incomplete until I have an answer to comment #65 about how bug 7419869 is a duplicate.

Changed in oem-priority:
status: Triaged → Incomplete
Hao-Ran Liu (hzliu123) wrote :

@James,

Bug 950160 and bug 741869 are different.

Bug 950160 has affected 3 projects now. It is quite confusing to follow since many bugs in different components are involved. Keng-Yu's g-s-d patch only fixes the issue in Unity 2D and Gnome shell. It has nothing to do with Unity 3D. Unity3D/Compiz has a design issue which also contributes to this bug. They should not prevent g-s-d from receiving the Super key event.

Please note that workaround #2 as mentioned in the description of this bug does not work reliable on many machines.

bug 741869 targets Compiz. It is the main cause why Super+p does not work in Unity 3D. Comment #7 in bug 741869 points out a possible direction how to fix it.

James M. Leddy (jm-leddy) wrote :

Well, this bug is about unity (actually compiz) capturing the super key as well. I think one should be duped to the other, especially considering that the g-s-d portion of this bug is already closed.

tags: added: rls-q-incoming
James M. Leddy (jm-leddy) wrote :

We can probably use the gnome autostart delay to workaround this:

http://askubuntu.com/questions/25556/execute-script-after-desktop-loaded

James M. Leddy (jm-leddy) wrote :

I've solved this problem by removing this line from/etc/xdg/autostart/gnome-settings-daemon.desktop

X-GNOME-Autostart-Phase=Initialization

In my limited testing, I've seen no negative consequences. I'll run it for a few more days and let people know.

If anyone has a 11.10 installation, please paste the output of 'ps axf'. The most important bit is which started first, compiz or gnome-settings-daemon. It seames whichever starts later gets to grab the event.

Note this does not fix Super+* in the general case, but from testing g-s-d any application that starts later should have priority and be able to successfully grab the event.

Hao-Ran Liu (hzliu123) wrote :

Thank you, James!

I tested your workaround on some machines from different vendors, which used to have this super+p issue. I confirm that it can fix the problem.

The comment above is contrary to Daniel's comment in #55. James may be right that whichever starts later gets to grab the event.

I am not sure if there is any side effect to start gnome-settings-daemon in the "Application" phase, which seems to be a bit late. Since we only want to start g-s-d after compiz, which is started in "WindowManager" phase. timchen119 suggested to start it in the "Panel" phase, which is the next phase after "WindowManager" phase. So I also tested machines with that line changed to:

X-GNOME-Autostart-Phase=Panel

So far everything works fine.

---
For a list of GNOME session phase:
https://live.gnome.org/SessionManagement/GnomeSession

Omer Akram (om26er) wrote :

@OEM-priority: is this issue still happening?

James M. Leddy (jm-leddy) wrote :

Hi Omar,

Yes, the issue is still happening. I don't know the specifics of XkbStateNotify events, but it seems that whatever registers the key the latest gets priority. Thus, if g-s-d starts after compiz, it will get Super+p events, even though Unity (compiz) still gets the Super key when pressed in isolation. The fix to g-s-d didn't fix the underlying problem of Unity swallowing Super+p, just that if g-s-d gets the event it'll do the proper thing. Let me know if you have any more questions.

Changed in oem-priority:
assignee: Anthony Wong (anthonywong) → James M. Leddy (jm-leddy)
Omer Akram (om26er) on 2012-09-25
Changed in unity:
importance: Undecided → High
James M. Leddy (jm-leddy) wrote :

I just tested my old oneiric install. gnome-settings-daemon starts before compiz, yet oneiric is not affected by this issue, so the change must have happened somewhere else.

James M. Leddy (jm-leddy) wrote :

Okay, I just tested gnome-shell and unity in both oneiric and precise, This is what I have

      gnome-shell | unity(compiz)
=================================
11.10 Works | Works
12.04 Fails | Fails

In both cases where it works, a "p" is still echoed to the window that has focus. At least as far as the regression aspect of it goes, this seems to have nothing to do with unity. Though we could work-around it in unity using the aforementioned solutions. It's likely that a change made somewhere else in the stack is what causes the regression.

Daniel van Vugt (vanvugt) wrote :

James,

We know the problem first appeared in 12.04. It is caused by the key Super key tap detection that Unity requires and has used since 12.04. See comment #26, #28 and the rest :)

Daniel van Vugt (vanvugt) wrote :

We've come up with an entirely different idea that might fix this bug. Now investigating with Brandon.

Changed in unity:
assignee: nobody → Brandon Schaefer (brandontschaefer)
Changed in compiz:
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → Triaged
Changed in compiz:
assignee: Daniel van Vugt (vanvugt) → Brandon Schaefer (brandontschaefer)
Changed in oem-priority:
status: Incomplete → Triaged
Changed in compiz:
status: Triaged → In Progress
Changed in unity:
status: Triaged → In Progress
Daniel van Vugt (vanvugt) wrote :

Update:

Brandon's fix has been approved and is coming soon. Note however it only works for Super and not Alt.

summary: - Unity blocks other programs from binding globally to Super+* or Alt+* (*
- = any key)
+ Unity blocks other programs from binding globally to Super+* (* = any
+ key)
Daniel van Vugt (vanvugt) wrote :

Please note:

The fixes landing soon on trunk should not be backported to quantal before 12.10 is released. The risk of regression is at least medium. We should aim for Q-SRU-0 or later.

Changed in compiz:
milestone: none → 0.9.9.0
status: In Progress → Fix Committed
Changed in unity:
milestone: none → 7.0.0
James M. Leddy (jm-leddy) wrote :

Hi Daniel, this is great news. Thank you for the hard work in getting this resolved.

Daniel van Vugt (vanvugt) wrote :

Brandon,

Please don't unlink branches, even if they're superseded. The links provide a permanent paper trail for people trying to understand the history of a bug and its fixes. Particularly important for people who are trying to backport fixes later.

Changed in unity:
status: In Progress → Fix Committed
Timo Jyrinki (timo-jyrinki) wrote :

Pushing to SRU-1 at least regarding quantal, will need a lot of testing.

Changed in oem-priority:
status: Triaged → In Progress
Changed in compiz-core:
importance: Undecided → High
milestone: none → 0.9.7.10
status: New → Confirmed
Steve Magoun (smagoun) wrote :

I tested the following on a Dell XPS13 running 12.04 LTS. These packages did not fix the super-p key behavior:

compiz - 1:0.9.7.8-0ubuntu1.5~test2
gnome-settings-daemon 3.4.2-0ubuntu0.4
unity - 5.16.0-0ubuntu2~test1

The unity + compiz packages came from https://launchpad.net/~unity-team/+archive/ppa/+packages

To install the unity/compiz packages I used 'apt-add-repository ppa:unity-team/ppa' then apt-get update && apt-get install unity compiz.

After installing these packages and rebooting, I observed that the function key for monitor-switching (Fn-F1) did not cause the video output to switch. Instead the super key seems to be consumed by Unity and the 'p' key is passed to applications - resulting in a stray 'p' being typed into whatever terminal/text box/application has focus.

James M. Leddy (jm-leddy) wrote :

Hi Steve,

based on the milestone, I think you need at least unity versoin 5.18.0 to fix the problem.

Timo Jyrinki (timo-jyrinki) wrote :

James: 5.18.0 has not been released, but Steve was testing from a PPA that had a version of the supposed fix.

Changed in compiz-core:
milestone: 0.9.7.10 → 0.9.7.12
Stephen M. Webb (bregma) on 2012-11-25
Changed in unity (Ubuntu):
assignee: nobody → Brandon Schaefer (brandontschaefer)
status: Triaged → In Progress
Changed in unity (Ubuntu Quantal):
assignee: nobody → Brandon Schaefer (brandontschaefer)
status: Triaged → In Progress
Changed in compiz (Ubuntu):
assignee: nobody → Brandon Schaefer (brandontschaefer)
status: Triaged → In Progress
Changed in compiz (Ubuntu):
status: In Progress → Fix Committed
Changed in compiz:
importance: Undecided → High
Changed in compiz (Ubuntu):
importance: Undecided → High
Steve Magoun (smagoun) wrote :

There is a fix in testing here:
https://launchpad.net/~timo-jyrinki/+archive/quantal-compiz-unity-testing (ppa:timo-jyrinki/quantal-compiz-unity-testing).

My findings:

I tested the packages in the PPA on a Dell XPS13 with 12.04 and all of the latest updates from precise-updates. My findings:
1) The display switch hotkey now works; pressing it cycles through video modes as expected. The 'p' character is not emitted.
2) A side effect of the fix is that the dash opens when you press the display switch hotkey

I think the side effect needs to be fixed.

Some more information about the side effect:
* The display switch hotkey is Fn-F1
* If you press Fn-F1 and release both Fn and F1 at the same time, the dash opens
* If you press Fn-F1 and release F1 before releasing Fn, the the dash does not open
* If you press Fn-F1 and release Fn before releasing F1, the dash opens
* If you press Fn-F1 and do not release either key, the Unity keyboard shortcuts window opens

The packages I tested from the PPA were:
compiz 1:0.9.7.8+bzr3121-0ubuntu2~test1
unity 5.18.0-0ubuntu2~test1
and the corresponding versions of libunity-core-5.0-5, unity-common, unity-services, compiz-core, compiz-gnome, and compiz-plugins-default

Daniel van Vugt (vanvugt) wrote :

Steve,

That regression is what I feared. However the dash should only open if you have tapped Super very quickly. Maybe we need to reduce the timeout that Unity uses, since (in order to fix this bug) we can't use reliable tap detection from Compiz any more.

Steve Magoun (smagoun) wrote :

@Daniel:
The user never touches the super key in the scenarios we care most about; the user only presses the display switch hotkeys on the laptop. Maybe this is not relevant, and reducing the timeout in Unity will still help. It seems like an important detail though.

Note that in our testing in comment #86, the dash still opens if you hold the 'F1' for ~1 second - it does not have to be a quick tap.

Daniel van Vugt (vanvugt) wrote :

Steve,

Fn+F1 on Dells actually sends Super+P. However I don't know if some models send it as a quick Super+P tap or the virtual keys are held for the duration of Fn+F1. But the point is that "Fn+something" is not a real key. It maps either directly to some hardware feature or to some other real combo like Super+P. You may well get a quick tap of Super+P when Fn+F1 is pressed.

The two features we have for avoiding false taps are:
  1. Reliable tap detection in Compiz. This has to be turned off in order to fix this bug :(
  2. Key press timing in Unity. If Super is down too long then ignore it.
So #2 is all we have left.

rpgmaker (justmc) wrote :

I'm experiencing this issue on ubuntu 12.10 (it seems this bug carried on from 12.04) on a Dell Inspiron 14z. The fn+f1 combo doesn't bring the display switching dialogue and now that you guys mention it it seems to be sending the super+P combination. What is the recommended fix right now? Or is there another key combination that works for the switching display that I could use?

Daniel van Vugt (vanvugt) wrote :

The recommended workaround is "WORKAROUND 1" listed at the top of the bug.

Changed in compiz-core:
milestone: 0.9.7.12 → 0.9.7.14
Nicolay Doytchev (lightrush) wrote :

Is there any way to programatically invoke the dash from an application? If yes, where can I find information about it?

Paddy Landau (paddy-landau) wrote :

@Nicolay Doytchev: This is not a support forum. Please ask your question on either the Ubuntu Forums [1] or an Ask Ubuntu [2]. In fact, you may find a thread where someone else has already found the answer.

    [1] http://ubuntuforums.org/

    [2] http://askubuntu.com/

Nicolay Doytchev (lightrush) wrote :

@Paddy Landau: This is not a support question. I could try to write a program to workaround this issue as well as a related one tracked in another bug report. I could not find relevant information at those places prior to my posting, barring one saying this is not possible, dating in 2011. Having in mind the fast pace of development of this software package it is conceivable something has changed and clearly there are folks here who understand the Unity source and it's very likely they would know whether this is possible or not, or where the magic API page is.

Timo Jyrinki (timo-jyrinki) wrote :

Note the side effect bug #1091623 caused by the current fix in raring. SRU for quantal/precise depends on getting also that issue fixed.

Daniel van Vugt (vanvugt) wrote :

This is fix released in Compiz 0.9.9.0. But Launchpad is giving me strange errors and preventing me from marking it as such.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.9~daily13.03.08-0ubuntu1

---------------
compiz (1:0.9.9~daily13.03.08-0ubuntu1) raring; urgency=low

  [ Brandon Schaefer ]
  * [regression] Shortcut overlay does not hide when modifier key is
    pressed (LP: #1075207)
  * Unity blocks other programs from binding globally to Super+* (* =
    any key) (LP: #950160)

  [ Automatic PS uploader ]
  * Automatic snapshot from revision 3633
 -- Automatic PS uploader <email address hidden> Fri, 08 Mar 2013 10:34:21 +0000

Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
thinkpad (fellowsgarden) wrote :

Regarding WORKAROUND 1:

maybe I'm doing sth wrong, but I've disabled many settings in CCSM, Launcher's launched via a non-super shortcut; still, I can't get super to work in a custom keyboard shortcut.

What could I be doing wrong?

Changed in compiz:
status: Fix Committed → Fix Released
Stephen M. Webb (bregma) wrote :

Fix Released in Unity Unity 7.0.0 "R series".

Changed in unity:
status: Fix Committed → Fix Released
Q P (quanpt) wrote :

The WORKAROUND 1 doesn't work when using Unity 2D.
Seems like there is no way to disable Super shortcut on Dash in Unity 2D. However, as long as the combination is not used by Unity, I can assigned it to other command. Example: Super+C works for copy in Terminal, but Super+V not work, as it show Dash Search Video.

Changed in oem-priority:
importance: Critical → High
Steve Magoun (smagoun) wrote :

Dropping the oem-priority escalation; OEMs are shipping a workaround.

Changed in oem-priority:
status: In Progress → Won't Fix
Oibaf (oibaf) wrote :

Is this a duplicate of bug #741869?

Displaying first 40 and last 40 comments. View all 102 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.