3

Previously I was using htop on 32-bit Manjaro, and it worked fine, then I switched to 64-bit ArchLinux, when starting htop it shows a blank screen, and any key press does nothing.

I've tried to add TERM=xterm-color htop, but it does the same.

My current $TERM value is xterm-256color.

I've tried extra/htop 1.0.2-2, aur/htop-svn 308-1 and also aur/htop-blueweb 1.0.2-1 all give me a blank screen, anything I should do to fix this?

EDIT: additional info for ldd:

output of ldd /usr/bin/htop

linux-vdso.so.1 (0x00007fff5ba70000)
libncursesw.so.5 => /usr/lib/libncursesw.so.5 (0x00007fecdc490000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fecdc188000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fecdbdd8000)
/lib/ld-linux-x86-64.so.2 (0x00007fecdc6f8000)

i've tried to reinstall these packages:

core/glibc
multilib/lib32-glibc
core/ncurses

but there are no luck

EDIT2: found out using strace that there are some program that causes htop to hang, after restarting the computer, problem solved..

  • Have you tried exporting TERM=xterm-color before running htop? – mkc Feb 3 '14 at 2:03
4

The problem is either with your display setup or htop itself. To eliminate that it's an issue with htop can you attempt to redirect its output to a file?

$ htop > htop_dump.txt

After running this then hit Ctrl+C. If there's content in the file, more htop_dump.txt, then the issue likely lies with your screen setup in your terminal/shell.

If on the otherhand this file also shows nothing, then something is broken in your system's setup, either with a library that htop depends on, or htop the binary itself.

You might also want to attempt to run an strace to see if there's a resource/configuration file that htop is pulling in that's hosing it's display. Something like this:

$ strace -o htop_strace.log -s 2000 htop
  • 1
    @Kokizzu - OK so it's an issue with your terminal/shell then (based on that test). You could see if there is some stray command from your shell's config files causing issue by opening up a "clean" shell, bash --noprofile --norc. – slm Feb 3 '14 at 14:16
  • 1
    @Kokizzu - just saw the strace output, yeah that doesn't look right at all. Is it hanging on the read(... in the output of strace? – slm Feb 3 '14 at 14:19
  • 1
    @Kokizzu - I think I would be very suspicious then of some form of corruption within my system. Disk failures and/or a lower level file may have been corrupted. htop looks to be reading something but is just hanging on it. – slm Feb 3 '14 at 15:10
  • 1
    @Kokizzu - def. sounds like a hardware issue to me. I had a Fedora Core 3 system a while back that appeared fine until I tried to access a sub directory under /var/lib. Then it would hang and I couldn't kill the processes accessing this directory. Turned out to be a failing HDD. – slm Feb 4 '14 at 1:53
  • 1
    chromium was the problem (pid 12366), after restarting htop works fine ^^; i'll mark this as solved, thanks for the suggestion to use strace to find out the problem – Kokizzu Feb 4 '14 at 1:58
0

I was using "/usr/bin/konsole". The $TERM variable was set to "Linux" for this.
htop did not work in this case.

When htop was invoked from "/usr/bin/gnome-terminal", it worked fine, the $TERM variable was set to "xterm" in this case.
So when I changed the $TERM to "xterm" from "Linux" for "konsole", it worked.

Running: Linux {hostName} 2.6.32-754.6.3.el6.x86_64 #1 SMP Tue Oct 9 17:27:49 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

When htop failed, $XTERM was set to "Linux", the last lines in my strace were as following (in case it is useful):

stat("/dev/vc/0", 0x7ffffaff2710) = -1 ENOENT (No such file or directory) stat("/dev/tty0", {st_mode=S_IFCHR|0620, st_rdev=makedev(4, 0), ...}) = 0 getpid() = 88481 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 readlink("/proc/self/fd/0", "/dev/pts/61", 4095) = 11 open("/dev/pts/61", O_WRONLY) = 3 ioctl(3, TIOCGWINSZ, {ws_row=55, ws_col=228, ws_xpixel=0, ws_ypixel=0}) = 0 socket(PF_LOCAL, SOCK_STREAM, 0) = 4 connect(4, {sa_family=AF_LOCAL, sun_path="/dev/gpmctl"}, 13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.