major window focus problem in X

Bug #229123 reported by Henrik S.
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Expired
Low
Unassigned
Declined for Intrepid by Timo Aaltonen
Declined for Jaunty by Timo Aaltonen

Bug Description

Release: Hardy 8.04
Package: Xorg or GDM, latest official versions (?)

Well. I am plagued by a rather strange bug. For me it's always reproducible but from the lack of bugreports here I guess it's something rare.

The bug occurs in all X applications Gnome or KDE, it doesn't matter. Sometimes for instance when I use Firefox I am unable to click on a hyperlink, or alt+tab to another window. alt+f or alt+f1 still works and enables the menu. opening up a menu temporarily fixes the focus problems. as do right-clicking some times. Whenever I am unable to click buttons or other widgets in an application, it seems I am able to use the tab button to move the focus to the widget I am trying to access. These problems occurs in hardy.

I have tried to google for answers but so far that have been unsuccessful. Some webpage suggested there was problems with gnome+subwindows, but my bug occurs even if I use KDE. I have tried uninstalling compiz, with no luck and I have deleted my .gnome2 and .gconf directories to get rid of any gnome-display-properties configuration files. So far no luck. My best guess would be that this bug is related to the window manager somehow. My last try was to nuke all hidden files in my home folder, it did not work. :(

I am using properitary nvidia drivers (i checked and found them not to be the source of the problem) and have a samsung 225mw LCD 22" widescreen.

Revision history for this message
Dan Bishop (danbishop) wrote :

I also have this issue! I have no idea what's causing it, I've tried several things, but nothing that you haven't already and none of them have fixed it...

Revision history for this message
Henrik S. (henrik-hw0) wrote :

hmm. i tinkered around some more and i haven't seen the bug in a while (a day). with my luck i'm sure i'll trigger it again sooner or later. :/

does the following affect it?
- system->preferences->appearance->visual effects. select "none".
- in synaptic do a _complete_ remove of all compiz related packages. (regular remove might not work)
- reinstall compiz packages
- system->preferences->appearance->visual effects. select "normal".

this ought to delete the compiz configuration and switch from metacity to compiz window manager. still this doesn't explain why kde should misbehave unless it too uses compiz.

Revision history for this message
Henrik S. (henrik-hw0) wrote :

FYI the bug did return. Switching between compiz and metacity window manager did not help.

Revision history for this message
Henrik S. (henrik-hw0) wrote :

Bug possibly related to bugs #124146, #158564 and #218684.

Revision history for this message
Henrik S. (henrik-hw0) wrote :

Looks like I was able to significantly narrow down the problem.

I have both an USB keyboard and an USB mouse. Keyboard was mostly working as previously stated, but mouse usage was a problem.
Since my keyboard is dual USB/PS2 and i have an USB to PS2 adapter, I proceeded to connect both my keyboard and mouse via the PS2 connectors.
A quick reboot later and I have not seen any more of those focus problems that were quite persistent.

So, that means this problem is related to X and USB HID-devices.

Revision history for this message
Henrik S. (henrik-hw0) wrote :

Status update: The bug occurs even when not using USB input devices. But I have to let my computer be on for an extended period of time (many hours). In contrast using USB HID-devices seems to effectively trigger this bug.

Revision history for this message
Bryce Harrington (bryce) wrote :

Please attach your /var/log/Xorg.0.log.
This sort of sounds familiar, I wonder if it is a dupe of another known issue.

Changed in xorg:
status: New → Incomplete
Revision history for this message
Henrik S. (henrik-hw0) wrote :

Attached.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks. Note that you don't need to gzip them (it makes it a bit harder to view the logs).

Changed in xorg:
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Henrik S. (henrik-hw0) wrote :

Status update: This bug now appears to be fixed by one of the ubuntu hardy updates. Many thanks. :)

Revision history for this message
vinyll (agnanov) wrote :

Hello,

I'm also on hardy with last stable updates, and I do meet that trouble for a couple of days now.
I'm using metacity though I tried to get compiz working (but ATI with wide dual screen is a troubleshooter).

The problem was first met after hitting gconftool-2 -s -t string /apps/compiz/plugins/scale/allscreens/options/initiate_edge Enabled
Inserting "Disabled" instead would not resolve the issue.

I had played around switching system -> preferences -> windows, and selecting "focus when over a window" and then unchecking it, that had solved until next reboot.

Now still have that bug, compiz is completely removed, and nothing solving in the updates...

Any idea ?

Thanks

Revision history for this message
Henrik S. (henrik-hw0) wrote :

