Re: OpenGL forwarding via ssh session: works on jessie, does not work on stretch

2019-06-05 Thread Étienne Mollier
On 6/5/19 10:26 PM, Simon S wrote:
> I think i found the culprit:
> 
> I use the debian apt repo for machinekit and the rt kernel:
> deb [arch=armhf] http://repos.rcn-ee.com/debian/ stretch main
> 
> This repo installs libGL.so.1.0.0 instead of libGL.so.1.2.0.
> I forced to use the default debian apt source repo and purged all libgl stuff 
> from the rcnee repo.
> 
> And now i get: 
>> glxinfo|head
> name of display: localhost:10.0
> display: localhost:10  screen: 0
> direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
> server glx vendor string: NVIDIA Corporation
> server glx version string: 1.4
> 
> perfect!

Excellent!  :)

Sorry for not having replied a bit sooner, I was still trying to
make sense of the situation.  I confirm the OpenGL library is
made available in my Stretch boxe in version 1.2.0:

$ dpkg -S /usr/lib/i386-linux-gnu/libGL.so.1.2.0
libgl1-mesa-glx:i386: /usr/lib/i386-linux-gnu/libGL.so.1.2.0

Also, if I may add, you wrote:
> I also think the xserver on the BBB should not be necessary
> for running stuff via ssh -X on a remote screen. I think I
> killed the server on jessie once and ssh -X still worked fine.

True, it is not needed.  I guess it may even be unwelcome on CNC.

Kind Regards,
-- 
Étienne Mollier 



Re: OpenGL forwarding via ssh session: works on jessie, does not work on stretch

2019-06-05 Thread Simon S
I think i found the culprit:

I use the debian apt repo for machinekit and the rt kernel:
deb [arch=armhf] http://repos.rcn-ee.com/debian/ stretch main

This repo installs libGL.so.1.0.0 instead of libGL.so.1.2.0.
I forced to use the default debian apt source repo and purged all libgl stuff 
from the rcnee repo.

And now i get: 
> glxinfo|head
name of display: localhost:10.0
display: localhost:10  screen: 0
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4

perfect!

So it seems like the libGL package is somehow messed up or not up to date on 
the repo server I use because of the machinekit stuff.

I contacted the owner of the repo and I will wait for his reply.



Re: OpenGL forwarding via ssh session: works on jessie, does not work on stretch

2019-06-05 Thread Simon S
Am Sonntag, 2. Juni 2019 15:00:05 UTC+2 schrieb Simon S:
> Hi,
> 
> I have a weird problem with opengl forwarding via ssh.
> I am running debian jessie on my BeagleBone Black (armhf) that I use for my 
> CNC machine by running machinekit.
> Everything works as expected, I even got indirect opengl rendering working 
> when I connect to the BBB using windows.
> 
> Now I tried to upgrade my setup using a more recent stretch based image.
> I am not able to use opengl forwarding on stretch.
> 
> The following test setup:
> (A) linux machine running ubuntu (Nvidia GPU)
> (B) BBB running jessie
> (C) BBB running stretch
> 
> I connect from (A) -> (*) by ssh -X x@host
> 
> When I connect from (A) to (B):
> > export LIBGL_ALWAYS_INDIRECT=1;  glxinfo|head
> name of display: localhost:10.0
> display: localhost:10  screen: 0
> direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
> server glx vendor string: NVIDIA Corporation
> server glx version string: 1.4
> server glx extensions:
> 
> When I connect from (A) to (C):
> > export LIBGL_ALWAYS_INDIRECT=1;  glxinfo|head
> Error: couldn't find RGB GLX visual or fbconfig
> name of display: localhost:10.0
> 
> 
> Did something change from jessie -> stretch concerning x permissions?
> 
> Running plain x apps like xterm works in all cases.
> 
> I installed lxde on (c) and glxinfo/glxgears runs fine under lxde on the BBB.
> 
> Any hints?
> 
> Simon



