[GRASSLIST:8588] Re: NVIZ not working properly in GRASS 6?

I also had problem with NVIZ, though a bit different kind. I solved the
problem by using tcl/tk version 8.3 instead of newer versions.
Maybe it would help you too.

Regards,
Istvan

Hello,

I just installed GRASS 6.0.1 from source on my FreeBSD 5.4 system,
and things seem to mostly be working just fine. However, when I
start NVIZ with some sample SPEARFISH data like so:

GRASS 6.0.1 > nviz elev=elevation.dem vect=roads

the GUI comes up, but the visualization window has "snow" in it
(looks like junk from the graphics buffer or something). It
compiled okay, and I think that I have the most recent versions
of the required software.

I'm kinda stumped as to what the problem is. Searching through
the mailing list archives didn't turn up anything that seemed
similar. Any help would be greatly appreciated. Thanks.

Thank you for your suggestions, but I still can't get the NVIZ window
to display anything but junk.

On Tuesday 11 October 2005, Ing.Peter Misovic wrote:

-> I removed old Mesa libraries
--> I installed version : 6.3.2-1.mdk10.2
libMesaGL1-6.3.2-1.mdk10.2.mde
libMesaGLU1-6.3.2-1.mdk10.2.mde
libMesaGLU1-devel-6.3.2-1.mdk10.2.mde

and now everything is working fine

My system didn't have any Mesa libraries installed, and when I tried
to add them, I got this message:

  MesaGL is unnecessary because libGL and libGLU come with
  XFree86 4.0 and higher

I'm running X.org 6.8.2 which also has these libraries. So I'm guessing
that's not it, but I don't know much about these things, maybe it is?

On Wednesday 12 October 2005, Stefan Istvan wrote:

I also had problem with NVIZ, though a bit different kind. I solved the
problem by using tcl/tk version 8.3 instead of newer versions.
Maybe it would help you too.

Okay, I installed tcl/tk 8.3, and rebuilt GRASS to use them. However, the
results are still the same, nothing but "snow" or graphics buffer
junk in the NVIZ visualization window, but the window with the
controls is fine (its just that none of the buttons really do
anything).

Any additional help or suggestions would be much appreciated, thanks.

> Hello,
>
> I just installed GRASS 6.0.1 from source on my FreeBSD 5.4 system,
> and things seem to mostly be working just fine. However, when I
> start NVIZ with some sample SPEARFISH data like so:
>
> GRASS 6.0.1 > nviz elev=elevation.dem vect=roads
>
> the GUI comes up, but the visualization window has "snow" in it
> (looks like junk from the graphics buffer or something). It
> compiled okay, and I think that I have the most recent versions
> of the required software.
>
> I'm kinda stumped as to what the problem is. Searching through
> the mailing list archives didn't turn up anything that seemed
> similar. Any help would be greatly appreciated. Thanks.

--
                                             Ross

                                http://RossBeyer.net/science/

On Thu, Oct 13, 2005 at 01:26:50PM -0700, we recorded a bogon-computron collision of the <rbeyer@arc.nasa.gov> flavor, containing:

Thank you for your suggestions, but I still can't get the NVIZ window
to display anything but junk.

On Tuesday 11 October 2005, Ing.Peter Misovic wrote:
> -> I removed old Mesa libraries
> --> I installed version : 6.3.2-1.mdk10.2
> libMesaGL1-6.3.2-1.mdk10.2.mde
> libMesaGLU1-6.3.2-1.mdk10.2.mde
> libMesaGLU1-devel-6.3.2-1.mdk10.2.mde
>
> and now everything is working fine

My system didn't have any Mesa libraries installed, and when I tried
to add them, I got this message:

  MesaGL is unnecessary because libGL and libGLU come with
  XFree86 4.0 and higher

I'm running X.org 6.8.2 which also has these libraries. So I'm guessing
that's not it, but I don't know much about these things, maybe it is?