yeah seems it wasn't fixed.
i tried plugging in a USB mouse and the focus problems returned.
replacing it with an PS2 mouse and stuff works again.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Sounds more like a hardware issue if the mouse buttons don't always work. Try with another mouse.

Changed in xorg:
status: Triaged → Incomplete
Changed in xorg-server:
status: New → Invalid
Revision history for this message
EMenifee (elijahcmenifee) wrote :

I am also having this problem on Ubuntu Hardy 8.04.1, however it is so far seems to only effect my x86_64 machine. My other machine only running in 32 bit mode with same window settings and packages has never presented this problem.

The exact details are that to get any window to focus(except firefox) I had to click directly on the window titlebar. For some reason when all the normal windows (terminals,gnome and kde apps, system configuration windows) were requiring a direct click to the titlebar to gain focus, my firefox windows continued to receive focus on any click withen the firefox client window area like one would expect with 'click to focus' mode.

At one point I noticed while working under kde/kwin with a couple of terminals open that when I attempted to double click an unfocused terminal to select for a paste that it was selecting the same general location in my currently focused window instead of directing the mouse click to the window the mouse was over, maybe this is why the window never got its focus request...

I tried several desktop environments to fix this with no avail, (although 'click to focus' magically started working on its own again, in the MIDDLE of an Xsession(was not attempting any configuration changes or fixes at the time...) while I was working on other things, surprised me to have it working after 3 days without it working with multiple reboots, package resets, and configuration changes)

This problem presented itself (and would not go away) under different desktop systems. I tried the following:

Gnome/metacity (my default environment)
Gnome/compiz
Gnome/icewm
KDE-4/kwin-4 (from kubuntu-kde4-desktop metapackage)
KDE/kwin (from kubuntu-dekstop metapackage)
KDE/compiz
KDE/metacity
KDE/icewm
KDE/blackbox

Which leads me to believe it is an issue at the xorg event or input level and not a configuration issue with a given window manager.

I also did a complete uninstall of compiz packages which did not solve the problem.

I also tried a forced --resinstall of all xorg and gnome packages which did nothing to fix the problem, along with removing all my .* files and directories related to the window managers.

The other focus modes, sloppy and mouse over, appear to work. I also tried setting the focus prevention between off,low,high,really high with no discernible effect when in 'Click to Focus' mode. Something else I noticed in the compiz ccsm manager that the 'Click To Focus' option under general options has blue text, and did not retain changes made, but stays with the default 'Click To Focus' enabled.

I am attaching a file that contains my .xsession-errors and my package list

In addition I have the following hardware (in twinview mode)
AMD Phenom(tm) 8650 Triple-Core Processor
Asus M3N-HD/HDMI motherboard
NVidia GeForce 8800GTS 512 (using driver version 169.12 from the nvidia-glx-new package)
Along with a Belkin USB KVM on one monitor to my 32 bit system with the mouse and keyboard being a microsoft wireless plugged into the belkin.

Revision history for this message
vinyll (agnanov) wrote :

What solves the problem when I rarely still have it is to unplug then plug again my USB mouse...
Strange but really solves !

Revision history for this message
Bryce Harrington (bryce) wrote :

I've a sneaking suspicion this is a kernel issue rather than X itself. Not sure exactly how to isolate it, however here are some things to look at:

* dmesg
* /var/log/messages
* lsusb
* lshal

Any errors or changes in those files before/after one of these focus losses would help pin down what's going on.

Revision history for this message
Henrik S. (henrik-hw0) wrote :

I don't know if this is relevant, but here's my Xorg.log on Intrepid (where the bug still randomly appears).

Note that there are two mouse event interfaces reported, and an error message for the first.

(I only have one mouse connected to PS2 here)

Oh, and I have also eliminated (I believe) scim as a problem-source.

Bryce Harrington (bryce)
Changed in nvidia-graphics-drivers-173 (Ubuntu):
status: Incomplete → Confirmed
Bryce Harrington (bryce)
tags: added: hardy
Bryce Harrington (bryce)
tags: added: intrepid
Revision history for this message
Frank Groeneveld (frankgroeneveld) wrote :

I also have this problem and it persists in Lucid. However, I don't have any mouse or other hardware problems. I'm using a usb mouse and keyboard. Furthermore, I also use the propietary nvidia graphics drivers.

Revision history for this message
Markus Kitsinger (swooshycueb) wrote :

I'm having this problem as well. Sometimes it keeps me from typing in fields even if the window is active or not. Here's some info about my system:

Ubuntu 10.10 x64
2-monitor setup
ATI graphics chipset
PS/2 Keyboard
USB Cordless mouse

