Running unclutter without "-noevent" causes focus problems for Firefox and Thunderbird

Bug #1231588 reported by Cefn
52
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Won't Fix
Medium
unclutter (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have found in the last day or so that Firefox windows do not accept focus when they are clicked upon. The focus (and key and mouse events) are still sent to a different window even after it has been selected for the foreground by click or ALT+TAB,ALT+`.

Initially I experienced this on a dual-head display, but even when the window is moved from the external monitor to the built-in laptop monitor, events are routed to the wrong firefox window.

This issue has survived an apt-get upgrade and a reboot, and is still occurring.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: firefox 24.0+build1-0ubuntu1
ProcVersionSignature: Ubuntu 3.11.0-8.15-generic 3.11.1
Uname: Linux 3.11.0-8-generic i686
AddonCompatCheckDisabled: False
ApportVersion: 2.12.4-0ubuntu1
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: cefn 4062 F.... pulseaudio
BuildID: 20130917154333
Channel: Unavailable
Date: Thu Sep 26 18:07:55 2013
ForcedLayersAccel: False
IfupdownConfig:
 # interfaces(5) file used by ifup(8) and ifdown(8)
 auto lo
 iface lo inet loopback
InstallationDate: Installed on 2013-08-15 (42 days ago)
InstallationMedia: Ubuntu-GNOME 13.10 "Saucy Salamander" - Alpha i386 (20130626)
IpRoute:
 default via 192.168.1.1 dev wlan0 proto static
 192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.23 metric 9
MarkForUpload: True
Plugins:
 Shockwave Flash - /usr/lib/flashplugin-installer/libflashplayer.so
 Java(TM) Plug-in 10.40.2 - /usr/lib/jvm/java-7-oracle/jre/lib/i386/libnpjp2.so
 Gnome Shell Integration - /usr/lib/mozilla/plugins/libgnome-shell-browser-plugin.so (gnome-shell)
 Silverlight Plug-In - /usr/lib/pipelight/libpipelight.so (pipelight)
 iTunes Application Detector - /usr/lib/mozilla/plugins/librhythmbox-itms-detection-plugin.so (rhythmbox-mozilla)
PrefSources:
 prefs.js
 /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/<email address hidden>/defaults/preferences/001ubuntu-gnome-mods.js
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
Profiles: Profile0 (Default) - LastVersion=24.0/20130917154333 (In use)
PulseList:
 Error: command ['pacmd', 'list'] failed with exit code 1: Home directory not accessible: Permission denied
 No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 gnome-shell 3.8.4-0ubuntu5
 pipelight 0.1-4-0~ubuntu13.10.1
 rhythmbox-mozilla 2.99.1-0ubuntu1
RunningIncompatibleAddons: False
SourcePackage: firefox
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/23/2008
dmi.bios.vendor: TOSHIBA
dmi.bios.version: Version 1.50
dmi.board.asset.tag: 0000000000
dmi.board.name: Portable PC
dmi.board.vendor: TOSHIBA
dmi.board.version: Version A0
dmi.chassis.asset.tag: 0000000000
dmi.chassis.type: 10
dmi.chassis.vendor: TOSHIBA
dmi.chassis.version: Version 1.0
dmi.modalias: dmi:bvnTOSHIBA:bvrVersion1.50:bd10/23/2008:svnTOSHIBA:pnPORTEGER600:pvrPPR61E-00Q00CEN:rvnTOSHIBA:rnPortablePC:rvrVersionA0:cvnTOSHIBA:ct10:cvrVersion1.0:
dmi.product.name: PORTEGE R600
dmi.product.version: PPR61E-00Q00CEN
dmi.sys.vendor: TOSHIBA

Revision history for this message
Cefn (6-launchpad-net-cefn-com) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
Carlos Eduardo Moreira dos Santos (cemsbr) wrote :

If I use a new firefox profile, it works as expected. The old profile still has focus issues.

Revision history for this message
Mikko Rantalainen (mira) wrote :

I have similar issues with both Firefox 25.0.1 and Thunderbird 24.1.1. I have multiple extensions installed on both, but neither has a single same extension (so either this may be caused by multiple different extensions or something else is going on).

Additional info:

- I have been hit with this problem every now and then since around Firefox 10 and Thunderbird 3. I think this is a problem in Ubuntu XUL core because the problem is visible with both Firefox and Thunderbird.

- I have been hit with this problem using at least Gnome 2.x, Unity and Cinnamon desktop environments so I'd guess this is not related to the window manager. I haven't used KDE long enough to verify if this problem is visible in that environment, too.

- Since I have reduced the system latency(*) I've hit this problem more often; I guess it's some kind of race condition between some paraller threads or processes doing something. The system is running on i7-3770k with HT enabled (without overclocking).

(*)
mira@desktop:/proc/sys/kernel# grep . sched_*
...
sched_latency_ns:200000
sched_migration_cost_ns:500000
sched_min_granularity_ns:100000
sched_nr_migrate:3
sched_wakeup_granularity_ns:50000

Revision history for this message
Mikko Rantalainen (mira) wrote :

I guess this may be caused by package "unclutter" (which I do have installed):

https://forum.kde.org/viewtopic.php?f=111&t=117704&start=15
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1234470

I will try running it with '-noevents' and if that does not fix the issue, I'll try living without it and seeing if that fixes the problem.

Revision history for this message
JanMalte (janmalte) wrote :

Are there any news about this bug?

Revision history for this message
Carlos Eduardo Moreira dos Santos (cemsbr) wrote :

After a few days, my new profile had the same problem. As browsing is an essential task, I had to switch to gnome3 and I haven't had this issue for months. Probably, the problem is related to unity.

Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

Carlos, as per Mikko's comment's links,, it's not just Unity, but also in Kubuntu/KDE. Did you try killing unclutter, or running it with -noeventst?

Revision history for this message
Carlos Eduardo Moreira dos Santos (cemsbr) wrote :

No. I may take some time before trying it, because I don't want to lose all my workspaces in the next days.

Mathew Hodson (mhodson)
summary: - Firefox windows don't accept focus
+ Running unclutter without "-noevent" causes focus problems for Firefox
+ and Thunderbird
affects: firefox (Ubuntu) → unclutter (Ubuntu)
Changed in firefox:
importance: Unknown → Medium
status: Unknown → Won't Fix
Revision history for this message
Renardo (renardo) wrote :

I am experiencing this problem with both Firefox and Thunderbird (and have lost many e-mail messages because my typing suddenly went to the index window and was interpreted there as a "delete").

Contrary to the original poster, I have the problem only with keyboard events, never with mouse events. Klicking, dragging, marking all works fine on the foreground window. Key strokes suddenly start going to the background window. Switching the foreground between windows does not help. Closing and restarting the whole application usually helps.

My workaround in Thunderbird is to create an empty folder and switch the index window to it before typing a message, so the stray keystrokes cannot do much damage. In Firefox I use tabs instead of windows.

Revision history for this message
Travisgevans (travisgevans) wrote :

I was being driven up the wall with this problem for a long time (even in a non-Ubuntu distro) and couldn't for the life of me figure out what was going on until someone mentioned Unclutter! (I was blaming the window manager, GUI toolkits, etc.--I never would have suspected unclutter.) It does indeed seem to cause problems.

I sort of worry that -noevent could potentially cause other problems, though. Apparently unclutter uses a lot of funky hacks to do its work which causes weird things to happen in general. There's a rewrite of it using the x11-xfixes extension which looks like a much cleaner solution: https://github.com/Airblader/unclutter-xfixes

I found it fairly easy to build, and so far I haven't seen any problems or weird behavior while using it. It would be nice if it could be considered for inclusion in the Ubuntu repos.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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