I have Grass 6(cvs) installed on my home FreeBSD 5.4 machine (also running
X.org 6.8.2), my office FreeBSD 4.11 machine (running XFree86 4.3.0) and my
laptop FreeBSD 4.11 machine (also running XFree86 4.3.0). Both the home and
office machine use NVIDIA video card with NVIDIA drivers --- these replace
MesaGL with an accelerated set of GL libraries specific to NVIDIA cards.
NVIZ works beautifully on both of those machines. On the laptop, which has
only its built-in ATI Mobility video card and uses MesaGL, NVIZ gets the black
rectangle instead of the 3-D scene and is useless. All the controls in NVIZ
act like they're working, but the actual rendered scene never shows up.

I saw this once before several years ago in Grass 5.0.3 before I abandoned the
Grass 5.0 line and went to what was then called Grass 5.1. A machine that
showed this behavior with Grass 5.0.3 worked great with Grass 5.1's NVIZ and
continued to work with Grass 5.7 when 5.1 changed names. Sometime since then
the 6.0 NVIZ has stopped working in the same way. I have not yet upgraded my
laptop's OS, X and GL to see if doing that fixes it, but it sounds from your
experience that it would not. The fact that my home machine with its
NVIDIA-provided GL works Just Fine does make it sound like MesaGL is the
culprit, even the most recent one.

I know that's not very helpful --- I have NO idea how to move forward other
than to replace Mesa, and since Mesa is part of X and you're using the latest
X, I don't see where to go from there. When I first saw this in 5.0.3 I
tried several things like adding dri (from /usr/ports/graphics/dri) to no
avail. Back then moving to Grass 5.1 on the laptop was the only thing that
healed NVIZ, and of course now it's back to not working in the same way. Since
I have other machines to use it on and never saw anyone else complain about it
I just chalked it up to cockpit error or some problem with Mesa on BSD and
forgot about it.

On Wednesday 12 October 2005, Stefan Istvan wrote:
> I also had problem with NVIZ, though a bit different kind. I solved the
> problem by using tcl/tk version 8.3 instead of newer versions.
> Maybe it would help you too.

Okay, I installed tcl/tk 8.3, and rebuilt GRASS to use them. However, the
results are still the same, nothing but "snow" or graphics buffer
junk in the NVIZ visualization window, but the window with the
controls is fine (its just that none of the buttons really do
anything).

Any additional help or suggestions would be much appreciated, thanks.

> > Hello,
> >
> > I just installed GRASS 6.0.1 from source on my FreeBSD 5.4 system,
> > and things seem to mostly be working just fine. However, when I
> > start NVIZ with some sample SPEARFISH data like so:
> >
> > GRASS 6.0.1 > nviz elev=elevation.dem vect=roads
> >
> > the GUI comes up, but the visualization window has "snow" in it
> > (looks like junk from the graphics buffer or something). It
> > compiled okay, and I think that I have the most recent versions
> > of the required software.
> >
> > I'm kinda stumped as to what the problem is. Searching through
> > the mailing list archives didn't turn up anything that seemed
> > similar. Any help would be greatly appreciated. Thanks.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1
"The only thing you can do easily is be wrong, and that's hardly
  worth the effort." -- Norton Juster

On Thu, 13 Oct 2005 15:02:21 -0600
Tom Russo <russo@bogodyn.org> wrote:

On Thu, Oct 13, 2005 at 01:26:50PM -0700, we recorded a bogon-computron collision of the <rbeyer@arc.nasa.gov> flavor, containing:
>
> I'm running X.org 6.8.2 which also has these libraries. So I'm guessing
> that's not it, but I don't know much about these things, maybe it is?

Me too

I have Grass 6(cvs) installed on my home FreeBSD 5.4 machine (also running
X.org 6.8.2), my office FreeBSD 4.11 machine (running XFree86 4.3.0) and my
laptop FreeBSD 4.11 machine (also running XFree86 4.3.0). Both the home and
office machine use NVIDIA video card with NVIDIA drivers --- these replace
MesaGL with an accelerated set of GL libraries specific to NVIDIA cards.
NVIZ works beautifully on both of those machines. On the laptop, which has
only its built-in ATI Mobility video card and uses MesaGL, NVIZ gets the black
rectangle instead of the 3-D scene and is useless. All the controls in NVIZ
act like they're working, but the actual rendered scene never shows up.