Re: OpenGL forwarding via ssh session: works on jessie, does not work on stretch

2019-06-05 Thread Simon S
Hi!

Thanks for testing it out!

I was wondering if it had to do with an user beeing logged in to lxde.
I think autologin might be enabled on the jessie system.
Unfortunately this does not help. Still the same problem on stretch.

I have some additional info. Without exporting the inderect rendering flag it 
does not work on ssh either:
> glxinfo|head
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error: couldn't find RGB GLX visual or fbconfig
name of display: localhost:10.0
...

With the export still the same issue:
>export LIBGL_ALWAYS_INDIRECT=1; glxinfo|head
Error: couldn't find RGB GLX visual or fbconfig
name of display: localhost:10.0

And there are no X error messages in the log either.

I was wondering if it has to do something with the gl libs on the armhf build.
Does your stretch based image have 
/usr/lib/*ARCH*/libGL.so.1.0.0
or
/usr/lib/*ARCH*/libGL.so.1.2.0
installed?

On jessie i havce 1.2.0, on stretch 1.0.0.
The 1.2.0 seems to be in a "transitional package" that does not install 
anything useful?!
Not sure if this is meaningful as glxinfo runs under lxde just fine.

Adding iglx to the config on the BBB allows me to run glxinfo with DISPLAY=:0 
(otehrwise I get  X Error of failed request:  GLXBadContext).
But it did not change anything for running gl stuff on a remote screen.
I also think the xserver on the BBB should not be necessary for running stuff 
via ssh -X on a remote screen. I think I killed the server on jessie once and 
ssh -X still worked fine.

My ubuntu box is running with iglx. In addition running indirect GL stuff works 
for the jessie box on windows too. Again it does not work on stretch.

Simon



Re: OpenGL forwarding via ssh session: works on jessie, does not work on stretch

2019-06-03 Thread Étienne Mollier
Simon, on 2019-06-02:
> The following test setup:
> (A) linux machine running ubuntu (Nvidia GPU)
> (B) BBB running jessie
> (C) BBB running stretch
>
> I connect from (A) -> (*) by ssh -X x@host
>
> When I connect from (A) to (B):
> > export LIBGL_ALWAYS_INDIRECT=1;  glxinfo|head
> name of display: localhost:10.0
> display: localhost:10  screen: 0
> direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
> server glx vendor string: NVIDIA Corporation
> server glx version string: 1.4
> server glx extensions:
>
> When I connect from (A) to (C):
> > export LIBGL_ALWAYS_INDIRECT=1;  glxinfo|head
> Error: couldn't find RGB GLX visual or fbconfig
> name of display: localhost:10.0

Good Day Simon,

At first I was thinking that could have to do with remote GLX
support of your X server, which requires to be explicitly
enabled on Debian Stretch using Xorg option +iglx for instance.
However, your setup and your symptoms do not match this
situation.  I vaguely recall having seen this "couldn't find RGB
GLX visual" message a couple of times when working on hardware
accelerated remote direct rendering though, but can't recall the
exact situation.


Here is an attempt to reproduce your issue, except that my setup
is:
(A) Amd running Sid
(C) Eeepc running Stretch

If I start X on (A) without "+iglx", then ssh -X to (C), I get:

$ glxinfo | grep '^direct rendering:'
direct rendering: Yes

$ LIBGL_ALWAYS_INDIRECT=1 glxinfo | grep '^direct rendering:'
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  34
  Current serial number in output stream:  33

$ glxdemo
/* Redrawing the window is clunky. */

$ glxgears
50 frames in 5.1 seconds =  9.875 FPS

If I start X on (A) with "+iglx", then ssh -X to (C), I get:

$ glxinfo | grep '^direct rendering:'
direct rendering: Yes

$ LIBGL_ALWAYS_INDIRECT=1 glxinfo | grep '^direct rendering:'
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)

$ glxdemo
/* Redrawing the window is clunky. */