I launched gedit in a terminal, made it the active window, then tried to click on an inactive window. It gave me three errors each time I did this:

(gedit:2050): Gdk-CRITICAL **: IA__gdk_window_get_events: assertion `GDK_IS_WINDOW (window)' failed

(gedit:2050): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed

(gedit:2050): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

Revision history for this message
Markus Kitsinger (swooshycueb) wrote :

Here's my .xsession-errors

bugbot (bugbot)
tags: added: kubuntu
Revision history for this message
ZenecadE (eye-is-are) wrote :

Any joy on this issue? It happens on my system too. Got natty. System is a Gigabyte W565M notebook. Sometimes I find Metacity going awkward and all borders disappear. Typing metacity --restart in terminal just forces me to restart sooner. It's most noticable when I'm using skype and outlook for email in the background. Sometimes, I want to chat to a collegue only to find nothing I type goes to skype window. Even after clicking multiple times. Oddly, left click still works most of the time but doesn't fix anything. When trying to return focus to my outlook window though, skype stays on top. Even if focus does in fact change to outlook. I know this because I can open menus and click on toolbar buttons successfully. Crazy I tell you. Me too...... after trying to figure this puppy out.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Revision history for this message
Tyler Aviss (alias-openid) wrote :

Ditto here. Hardware:
00:00.0 Host bridge: nVidia Corporation MCP79 Host Bridge (rev b1)
00:00.1 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
00:03.0 ISA bridge: nVidia Corporation MCP79 LPC Bridge (rev b2)
00:03.1 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
00:03.2 SMBus: nVidia Corporation MCP79 SMBus (rev b1)
00:03.3 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
00:03.5 Co-processor: nVidia Corporation MCP79 Co-processor (rev b1)
00:04.0 USB Controller: nVidia Corporation MCP79 OHCI USB 1.1 Controller (rev b1)
00:04.1 USB Controller: nVidia Corporation MCP79 EHCI USB 2.0 Controller (rev b1)
00:06.0 USB Controller: nVidia Corporation MCP79 OHCI USB 1.1 Controller (rev b1)
00:06.1 USB Controller: nVidia Corporation MCP79 EHCI USB 2.0 Controller (rev b1)
00:08.0 Audio device: nVidia Corporation MCP79 High Definition Audio (rev b1)
00:09.0 PCI bridge: nVidia Corporation MCP79 PCI Bridge (rev b1)
00:0a.0 Ethernet controller: nVidia Corporation MCP79 Ethernet (rev b1)
00:0b.0 IDE interface: nVidia Corporation MCP79 SATA Controller (rev b1)
00:0c.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
00:10.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
00:15.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
00:16.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
00:17.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
00:18.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
03:00.0 VGA compatible controller: nVidia Corporation ION VGA (rev b1)
04:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

USB:
Bus 004 Device 002: ID 195d:1010 Itron Technology iONE

Xorg seems to think my mouse is a mac mouse as well (it's not, but mice always seem to detect as mac)
(II) Macintosh mouse button emulation: Found 3 mouse buttons
(II) Macintosh mouse button emulation: Found relative axes
(II) Macintosh mouse button emulation: Found x and y relative axes
(II) Macintosh mouse button emulation: Configuring as mouse
(**) Macintosh mouse button emulation: YAxisMapping: buttons 4 and 5
(**) Macintosh mouse button emulation: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE)
(II) Macintosh mouse button emulation: initialized for relative axes.
(II) config/udev: Adding input device Macintosh mouse button emulation (/dev/input/mouse0)
(II) No input driver/identifier specified (ignoring)

The problem goes away after a restart of Xorg or logging out/in.

penalvch (penalvch)
no longer affects: xserver-xorg-video-ati (Ubuntu)
affects: xorg-server → xorg (Ubuntu)
no longer affects: xorg (Ubuntu)
Revision history for this message
penalvch (penalvch) wrote :

Henrik S.. Hardy Desktop reached EOL on May 12, 2011.
See this document for currently supported Ubuntu releases: https://wiki.ubuntu.com/Releases

Is this an issue in a supported release? If so, could you please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect 229123

Please ensure you have xdiagnose installed, and that you click the Yes button for attaching additional debugging information.

affects: nvidia-graphics-drivers-173 (Ubuntu) → xorg (Ubuntu)
Changed in xorg (Ubuntu):
importance: Medium → Low
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xorg (Ubuntu) because there has been no activity for 60 days.]

Changed in xorg (Ubuntu):
status: Incomplete → Expired
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.