I'm also using a NVIDIA card have the x.org drivers installed as well. I get the same phenomena, blackness (and dead slowness) for 6.1, but everything works in 6.0.

T
--
Trevor Wiens
twiens@interbaun.com

The greatest obstacle to discovery is not ignorance - it is the illusion of knowledge.
(Daniel J. Boorstin)

On Thu, Oct 13, 2005 at 04:17:35PM -0600, we recorded a bogon-computron collision of the <twiens@interbaun.com> flavor, containing:

On Thu, 13 Oct 2005 15:02:21 -0600
Tom Russo <russo@bogodyn.org> wrote:

> On Thu, Oct 13, 2005 at 01:26:50PM -0700, we recorded a bogon-computron collision of the <rbeyer@arc.nasa.gov> flavor, containing:
> >
> > I'm running X.org 6.8.2 which also has these libraries. So I'm guessing
> > that's not it, but I don't know much about these things, maybe it is?

Me too

>
> I have Grass 6(cvs) installed on my home FreeBSD 5.4 machine (also running
> X.org 6.8.2), my office FreeBSD 4.11 machine (running XFree86 4.3.0) and my
> laptop FreeBSD 4.11 machine (also running XFree86 4.3.0). Both the home and
> office machine use NVIDIA video card with NVIDIA drivers --- these replace
> MesaGL with an accelerated set of GL libraries specific to NVIDIA cards.
> NVIZ works beautifully on both of those machines. On the laptop, which has
> only its built-in ATI Mobility video card and uses MesaGL, NVIZ gets the black
> rectangle instead of the 3-D scene and is useless. All the controls in NVIZ
> act like they're working, but the actual rendered scene never shows up.

I'm also using a NVIDIA card have the x.org drivers installed as well. I get the same phenomena, blackness (and dead slowness) for 6.1, but everything works in 6.0.

