Skip to contentSkip to conversation

Linux & X11 & IRQ Interrupts

DISCUSSION Justin Piszcz 7 participants 9 messages May 6, 2002

lore
Share & tools
lore
#0 lore raw

When I move the mouse under X11 I hear a buzzing sound in the computer, first, I found it was the console speaker.

Yet, I still hear a very faint sound when I move the mouse cursor, this is after I've disconnected the console speaker, no matter what the rate of interrupts.

from itop:

INT NAME RATE MAX

  0 [             timer]   101 Ints/s     (max:   101)
  1 [          keyboard]     1 Ints/s     (max:     1)
  5 [              eth0]     2 Ints/s     (max:     4)
 12 [        PS/2 Mouse]   276 Ints/s     (max:   276)

Other people have also reported this problem but there hasn't been an apparent fix for it yet?

With the console speaker attached, it can be clearly heard, as well as performing fast packet movements (nmap (with insane option)) or such you can literally hear the packets.

When I am compiling an application or spending interrupts on disk access (copying files/doing a find), moving the mouse/holding a key on the keyboard does not make noise.

Does anyone know the source of this problem, and possibly a solution, or something one can do to mute this annoying noise?

This noise does not occur in any version of MS windows, so I am curious as to what the kernel? or x11? is doing to produce this noise?

#1 lore raw
Quoted 3 lines · Justin Piszcz

With the console speaker attached, it can be clearly heard, as well as performing fast packet movements (nmap (with insane option)) or such you can literally hear the packets.

What you are hearing is the noise in the computer's power supply. As the load on the power supply changes, the voltage changes by a few tens of millivolts, and that is the noise you are hearing.

This primary reason you don't hear this under Windows and you hear it under Linux is that Linux will shut the processor off when there is nothing to do, greatly reducing the load on the power supply. When something happens, like a mouse interrupt or a network interrupt, the CPU springs back to life, drawing a burst of power from the power supply and momentarily bringing the voltage down a bit. This cycling of the CPU happens in microseconds.

Windows, especially older versions of Windows, doesn't do this - when there is no work for the CPU, it spins in a busy loop looking for work. As a result, the load on the power supply never changes. Of course, your system will also run hotter and burn more power.

If this bothers you, you could try getting another power supply (one that is "stiffer" and less prone to voltage sag) or you could run a program like Seti@home or Distributed.Net and keep your CPU busy all the time.

#2 lore raw
In reply to Justin Piszcz

Ahh...
Thanks for the information.

Quoted 27 lines · David D. Hagood
Quoted 3 lines · Justin Piszcz

With the console speaker attached, it can be clearly heard, as well as performing fast packet movements (nmap (with insane option)) or such you can literally hear the packets.

What you are hearing is the noise in the computer's power supply. As the load on the power supply changes, the voltage changes by a few tens of millivolts, and that is the noise you are hearing.

This primary reason you don't hear this under Windows and you hear it under Linux is that Linux will shut the processor off when there is nothing to do, greatly reducing the load on the power supply. When something happens, like a mouse interrupt or a network interrupt, the CPU springs back to life, drawing a burst of power from the power supply and momentarily bringing the voltage down a bit. This cycling of the CPU happens in microseconds.

Windows, especially older versions of Windows, doesn't do this - when there is no work for the CPU, it spins in a busy loop looking for work. As a result, the load on the power supply never changes. Of course, your system will also run hotter and burn more power.

If this bothers you, you could try getting another power supply (one that is "stiffer" and less prone to voltage sag) or you could run a program like Seti@home or Distributed.Net and keep your CPU busy all the time.

#3 lore raw
In reply to Justin Piszcz
Quoted 7 lines

When I move the mouse under X11 I hear a buzzing sound in the computer, first, I found it was the console speaker.
Yet, I still hear a very faint sound when I move the mouse cursor, this is after I've disconnected the console speaker, no matter what the rate of interrupts.
Other people have also reported this problem but there hasn't been an apparent fix for it yet?

