! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Changing keyboard layout and brightness causes high cpu usage and lockups
Status:
RESOLVED: FIXED
Severity:
critical

Comments

Description cdahmedeh 2009-11-09 02:41:29 CET
Hello,

I have noticed many instabilities running xfwm4. I have just started using xfce4.6 on my Xubuntu 9.10 Laptop. It's a running a Core 2 Duo, with 8600m GT nvidia proprietary drivers. When I change brightness or the keyboard layout via the options in the xfce configuration, my desktop locks up (mouse can move, but screen freezes and no input possible) for a few seconds. This problem was also visible when I used Fedora 12 Beta. This problem is also visible on Desktop PC running an AMD processor. 

What I've tried :
-A different window manager like Metacity or IceWM fixes the problem. But I would like to use xfwm4 because of it's features.
-Switching between open-source and proprietary drivers does not fix the problem.

Thanks. please notify if I need to give more inputs, logs, etc.
Comment 1 cdahmedeh 2009-11-09 03:32:57 CET
Here are the computers where I can report this bug :

Dell XPS m1530 : Core 2 Duo, 8600m GT nvidia
Dell Inspiron 1550 : Pentium Dual Core, Intel Integrated Card
AMD Desktop : 8800 GT nvidia
Comment 2 Olivier Fourdan editbugs 2009-11-09 08:31:30 CET
That has nothing to do with the window manager, the window manager does not handle brightness at all.

And the window manager  is an X application (almost) like any other, it cannot lock-up your system (unlike a driver)

It could be related to the use of the compositing, do you have the compositor enabled?

In any case, I really hardly see how this could be the window manager (I can change the brightness with xfwm4 w/out problems here).
Comment 3 Olivier Fourdan editbugs 2009-11-09 08:45:49 CET
Just checked on a could of systems, including NVidia proprietary driver, no crash.

When you say you run metacity or icewm, do you run them from within xfce, or separately?

Ie, from xfce in a terminal, do you run "metacity --replace" or do you select either gnome or icewm from the session manager at login?
Comment 4 cdahmedeh 2009-11-09 14:56:08 CET
Here is more information. I am running xfce only for the desktop. I'm just using xfwm4 --replace or metacity --replace to change between window managers. When running xfwm4, the freeze happens. When using metacity, the freeze doesn't happen. I decided to run a process monitor, and it's the x server process where the cpu usage increases. It's strange how it only happens with the xfwm4 window manager and not metacity and icewm. Finaly, happens both with compositing on and off. Disabling the composite extension from the xorg.conf does not solve the problem.

Also, are you running Ubuntu 9.10 ? Maybe it could be distribution specific ? What distribution did you run the tests on ?

xfce 4.6.1
xorg-server 1.64
nvidia 185.18.36

Also, how can I provide debug information ?
Comment 5 Olivier Fourdan editbugs 2009-11-09 17:23:44 CET
Running Fedora exclusively here. I vaguely remember seeing issues with brightness causing a crash in Xorg but that was months ago.