$ LIBGL_ALWAYS_INDIRECT=1 glxdemo
/* Redrawing the window is smooth. */

$ glxgears
35 frames in 5.0 seconds =  6.953 FPS

$ LIBGL_ALWAYS_INDIRECT=1 glxgears
/* Can't get performances output because my X server...
 * erm...
 * dies instantly of a segmentation violation.
 */

Anyway, error messages are not the same as yours, so there may
be something else in play in your setup that might have been
missed.  For instance my architecture was different from yours,
the X server is run on Debian instead of Ubuntu, the graphic
card is an Amd instead of an Nvidia, etc.

Perhaps someone else with a better knowledge of X internals
might pop-up with better insights.

Kind Regards,
-- 
Étienne Mollier 


Off-topic, for the curious mind, the Xorg log says:

Backtrace:
0: /usr/lib/xorg/Xorg (OsLookupColor+0x139) [0x55a034a102c9]
1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x50) 
[0x7fa380c9b77f]
2: /usr/lib/xorg/Xorg (ResetCurrentRequest+0xb) [0x55a034a0f34b]
3: /usr/lib/xorg/Xorg (DRI2WaitSwap+0x56) [0x55a0349dc766]
unw_get_proc_name failed: no unwind info found [-10]
4: /usr/lib/xorg/modules/extensions/libglx.so (?+0x0) [0x7fa3803e1a50]
unw_get_proc_name failed: no unwind info found [-10]
5: /usr/lib/xorg/modules/extensions/libglx.so (?+0x0) [0x7fa3803da040]
unw_get_proc_name failed: no unwind info found [-10]
6: /usr/lib/xorg/modules/extensions/libglx.so (?+0x0) [0x7fa3803d5ff0]
7: /usr/lib/xorg/Xorg (dri3_send_open_reply+0xe0a) [0x55a0349e112a]
8: /usr/lib/xorg/Xorg (_CallCallbacks+0x34) [0x55a0348b6c24]
9: /usr/lib/xorg/Xorg (CloseDownClient+0x5f) [0x55a0348b0d0f]
10: /usr/lib/xorg/Xorg (SendErrorToClient+0x39b) [0x55a0348b1a0b]
11: /usr/lib/xorg/Xorg (InitFonts+0x3b6) [0x55a0348b5956]
12: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xeb) 
[0x7fa380aea09b]
13: /usr/lib/xorg/Xorg (_start+0x2a) [0x55a03489f67a]

Segmentation fault at address 0x8

Not sure if I should open a bug about this; I'm running a kernel
with a custom enough config to wonder if the issue came from the
thing between the chair and the keyboard in the first place.



OpenGL forwarding via ssh session: works on jessie, does not work on stretch

2019-06-02 Thread Simon S
Hi,

I have a weird problem with opengl forwarding via ssh.
I am running debian jessie on my BeagleBone Black (armhf) that I use for my CNC 
machine by running machinekit.
Everything works as expected, I even got indirect opengl rendering working when 
I connect to the BBB using windows.

Now I tried to upgrade my setup using a more recent stretch based image.
I am not able to use opengl forwarding on stretch.

The following test setup:
(A) linux machine running ubuntu (Nvidia GPU)
(B) BBB running jessie
(C) BBB running stretch

I connect from (A) -> (*) by ssh -X x@host

When I connect from (A) to (B):
> export LIBGL_ALWAYS_INDIRECT=1;  glxinfo|head
name of display: localhost:10.0
display: localhost:10  screen: 0
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:

When I connect from (A) to (C):
> export LIBGL_ALWAYS_INDIRECT=1;  glxinfo|head
Error: couldn't find RGB GLX visual or fbconfig
name of display: localhost:10.0


Did something change from jessie -> stretch concerning x permissions?

Running plain x apps like xterm works in all cases.

I installed lxde on (c) and glxinfo/glxgears runs fine under lxde on the BBB.

Any hints?

Simon