Well you should probably discuss that with your power supply vendor. Linux makes strong efforts to get the CPU in powered down mode as much as it can

Alan

#4 lore raw

Affirmative... A while back, my PC always used to make strange sounds when the hlt instruction was engaged/disengaged. It was a whine that changed in pitch. This happened in any OS that used it. (Linux, Windows NT/2000, Windows 98 with the Rain CPU cooler program etc.). I just figured that was normal for my PC, until one day my power supply fan died and I had to replace the power supply. That was the last time I heard it.

Grogan

Quoted 5 lines · On Mon, 6 May 2002 16:24:27 +0100 (BST) Alan Cox <[email protected]>…

Well you should probably discuss that with your power supply vendor. Linux makes strong efforts to get the CPU in powered down mode as much as it can

Alan

#5 lore raw
In reply to Justin Piszcz
Quoted 2 lines · On Sun, 05 May 2002 20:59:41 -0400 Justin Piszcz <[email protected]> escribió:

When I move the mouse under X11 I hear a buzzing sound in the computer, first, I found it was the console speaker.

I have the same problem. I've heard this in windows 9X with some programs wich just do what linux does, to cool the cpu.

I've tried a program wich just does:

main(){
	do{
	}while(1);
}

with the highest priority. (nice --19 ./cpu_sound). CPU time is 100% used,
but the noise _doesn't_ disappears.
I suspect it's just that I've a cheap power supply, and a Cyrix 6x86MX processor....

Quoted 36 lines

Yet, I still hear a very faint sound when I move the mouse cursor, this is after I've disconnected the console speaker, no matter what the rate of interrupts.

from itop:

INT NAME RATE MAX

  0 [             timer]   101 Ints/s     (max:   101)
  1 [          keyboard]     1 Ints/s     (max:     1)
  5 [              eth0]     2 Ints/s     (max:     4)
 12 [        PS/2 Mouse]   276 Ints/s     (max:   276)

Other people have also reported this problem but there hasn't been an apparent fix for it yet?

With the console speaker attached, it can be clearly heard, as well as performing fast packet movements (nmap (with insane option)) or such you can literally hear the packets.

When I am compiling an application or spending interrupts on disk access (copying files/doing a find), moving the mouse/holding a key on the keyboard does not make noise.

Does anyone know the source of this problem, and possibly a solution, or something one can do to mute this annoying noise?

This noise does not occur in any version of MS windows, so I am curious as to what the kernel? or x11? is doing to produce this noise?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#6 lore raw
In reply to Justin Piszcz
Quoted 4 lines

[Diego Calleja <[email protected]>, May-06 2002, Mon, 18:28 +0200]

but the noise _doesn't_ disappears. I suspect it's just that I've a cheap power supply, and a Cyrix 6x86MX processor....

No matter how cheap it was, you should definitely return it and request to be given a new one: Never underestimate any symptoms of dying hardware. Last Christmas a big vendor here in .cz sold thousands of faulty cheap power supplies -- majority of those blew up *all* of the connected peripherals in a single 1-second flash (after a couple weeks in regular use).

Tomas

#7 lore raw
Quoted 6 lines · On Mon, 6 May 2002 18:46:44 +0200 Tomas Szepe <[email protected]> escribió:

No matter how cheap it was, you should definitely return it and request to be given a new one: Never underestimate any symptoms of dying hardware. Last Christmas a big vendor here in .cz sold thousands of faulty cheap power supplies -- majority of those blew up *all* of the connected peripherals in a single 1-second flash (after a couple weeks in regular use).

Oh, I think it's no a problem, it has been working for about....3-4 years.

Quoted 3 lines

Tomas

#8 lore raw
In reply to Justin Piszcz
Quoted 5 lines · David D. Hagood

...
If this bothers you, you could try getting another power supply (one that is "stiffer" and less prone to voltage sag) or you could run a program like Seti@home or Distributed.Net and keep your CPU busy all the time.

You can just add `idle=poll' to the kernel boot command line. Then the CPU will not be halted, and there will be less variation in the current.

-