Is that new in 9.10? Can you try another distro (Fedora Xfce live CD comes to mind) just for testing purpose?
Comment 6 cdahmedeh 2009-11-09 17:33:39 CET
I have tried the Fedora XFCE Live CD. The brightness simply does not change, it just freezes (but that might be just be the different video driver, didn't try the priorietary on the Fedora Live CD). However, changing keyboard layouts does not cause any problems. Personally though, I would prefer to run Ubuntu instead of Fedora.

I have also tried two news things :
-Upgrade the kernel from 2.6.31-14-generic to 2.6.32-rc5. It does not fix the problem.
-Using the xorg-edgers ppa for a new xorg version also does not change anything.

Also, I experience some instabilities with xfwm4. I don't know what cause is, it's very strange. Like the computer seems to run still, if I type random characters, after the freeze ends (usually 3-4 seconds), the characters that I randomly type do appear. Basically, this means that input is still possible, mouse still moves, but screen just doesn't update for awhile.

Again, using metacity, compiz and icewm, for a strange reason fixes the problem completely. Is it possible that xfwm uses some Xorg extension that isn't used in the other window managers. I can't imagine what because compositing on or off has no effect on this.
Comment 7 cdahmedeh 2009-11-14 21:07:12 CET
Here is some more information about the problem.

When running xfwm4, I noticed that sometimes I get kernel panics or desktop freezing when I resume from suspend. When I use a window manager like compiz or metacity (in xfce), I don't get any problems, I can resume suspend as much times as I want, no freezing, nothing. 

I am temporarily using metacity right now, but I don't really like it. I'd prefer to use xfwm4, because it places windows better and has better focus handling (like switching workspaces when a window needs attention).

The problem might be distribution specific, because crashing doesn't happen in Fedora for example, but I would like to keep using Ubuntu. Again, using xorg-edgers ppa (which gives me a new xserver version) does not fix the problem. I'm pretty sure it's related to some X.org extension that xfwm4 uses and that other window managers don't. Could you shed some light on this ? This has nothing to do with compositing as it happens in both cases. I mean, if you compare the way Metacity and Xfwm4 manages the drawing or something, would there be a difference ?

Something else that I tried, was downgrading xfwm to version 4.4. This didn't fix the problem. It is very strange.

Finally, this is the most important part. How do I get xfwm4 to give Debug information ? How do I compile so that it can give such information. Remember, I'm pretty new to linux (less than a year experience), so I need pretty detailed information.

Thanks again, I hope this bug gets fixed soon !
Comment 8 cdahmedeh 2009-11-14 22:17:32 CET
Sorry, I made a mistake in the previous comment. The xfwm 4.4 also fixes the problem ! I'll take a look at the change logs to see if there is anything interesting. Finaly, I tried compiling 4.6 without the --enable-final and --use-compositing flag and it doesn't help either.

Thanks again
Comment 9 cdahmedeh 2009-11-15 15:15:28 CET
Ok, I did more testing to find out if any other distribution have the same problem. I decided to try in a Virtual Machine.

For control, I testing Xubuntu Karmic, and the same problem was found, freezing when changing keyboard layouts. Also, Debian Sid, with an Xfce desktop, produces the same effect. This means, that the problem could be related to Debian based distributions.
Comment 10 cdahmedeh 2009-11-18 16:28:56 CET
Hello,

Some more information :
I have tried compiling the git version of xfwm4 4.7. The issue still exists.

Thanks
Comment 11 Olivier Fourdan editbugs 2009-11-18 16:57:12 CET
could you please provide the ~/.xsession-errors and Xorg.0.log files?
Comment 12 Olivier Fourdan editbugs 2009-11-18 16:57:40 CET
(After reproducing the issue of course)
Comment 13 cdahmedeh 2009-11-18 17:58:34 CET
Created attachment 2681 
Requested Xorg.0.log file
Comment 14 cdahmedeh 2009-11-18 17:59:06 CET
Created attachment 2682 
Requested xession errors log
Comment 15 cdahmedeh 2009-11-18 17:59:15 CET
OK. Here are the requested logs. This is sequence of events :

-Xfce starts with metacity (it's default temporarily because of the described issues)
-Once Xfce is started up, I run the command xfwm4 --replace . 
-The window borders change indicating that the window manager has been changed.
-I change the brightness via the Fn+Up/Down keys on my dell laptop.
-Screen freezes expect for mouse for a few seconds
-I change the layout options in the keyboard options of the xfce configuration settings
-Screen freezes again for a few seconds.
-After this is done, I re-enable metacity by running metacity --replace so that I can work on my desktop again.

Thanks
Comment 16 cdahmedeh 2009-11-20 21:40:29 CET
OK, I have tried Xfce4 in Gentoo. And guess what ? The problem STILL happens. Very frustrating indeed.

Thanks
Comment 17 Olivier Fourdan editbugs 2009-11-21 15:20:21 CET
Let's start over, what keyboard layouts do you use, and how do you change the layout?
Comment 18 Olivier Fourdan editbugs 2009-11-21 15:23:36 CET
Ok, reproduced locally.
Comment 19 cdahmedeh 2009-11-21 16:09:03 CET
You can change the layout via the Keyboard Settings for Xfce or use setxkbmap.
Comment 20 Olivier Fourdan editbugs 2009-11-24 14:57:45 CET
Fixed in git:

master   => 0e6c8a5177563db8dec53416a5a077691ac40bfc
xfce-4.6 => c776c4a2a2ab0dfeca838620e9598db0b3adc91d

http://git.xfce.org/xfce/xfwm4/commit/?id=0e6c8a5177563db8dec53416a5a077691ac40bfc

Closing for now, please reopen if problem persists.
Comment 21 cdahmedeh 2009-11-24 16:40:59 CET
Good job ! 

The bug is fixed, everything seems good now. I will continue to file bugs as I discover them. You have a very responsive team. Again, good work !

Bug #5964

Reported by:
cdahmedeh
Reported on: 2009-11-09
Last modified on: 2009-11-24

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Attachments

Requested Xorg.0.log file (16.94 KB, text/x-log)
2009-11-18 17:58 CET , cdahmedeh
no flags
Requested xession errors log (3.05 KB, application/octet-stream)
2009-11-18 17:59 CET , cdahmedeh
no flags

Additional information