Every time I try to open a new tab by clicking on a link in another application (such as Thunderbird), the entire desktop freezes (mouse moves, but that’s it) and nothing happens for 10-15 seconds.
Only after that time elapses, an existing firefox window appears with the new tab in it opening the requested URL normally.
This delay’s been bothering me for some months now, and I finally got around to trace it. Simply running ktrace -i firefox some://new/url
I find, that it spends 5 seconds inside an NVidia ioctl
— twice.
(Note, the 3rd column lists the seconds elapsed from the beginning):
> kdump -E
...
62726 MainThread 0.114878 CALL exit(0)
62727 firefox 5.419059 RET ioctl 0
62727 firefox 5.419083 CALL openat(AT_FDCWD,0x186bf4be2420,0x2<O_RDWR>)
62727 firefox 5.419087 NAMI "/dev/nvidia0"
62727 firefox 5.419114 RET openat 15/0xf
62727 firefox 5.419116 CALL fcntl(0xf,F_SETFD,FD_CLOEXEC)
62727 firefox 5.419117 RET fcntl 0
62727 firefox 5.419119 CALL ioctl(0xf,0xc01446ce,0x186bf4be2500)
62727 firefox 10.649216 RET ioctl 0
62727 firefox 10.649233 CALL openat(AT_FDCWD,0x186bf4be2420,0x2<O_RDWR>)
62727 firefox 10.649236 NAMI "/dev/nvidia0"
62727 firefox 10.649305 RET openat 16/0x10
62727 firefox 10.649307 CALL fcntl(0x10,F_SETFD,FD_CLOEXEC)
62727 firefox 10.649309 RET fcntl 0
62727 firefox 10.649310 CALL ioctl(0x10,0xc01446ce,0x186bf4be2500)
62727 firefox 15.849375 RET ioctl 0
62727 firefox 15.849418 CALL ioctl(0x8,0xc020462a,0x186bf4be24d0)
What is that ioctl 0x186bf4be2420? I gather, it is something NVidia-specific — which would also explain the brief freezing of the entire desktop…
Can this be avoided somehow? There are people having this problem on Windows — an advice for them was to turn off the “Use hardware-accelaration if availble” setting, which had no effect here, on FreeBSD.
Is there something else I can try?