Hmmm. Sounds like there's something fishy in the Mesa that comes with x.org
6.8.2, then (and also with the old XFree86-4.3.0), or at least with how NVIZ
is using them. The NVIDIA driver set replaces all the GL libraries, and when
I use those instead NVIZ works fine (I last built from CVS about a week ago,
and NVIZ has no problem on my NVIDIA-card/NVIDIA-driver system. When I say
"NVIDIA driver" I mean the one from NVIDIA that requires separate installation,
not the "nv" driver that comes with x.org. These drivers are available for
linux and FreeBSD (on BSD they're /usr/ports/x11/nvidia-driver/).

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1
"The only thing you can do easily is be wrong, and that's hardly
  worth the effort." -- Norton Juster

Tom,

On Thursday 13 October 2005 04:06 pm, Tom Russo wrote:

Hmmm. Sounds like there's something fishy in the Mesa that comes with
x.org 6.8.2, then (and also with the old XFree86-4.3.0), or at least with
how NVIZ is using them. The NVIDIA driver set replaces all the GL
libraries, and when I use those instead NVIZ works fine (I last built from
CVS about a week ago, and NVIZ has no problem on my
NVIDIA-card/NVIDIA-driver system. When I say "NVIDIA driver" I mean the
one from NVIDIA that requires separate installation, not the "nv" driver
that comes with x.org. These drivers are available for linux and FreeBSD
(on BSD they're /usr/ports/x11/nvidia-driver/).

Thanks for all of the info.

My FreeBSD 5.4 system with X.org 6.8.2 has an ATI video card, so
the NVIDIA drivers aren't really a solution for me.

Do you think that this is something the GRASS developers will address
(do they visit this list)? Or should I go and get myself an NVIDIA
card?
--
                                             Ross

                                http://RossBeyer.net/science/

On Fri, Oct 14, 2005 at 11:30:20AM -0700, we recorded a bogon-computron collision of the <rbeyer@arc.nasa.gov> flavor, containing:

Tom,

On Thursday 13 October 2005 04:06 pm, Tom Russo wrote:

> Hmmm. Sounds like there's something fishy in the Mesa that comes with
> x.org 6.8.2, then (and also with the old XFree86-4.3.0), or at least with
> how NVIZ is using them. The NVIDIA driver set replaces all the GL
> libraries, and when I use those instead NVIZ works fine (I last built from
> CVS about a week ago, and NVIZ has no problem on my
> NVIDIA-card/NVIDIA-driver system. When I say "NVIDIA driver" I mean the
> one from NVIDIA that requires separate installation, not the "nv" driver
> that comes with x.org. These drivers are available for linux and FreeBSD
> (on BSD they're /usr/ports/x11/nvidia-driver/).

Thanks for all of the info.

My FreeBSD 5.4 system with X.org 6.8.2 has an ATI video card, so
the NVIDIA drivers aren't really a solution for me.

Nor is it a solution for me on my laptop with its ATI video. I had been
hoping that my problem there was the old BSD OS and older XFree86 install.
Your experience is dashing that hope, since you're running what I'd be
upgrading to.

You might try installing DRI and enabling it. I am not entirely certain that
I ever did it correctly on the laptop (only tried once, probably two years ago,
and now can't try it on the laptop because the current DRI port requires xorg,
which I won't have until I update the machine). See /usr/ports/graphics/dri,
and check out the FreeBSD specific stuff on http://dri.sourceforge.net/

It may well be that using the direct rendering module will get around this
issue. Or you could find that even if you do it right that it still
doesn't help. But that's the only thing I can think of suggesting since it's
quite obvious it's a GL issue, and adding DRI is about the only thing shy of
replacing Mesa with the combination of an NVIDIA card and the NVIDIA-provided
driver (which I'm not suggesting).

Do you think that this is something the GRASS developers will address
(do they visit this list)? Or should I go and get myself an NVIDIA
card?

The developers certainly visit this list. Whether any of them have a system
that exhibits this problem is a much more relevant question --- and why I never
really piped up until now (assumed that it was my problem, and that if it was
widespread I'd have heard it here by now).

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1
"The only thing you can do easily is be wrong, and that's hardly
  worth the effort." -- Norton Juster

On Fri, Oct 14, 2005 at 01:50:29PM -0600, we recorded a bogon-computron collision of the <russo@bogodyn.org> flavor, containing:

On Fri, Oct 14, 2005 at 11:30:20AM -0700, we recorded a bogon-computron collision of the <rbeyer@arc.nasa.gov> flavor, containing:
> Tom,
>
> On Thursday 13 October 2005 04:06 pm, Tom Russo wrote:
>
> > Hmmm. Sounds like there's something fishy in the Mesa that comes with

[...]

>
> Thanks for all of the info.
>
> My FreeBSD 5.4 system with X.org 6.8.2 has an ATI video card, so
> the NVIDIA drivers aren't really a solution for me.

Nor is it a solution for me on my laptop with its ATI video. I had been
hoping that my problem there was the old BSD OS and older XFree86 install.
Your experience is dashing that hope, since you're running what I'd be
upgrading to.

You might try installing DRI and enabling it. I am not entirely certain that
I ever did it correctly on the laptop (only tried once, probably two years ago,
and now can't try it on the laptop because the current DRI port requires xorg,
which I won't have until I update the machine). See /usr/ports/graphics/dri,
and check out the FreeBSD specific stuff on http://dri.sourceforge.net/

I've been reading that FreeBSD specific stuff, which brought me to:
http://people.freebsd.org/~anholt/dri/install.html

Looks like DRM/DRI is part of the BSD 5.4 install already, and you just have
to enable it in your X config file. The instructions are in that install file.
Might be something quick to try. I'm really curious if it helps, as it'll
light a fire under me to upgrade that laptop's system.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1
"The only thing you can do easily is be wrong, and that's hardly
  worth the effort." -- Norton Juster

On Fri, Oct 14, 2005 at 02:09:43PM -0600, we recorded a bogon-computron collision of the <russo@bogodyn.org> flavor, containing:

On Fri, Oct 14, 2005 at 01:50:29PM -0600, we recorded a bogon-computron collision of the <russo@bogodyn.org> flavor, containing:
> On Fri, Oct 14, 2005 at 11:30:20AM -0700, we recorded a bogon-computron collision of the <rbeyer@arc.nasa.gov> flavor, containing:
> > Tom,
> >
> > On Thursday 13 October 2005 04:06 pm, Tom Russo wrote:
> >
> > > Hmmm. Sounds like there's something fishy in the Mesa that comes with
[...]
> >
> > My FreeBSD 5.4 system with X.org 6.8.2 has an ATI video card, so
> > the NVIDIA drivers aren't really a solution for me.
>
> Nor is it a solution for me on my laptop with its ATI video. I had been
> hoping that my problem there was the old BSD OS and older XFree86 install.
> Your experience is dashing that hope, since you're running what I'd be
> upgrading to.
>
> You might try installing DRI and enabling it. I am not entirely certain that
> I ever did it correctly on the laptop (only tried once, probably two years ago,
> and now can't try it on the laptop because the current DRI port requires xorg,
> which I won't have until I update the machine). See /usr/ports/graphics/dri,
> and check out the FreeBSD specific stuff on http://dri.sourceforge.net/

Might be something quick to try. I'm really curious if it helps, as it'll
light a fire under me to upgrade that laptop's system.

It is indeed quick to try, and solved my problem. Maybe it'll solve yours.

Following the directions in http://people.freebsd.org/~anholt/dri/install.html
I discovered that in fact there were only two things I needed to do on BSD 4.11
with XFree86 4.3.0 to get DRM running right:

0) cd /sys/modules/drm && make && make install
1) Edit /etc/X11/XF86Config and:
  make sure that your XF86Config has the following lines in the Modules section:
  Load "dri"
  Load "glx"

  If you want users besides root to be able to use the DRI, add the following
  section to your XF86Config.

  Section "DRI"
      Mode 0666
  EndSection

Then restart the X server. I found that glxinfo showed "direct Rendering: Yes"
after this, glxgears was much, much faster than before, and NVIZ worked. This
was with the ATI graphics built into the laptop.

Since you're running BSD 5.4, step 0 is unnecessary for you --- the necessary
kernel modules are already in the /boot/kernel directory and are automatically
loaded by the X server when it starts up and loads the "dri" module. Naturally,
you'll be editing /etc/X11/xorg.conf instead. You don't need to install
any ports, not even /usr/ports/graphics/dri, which is just the client drivers.

Now, why it is that one must have direct rendering for a MesaGL application
like NVIZ to work is another question that should probably be answered, but
this solves my issues with NVIZ on my laptop. Scratch one puzzler that I had
written off for months. Thank you for bringing it up here, or I'd probably
have just upgraded my OS and X (using up more of an already stretched laptop
disk drive) and found it didn't help!

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1
"The only thing you can do easily is be wrong, and that's hardly
  worth the effort." -- Norton Juster

Tom,

> Might be something quick to try. I'm really curious if it helps, as
> it'll light a fire under me to upgrade that laptop's system.

It is indeed quick to try, and solved my problem. Maybe it'll solve yours.

I'm glad for the pointers, but it didn't work for me.

I set everything up in my xorg.conf file for my ATI FireGL card,
however glxinfo displayed "direct rendering: No" and close inspection
of /var/log/Xorg.0.log shows this:

(WW) RADEON(0): Direct rendering not yet supported on Radeon 9500 and newer
card
s

Okay, I also have this Radeon 9200 card that I can try out. Despite
the fact that the /var/log/Xorg.0.log file shows

(II) RADEON(0): Direct rendering enabled

glxinfo still says "direct rendering: No".

In both cases, NVIZ displayed the same graphics buffer junk in its
visualization window, so I continue to be out of luck. I think
that your question about why NVIZ needs direct rendering is a valid
one, and maybe someone can answer that. However, short of a
GRASS-centric solution, it seems I need to go out and find a way
to get direct rendering working for NVIZ to work.
--
                                             Ross

                                http://RossBeyer.net/science/

On Fri, Oct 14, 2005 at 02:18:46PM -0700, we recorded a bogon-computron collision of the <rbeyer@arc.nasa.gov> flavor, containing:

Tom,

> > Might be something quick to try. I'm really curious if it helps, as
> > it'll light a fire under me to upgrade that laptop's system.
>
> It is indeed quick to try, and solved my problem. Maybe it'll solve yours.

I'm glad for the pointers, but it didn't work for me.

Sorry that it wasn't a silver bullet.

I set everything up in my xorg.conf file for my ATI FireGL card,
however glxinfo displayed "direct rendering: No" and close inspection
of /var/log/Xorg.0.log shows this:

(WW) RADEON(0): Direct rendering not yet supported on Radeon 9500 and newer
card
s

Bleah.

Okay, I also have this Radeon 9200 card that I can try out. Despite
the fact that the /var/log/Xorg.0.log file shows

(II) RADEON(0): Direct rendering enabled

glxinfo still says "direct rendering: No".

The troubleshooting page at
http://people.freebsd.org/~anholt/dri/troubleshooting.html
suggests that the Radeon 9200 isn't supported either. Perhaps that's out of
date since you don't get the (WW) message --- you might be able to track
down how to get it working if you look on that troubleshooting page.

In both cases, NVIZ displayed the same graphics buffer junk in its
visualization window, so I continue to be out of luck. I think
that your question about why NVIZ needs direct rendering is a valid
one, and maybe someone can answer that. However, short of a
GRASS-centric solution, it seems I need to go out and find a way
to get direct rendering working for NVIZ to work.

Yes, I think there has to be a better way to approach this --- something
has changed in how NVIZ uses GL although I really don't know when. I saw this
break between 5.0.1 and 5.0.3, heal in 5.1, and sometime in the last year or
so break again in 6.x. Finally working out DRM has fixed it for my laptop,
and not using Mesa GL on the NVIDIA-based machines has fixed it there, but
clearly there is something fishy going on that should be tracked down.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1
"The only thing you can do easily is be wrong, and that's hardly
  worth the effort." -- Norton Juster

I set everything up in my xorg.conf file for my ATI FireGL card,
however glxinfo displayed "direct rendering: No" and close inspection
of /var/log/Xorg.0.log shows this:

(WW) RADEON(0): Direct rendering not yet supported on Radeon 9500 and
newer cards

The 9250 was the last card that ATI released the interface specs for, so
is the last card properly supported by XFree86/X.org for DRI
acceleration. ATI provides binary drivers for Linux for newer cards.
see http://dri.sf.net

FWIW, Debian/Linux's XFree86 4.3.0 was working fine for me last week
with and without DRI turned on with my 9250.

Okay, I also have this Radeon 9200 card that I can try out. Despite
the fact that the /var/log/Xorg.0.log file shows

(II) RADEON(0): Direct rendering enabled

glxinfo still says "direct rendering: No".

dunno

In both cases, NVIZ displayed the same graphics buffer junk in its
visualization window, so I continue to be out of luck. I think
that your question about why NVIZ needs direct rendering is a valid
one, and maybe someone can answer that. However, short of a
GRASS-centric solution, it seems I need to go out and find a way
to get direct rendering working for NVIZ to work.

as a test you could try if NVIZ in GRASS 5.7.0 worked, 6.0.0, etc.
http://grass.ibiblio.org/grass54/source/
http://grass.ibiblio.org/grass57/source/
http://grass.ibiblio.org/grass60/source/
http://grass.ibiblio.org/grass61/source/

or to further narrow it down do a cvs checkout of grass6 using a
date_spec between the release dates of 5.7 and the latest CVS to try and
isolate when it went bad. Pick the middle date, test, pick the new
middle, etc and you should be able to home in on it with some speed..

Hamish

My NVIZ problems were resolved when I upgraded from Hoary to Breezy. Actually it wasn't so much of an upgrade as a complete reinstall due to my error ;(. The long and short however is that now 6.0 and 6.1 run fine on my machine. Unfortunately, I couldn't diagnose the source of the problem under my previous setup so I can't contribute to the understanding of the problem.

T
--
Trevor Wiens
twiens@interbaun.com

The significant problems that we face cannot be solved at the same
level of thinking we were at when we created them.
(Albert Einstein)