To kill a process, kill(1) is the tool. This page provides some help beyond that.

Killing a GUI process

Obviously, the easiest way to kill a GUI program is usually to close it's window(!), either using the button with a "cross" in it's title bar, or by right-clicking on its button in the gnome/KDE panel (then choose close). Not that it does not guarantees that the process is actually killed, badly behaving process may not die when it's resource (window) is destroyed.

It that window doesn't have such "cross" button in it's title bar, you can use kill(1), which has to be started from the command line. Alternatively, you can execute xprop _NET_WM_PID to retrieve the PID of the process.

Gnome's "System Monitor" (in Menu Applications>System) and/or xlsclients -l may help finding a process ID.

Another method: CTRL + ALT + ESC

Killing a process in uninterruptable sleep state

A process in an uninterruptable sleep state is waiting for device input/output, and cannot handle signals, until the process returns from the system call or trap.

Process does not respond to kill -9

Attempting to kill a process that has frozen in an uninterruptable sleep state will not work:

kill -9 foobar # This will not work for processes in uninterruptable sleep state

The kill signal will only be noticed when the process returns from the system call or trap. A process continually sleeping uninterruptable sleep state is almost always certainly inside a either a device driver with bad hardware, or containing buggy driver code.

Try killing the parent process

It is possible, though not likely that the process has hung inside another system call, not necessarily a device driver call. If this is the case, killing the parent, may resuscitate the hung process, for it to receive its kill signal:

kill -9 parent

The init process becomes the new parent process

If killing the parent does not work, the hung process stays frozen, but its parent process becomes the init process (number 1).

At this point, it may be necessary to reboot the computer in order to remove the frozen process.