WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to enable GLX in Xnest?  (Read 4681 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
How to enable GLX in Xnest?
« on: November 23, 2021, 10:45:53 AM »
Does anyone know how to enable GLX in Xnest? I can't seem to figure it out. Note the unhappy output of glxinfo:

Code: [Select]
bruno@x200:~$ Xnest :1 +iglx +extension GLX &

bruno@x200:~$ DISPLAY=:1 glxinfo
name of display: :1
Error: couldn't find RGB GLX visual or fbconfig

The expected output would be something similar to what I see when I run  glxinfo  on my actual display:

Code: [Select]
bruno@x200:~$ DISPLAY=:0 glxinfo
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_no_error,
    GLX_ARB_create_context_profile, GLX_ARB_fbconfig_float,
    GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_no_config_context,
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
    GLX_SGI_swap_control
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
---snip---

I've been chasing my tail on this for a while. I'd be very grateful for any clues.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to enable GLX in Xnest?
« Reply #1 on: November 23, 2021, 12:36:19 PM »
Are you sure it even supports it? I thought only Xephyr had advanced functionality like 3d.
The only barriers that can stop you are the ones you create yourself.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
Re: How to enable GLX in Xnest?
« Reply #2 on: November 23, 2021, 01:00:32 PM »
Hi, curaga. I think you are right. It works fine with Xephyr using the  +extension GLX  option, so I think Xnest does not support it.
I'll try to put together a Xephyr extension for the repo.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
Re: How to enable GLX in Xnest?
« Reply #3 on: November 23, 2021, 02:09:13 PM »
Xephyr's source code is inside Xorg. See here:
https://www.linuxfromscratch.org/blfs/view/svn/x/xorg-server.html

Would there be any value in me putting together a Xephyr extension now, or would it make more sense to include Xephyr in xorg-server.tcz at the time Xorg is compiled for future versions of TCL?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to enable GLX in Xnest?
« Reply #4 on: November 24, 2021, 02:21:27 AM »
IIRC it can be compiled separately, something like --enable-xephyr --disable-xorg, so if you find it useful, please package it.
The only barriers that can stop you are the ones you create yourself.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
Re: How to enable GLX in Xnest?
« Reply #5 on: November 24, 2021, 11:41:12 AM »
Hi, curaga. I found Xephyr incredibly useful. Extension for TCL12 x86_64 has been submitted.

Thanks for your help. Your expert comment led me to suspect (and confirm) that Xnest:
1. Does not support GLX
2. Is not sophisticated enough to hide unsupported extensions when it lists "available" extensions

Xephyr worked perfectly for what I needed. I hope the extension helps others.

Offline nick65go

  • Hero Member
  • *****
  • Posts: 832
Re: How to enable GLX in Xnest?
« Reply #6 on: November 24, 2021, 03:37:01 PM »
@GNUser: I am curious about this Xephyr server, which is usually packed together with Xorg server in almost all linux distros. TLDR:

1. Why would you need two X servers (Xorg on :0 and Xephyr on :1) for the same linux? Do you need two window-Managers (like flwm and jwm) to run simultaneously, each outputting on its physical monitor?

2. What does offer differently Xephyr vs.Xorg? less RAM, less dependency etc?

    [EDIT]: Moved Firefox issue to new topic.  Rich
« Last Edit: November 25, 2021, 07:57:25 AM by Rich »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
Re: How to enable GLX in Xnest?
« Reply #7 on: November 24, 2021, 08:37:54 PM »
Hi, nick65go.

Q: Why would you need two X servers (Xorg on :0 and Xephyr on :1) for the same linux?
A: Some GUI applications behave in unexpected ways--e.g., some applications look weird if you change size of its window (e.g., make window fullscreen) after starting the application. Rather than debugging the applications, it is easier to open up a window with Xephyr, make whatever adjustments you want to the Xephyr window, then open the application inside the Xephyr window like so:
Code: [Select]
$ DISPLAY=:1 fooIn my specific case, I'm polishing my homegrown screensaver. Running different animation/image-producing binaries inside Xephyr window ensures predictable, uniform behavior.

Q: What does offer differently Xephyr vs. Xorg?
Xephyr is meant to be used inside an Xorg session, not instead of Xorg.
« Last Edit: November 24, 2021, 08:39:41 PM by GNUser »

Offline nick65go

  • Hero Member
  • *****
  • Posts: 832
Re: How to enable GLX in Xnest?
« Reply #8 on: November 25, 2021, 05:51:28 AM »
@GNuser: Thank you.

    [EDIT]: Moved Firefox issue to new topic.  Rich
« Last Edit: November 25, 2021, 08:20:11 AM by Rich »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11590
Re: How to enable GLX in Xnest?
« Reply #9 on: November 25, 2021, 08:18:53 AM »
Hi nick65go
@Rich: good tip, but I do not want to hijack this topic. ...

Agreeded. The Firefox related posts have been moved here:
http://forum.tinycorelinux.net/index.php/topic,25358.0.html