[Touch-packages] [Bug 1902853] Re: Failure to create core GL context with llvmpipe when using GLX_ARB_context_flush_control

2020-11-06 Thread Marc
The fix (upgrading to HWE) doesn't change the Mesa lib version, so while
it could be caused by a newer Mesa interacting badly with the older
kernel or xorg, I feel like it seems more like to be kernel or xorg.

18.04 is LTS, and this is somewhat of a trap for those doing CI testing
of desktop applications, so I'd be happy to help a little more in trying
to identify if a fix can be taken back.

A bisect seems like it'd be a huge effort however so I'm ruling that out
for now. I still reckon if I knew which process picks up the message
that xcb_glx_create_context_attribs_arb_checked sends I could take a
closer look and find why it rejects the extension value. Happen to know
how to track that?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1902853

Title:
  Failure to create core GL context with llvmpipe when using
  GLX_ARB_context_flush_control

Status in libsdl2 package in Ubuntu:
  Fix Released
Status in mesa package in Ubuntu:
  Fix Released

Bug description:
  When using llvmpipe on the non-HWE xorg version GL core context
  creation fails when using "GLX_ARB_context_flush_control" even though
  the driver reports that the extension is supported.

  Apologies if xorg is the wrong package here, this could be a libgl1
  -mesa-dri/glx bug instead, it's unclear to me where the fault lies in
  the graphics stack.

  xserver-common:
Installed: 2:1.19.6-1ubuntu4.7
Candidate: 2:1.19.6-1ubuntu4.7
  linux-generic:
Installed: 4.15.0.122.109
Candidate: 4.15.0.122.109

  Steps to reproduce on Ubuntu Server:
  1. Install Ubuntu 18.04 server edition in a VM, or other hardware without a 
physical graphics device
  2. Install the desktop with "sudo apt install ubuntu-desktop"
  3. Reboot
  4. Compile and run the attached file

  Steps to reproduce on Ubuntu Desktop:
  1. Install Ubuntu 18.04 desktop edition in a VM, or other hardware without a 
physical graphics device
  2. Remove the HWE packages with "apt remove *-hwe-18.04" and then "apt 
install xserver-xorg-core ubuntu-desktop xserver-xorg xserver-xorg-video-all 
xserver-xorg-input-all libgl1-mesa-dri libgl1-mesa-glx" to get things back to 
normal
  3. Reboot
  4. Compile and run the attached file

  Both examples produce:
  "Could not create GL context: BadValue (integer parameter out of range for 
operation)"

  For both cases, upgrading to (or staying on) the HWE stack allows
  creating the core 3.3 context successfully.

  
  Debugging:

  I've stepped all the way into libxcb for the context creation at
  src/glx.c:3258, with a call to
  "xcb_glx_create_context_attribs_arb_checked", but haven't managed to
  link this up to a received request in another process. The request is
  rejected with BadValue.

  BadVaue in this instance could mean one of two things according to GL spec:
  1. The GLX_RENDER_TYPE attribute is invalid
  2. An attribute or it's bitmask are not recognized.

  We can likely rule out 1 as GLX_RENDER_TYPE is correctly set to
  opengl. Option 2 allows looking at it at a higher level. SDL2 adds
  `GLX_CONTEXT_RELEASE_BEHAVIOUR_ARB=GLX_CONTEXT_RELEASE_BEHAVIOUR_FLUSH_ARB`
  to the attributes (at src/video/x11/SDL_x11opengl.c:720) by default
  when it detects the `GLX_ARB_context_flush_control` extension is
  present, which should be a no-op and the default setting. `glxinfo`
  and other gl functions all show that `GLX_ARB_context_flush_control`
  is present, but removing that usage from the attributes list (by
  removing lines 720 to 726 avoids the issue and we are given a valid GL
  context.

  Due to this, I think something in the graphics stack is rejecting the
  usage of GLX_ARB_context_flush_control, even though it's claiming to
  support it through other gl calls. The llvmpipe GL driver reports core
  support up to 3.3 as well, so this shouldn't be an issue. I also
  suspect it's simply something that's been fixed more recently, as
  installing the newer HWE versions of xorg (and the kernel) fixes the
  issue.

  
  I wouldn't expect to have to upgrade to the HWE stack to be able to get a 
working GL context this way, so I'm reporting this to check if it's a known 
issue or if there's a fix that can be made.

  The attached file depends on "libsdl2-dev" and can be compiled and run with:
  "g++ main.cpp -I/usr/include/SDL2 -lSDL2 -lGL && ./a.out"

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xorg 1:7.7+19ubuntu7.1
  ProcVersionSignature: Ubuntu 5.4.0-52.57~18.04.1-generic 5.4.65
  Uname: Linux 5.4.0-52-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.18
  Architecture: amd64
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  4 09:16:16 2020
  DistUpgraded: Fresh install
  DistroCodename: bionic
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, including running git bisection searches
  GraphicsCard:
   VMware SVGA II Adapter [15ad:0405] (prog-if 00 [VGA 

[Touch-packages] [Bug 1902853] Re: Failure to create core GL context with llvmpipe when using GLX_ARB_context_flush_control

2020-11-05 Thread Daniel van Vugt
OK, thanks. In that case the correct status of the bug is "Fix
Released". If we knew *what* change fixed it then we could try to get
the same fix into 18.04. Probably Mesa, I guess?

** Changed in: libsdl2 (Ubuntu)
   Status: Incomplete => Fix Released

** Changed in: mesa (Ubuntu)
   Status: Incomplete => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1902853

Title:
  Failure to create core GL context with llvmpipe when using
  GLX_ARB_context_flush_control

Status in libsdl2 package in Ubuntu:
  Fix Released
Status in mesa package in Ubuntu:
  Fix Released

Bug description:
  When using llvmpipe on the non-HWE xorg version GL core context
  creation fails when using "GLX_ARB_context_flush_control" even though
  the driver reports that the extension is supported.

  Apologies if xorg is the wrong package here, this could be a libgl1
  -mesa-dri/glx bug instead, it's unclear to me where the fault lies in
  the graphics stack.

  xserver-common:
Installed: 2:1.19.6-1ubuntu4.7
Candidate: 2:1.19.6-1ubuntu4.7
  linux-generic:
Installed: 4.15.0.122.109
Candidate: 4.15.0.122.109

  Steps to reproduce on Ubuntu Server:
  1. Install Ubuntu 18.04 server edition in a VM, or other hardware without a 
physical graphics device
  2. Install the desktop with "sudo apt install ubuntu-desktop"
  3. Reboot
  4. Compile and run the attached file

  Steps to reproduce on Ubuntu Desktop:
  1. Install Ubuntu 18.04 desktop edition in a VM, or other hardware without a 
physical graphics device
  2. Remove the HWE packages with "apt remove *-hwe-18.04" and then "apt 
install xserver-xorg-core ubuntu-desktop xserver-xorg xserver-xorg-video-all 
xserver-xorg-input-all libgl1-mesa-dri libgl1-mesa-glx" to get things back to 
normal
  3. Reboot
  4. Compile and run the attached file

  Both examples produce:
  "Could not create GL context: BadValue (integer parameter out of range for 
operation)"

  For both cases, upgrading to (or staying on) the HWE stack allows
  creating the core 3.3 context successfully.

  
  Debugging:

  I've stepped all the way into libxcb for the context creation at
  src/glx.c:3258, with a call to
  "xcb_glx_create_context_attribs_arb_checked", but haven't managed to
  link this up to a received request in another process. The request is
  rejected with BadValue.

  BadVaue in this instance could mean one of two things according to GL spec:
  1. The GLX_RENDER_TYPE attribute is invalid
  2. An attribute or it's bitmask are not recognized.

  We can likely rule out 1 as GLX_RENDER_TYPE is correctly set to
  opengl. Option 2 allows looking at it at a higher level. SDL2 adds
  `GLX_CONTEXT_RELEASE_BEHAVIOUR_ARB=GLX_CONTEXT_RELEASE_BEHAVIOUR_FLUSH_ARB`
  to the attributes (at src/video/x11/SDL_x11opengl.c:720) by default
  when it detects the `GLX_ARB_context_flush_control` extension is
  present, which should be a no-op and the default setting. `glxinfo`
  and other gl functions all show that `GLX_ARB_context_flush_control`
  is present, but removing that usage from the attributes list (by
  removing lines 720 to 726 avoids the issue and we are given a valid GL
  context.

  Due to this, I think something in the graphics stack is rejecting the
  usage of GLX_ARB_context_flush_control, even though it's claiming to
  support it through other gl calls. The llvmpipe GL driver reports core
  support up to 3.3 as well, so this shouldn't be an issue. I also
  suspect it's simply something that's been fixed more recently, as
  installing the newer HWE versions of xorg (and the kernel) fixes the
  issue.

  
  I wouldn't expect to have to upgrade to the HWE stack to be able to get a 
working GL context this way, so I'm reporting this to check if it's a known 
issue or if there's a fix that can be made.

  The attached file depends on "libsdl2-dev" and can be compiled and run with:
  "g++ main.cpp -I/usr/include/SDL2 -lSDL2 -lGL && ./a.out"

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xorg 1:7.7+19ubuntu7.1
  ProcVersionSignature: Ubuntu 5.4.0-52.57~18.04.1-generic 5.4.65
  Uname: Linux 5.4.0-52-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.18
  Architecture: amd64
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  4 09:16:16 2020
  DistUpgraded: Fresh install
  DistroCodename: bionic
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, including running git bisection searches
  GraphicsCard:
   VMware SVGA II Adapter [15ad:0405] (prog-if 00 [VGA controller])
 Subsystem: VMware SVGA II Adapter [15ad:0405]
  InstallationDate: Installed on 2020-11-03 (0 days ago)
  InstallationMedia: Ubuntu-Server 18.04.5 LTS "Bionic Beaver" - Release amd64 
(20200806.1)
  Lsusb:
   Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
   Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  MachineType: innotek GmbH 

[Touch-packages] [Bug 1902853] Re: Failure to create core GL context with llvmpipe when using GLX_ARB_context_flush_control

2020-11-05 Thread Marc
I don't get the issue on Ubuntu 20.04 or 20.10 server or desktop

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1902853

Title:
  Failure to create core GL context with llvmpipe when using
  GLX_ARB_context_flush_control

Status in libsdl2 package in Ubuntu:
  Incomplete
Status in mesa package in Ubuntu:
  Incomplete

Bug description:
  When using llvmpipe on the non-HWE xorg version GL core context
  creation fails when using "GLX_ARB_context_flush_control" even though
  the driver reports that the extension is supported.

  Apologies if xorg is the wrong package here, this could be a libgl1
  -mesa-dri/glx bug instead, it's unclear to me where the fault lies in
  the graphics stack.

  xserver-common:
Installed: 2:1.19.6-1ubuntu4.7
Candidate: 2:1.19.6-1ubuntu4.7
  linux-generic:
Installed: 4.15.0.122.109
Candidate: 4.15.0.122.109

  Steps to reproduce on Ubuntu Server:
  1. Install Ubuntu 18.04 server edition in a VM, or other hardware without a 
physical graphics device
  2. Install the desktop with "sudo apt install ubuntu-desktop"
  3. Reboot
  4. Compile and run the attached file

  Steps to reproduce on Ubuntu Desktop:
  1. Install Ubuntu 18.04 desktop edition in a VM, or other hardware without a 
physical graphics device
  2. Remove the HWE packages with "apt remove *-hwe-18.04" and then "apt 
install xserver-xorg-core ubuntu-desktop xserver-xorg xserver-xorg-video-all 
xserver-xorg-input-all libgl1-mesa-dri libgl1-mesa-glx" to get things back to 
normal
  3. Reboot
  4. Compile and run the attached file

  Both examples produce:
  "Could not create GL context: BadValue (integer parameter out of range for 
operation)"

  For both cases, upgrading to (or staying on) the HWE stack allows
  creating the core 3.3 context successfully.

  
  Debugging:

  I've stepped all the way into libxcb for the context creation at
  src/glx.c:3258, with a call to
  "xcb_glx_create_context_attribs_arb_checked", but haven't managed to
  link this up to a received request in another process. The request is
  rejected with BadValue.

  BadVaue in this instance could mean one of two things according to GL spec:
  1. The GLX_RENDER_TYPE attribute is invalid
  2. An attribute or it's bitmask are not recognized.

  We can likely rule out 1 as GLX_RENDER_TYPE is correctly set to
  opengl. Option 2 allows looking at it at a higher level. SDL2 adds
  `GLX_CONTEXT_RELEASE_BEHAVIOUR_ARB=GLX_CONTEXT_RELEASE_BEHAVIOUR_FLUSH_ARB`
  to the attributes (at src/video/x11/SDL_x11opengl.c:720) by default
  when it detects the `GLX_ARB_context_flush_control` extension is
  present, which should be a no-op and the default setting. `glxinfo`
  and other gl functions all show that `GLX_ARB_context_flush_control`
  is present, but removing that usage from the attributes list (by
  removing lines 720 to 726 avoids the issue and we are given a valid GL
  context.

  Due to this, I think something in the graphics stack is rejecting the
  usage of GLX_ARB_context_flush_control, even though it's claiming to
  support it through other gl calls. The llvmpipe GL driver reports core
  support up to 3.3 as well, so this shouldn't be an issue. I also
  suspect it's simply something that's been fixed more recently, as
  installing the newer HWE versions of xorg (and the kernel) fixes the
  issue.

  
  I wouldn't expect to have to upgrade to the HWE stack to be able to get a 
working GL context this way, so I'm reporting this to check if it's a known 
issue or if there's a fix that can be made.

  The attached file depends on "libsdl2-dev" and can be compiled and run with:
  "g++ main.cpp -I/usr/include/SDL2 -lSDL2 -lGL && ./a.out"

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xorg 1:7.7+19ubuntu7.1
  ProcVersionSignature: Ubuntu 5.4.0-52.57~18.04.1-generic 5.4.65
  Uname: Linux 5.4.0-52-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.18
  Architecture: amd64
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  4 09:16:16 2020
  DistUpgraded: Fresh install
  DistroCodename: bionic
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, including running git bisection searches
  GraphicsCard:
   VMware SVGA II Adapter [15ad:0405] (prog-if 00 [VGA controller])
 Subsystem: VMware SVGA II Adapter [15ad:0405]
  InstallationDate: Installed on 2020-11-03 (0 days ago)
  InstallationMedia: Ubuntu-Server 18.04.5 LTS "Bionic Beaver" - Release amd64 
(20200806.1)
  Lsusb:
   Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
   Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  MachineType: innotek GmbH VirtualBox
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=
   LANG=C.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-52-generic 
root=/dev/mapper/ubuntu--vg-ubuntu--lv ro maybe-ubiquity
  Renderer: Software
  

[Touch-packages] [Bug 1902853] Re: Failure to create core GL context with llvmpipe when using GLX_ARB_context_flush_control

2020-11-05 Thread Marc
Ah, forgot 20.10 was now out. Will check that too :)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1902853

Title:
  Failure to create core GL context with llvmpipe when using
  GLX_ARB_context_flush_control

Status in libsdl2 package in Ubuntu:
  Incomplete
Status in mesa package in Ubuntu:
  Incomplete

Bug description:
  When using llvmpipe on the non-HWE xorg version GL core context
  creation fails when using "GLX_ARB_context_flush_control" even though
  the driver reports that the extension is supported.

  Apologies if xorg is the wrong package here, this could be a libgl1
  -mesa-dri/glx bug instead, it's unclear to me where the fault lies in
  the graphics stack.

  xserver-common:
Installed: 2:1.19.6-1ubuntu4.7
Candidate: 2:1.19.6-1ubuntu4.7
  linux-generic:
Installed: 4.15.0.122.109
Candidate: 4.15.0.122.109

  Steps to reproduce on Ubuntu Server:
  1. Install Ubuntu 18.04 server edition in a VM, or other hardware without a 
physical graphics device
  2. Install the desktop with "sudo apt install ubuntu-desktop"
  3. Reboot
  4. Compile and run the attached file

  Steps to reproduce on Ubuntu Desktop:
  1. Install Ubuntu 18.04 desktop edition in a VM, or other hardware without a 
physical graphics device
  2. Remove the HWE packages with "apt remove *-hwe-18.04" and then "apt 
install xserver-xorg-core ubuntu-desktop xserver-xorg xserver-xorg-video-all 
xserver-xorg-input-all libgl1-mesa-dri libgl1-mesa-glx" to get things back to 
normal
  3. Reboot
  4. Compile and run the attached file

  Both examples produce:
  "Could not create GL context: BadValue (integer parameter out of range for 
operation)"

  For both cases, upgrading to (or staying on) the HWE stack allows
  creating the core 3.3 context successfully.

  
  Debugging:

  I've stepped all the way into libxcb for the context creation at
  src/glx.c:3258, with a call to
  "xcb_glx_create_context_attribs_arb_checked", but haven't managed to
  link this up to a received request in another process. The request is
  rejected with BadValue.

  BadVaue in this instance could mean one of two things according to GL spec:
  1. The GLX_RENDER_TYPE attribute is invalid
  2. An attribute or it's bitmask are not recognized.

  We can likely rule out 1 as GLX_RENDER_TYPE is correctly set to
  opengl. Option 2 allows looking at it at a higher level. SDL2 adds
  `GLX_CONTEXT_RELEASE_BEHAVIOUR_ARB=GLX_CONTEXT_RELEASE_BEHAVIOUR_FLUSH_ARB`
  to the attributes (at src/video/x11/SDL_x11opengl.c:720) by default
  when it detects the `GLX_ARB_context_flush_control` extension is
  present, which should be a no-op and the default setting. `glxinfo`
  and other gl functions all show that `GLX_ARB_context_flush_control`
  is present, but removing that usage from the attributes list (by
  removing lines 720 to 726 avoids the issue and we are given a valid GL
  context.

  Due to this, I think something in the graphics stack is rejecting the
  usage of GLX_ARB_context_flush_control, even though it's claiming to
  support it through other gl calls. The llvmpipe GL driver reports core
  support up to 3.3 as well, so this shouldn't be an issue. I also
  suspect it's simply something that's been fixed more recently, as
  installing the newer HWE versions of xorg (and the kernel) fixes the
  issue.

  
  I wouldn't expect to have to upgrade to the HWE stack to be able to get a 
working GL context this way, so I'm reporting this to check if it's a known 
issue or if there's a fix that can be made.

  The attached file depends on "libsdl2-dev" and can be compiled and run with:
  "g++ main.cpp -I/usr/include/SDL2 -lSDL2 -lGL && ./a.out"

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xorg 1:7.7+19ubuntu7.1
  ProcVersionSignature: Ubuntu 5.4.0-52.57~18.04.1-generic 5.4.65
  Uname: Linux 5.4.0-52-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.18
  Architecture: amd64
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  4 09:16:16 2020
  DistUpgraded: Fresh install
  DistroCodename: bionic
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, including running git bisection searches
  GraphicsCard:
   VMware SVGA II Adapter [15ad:0405] (prog-if 00 [VGA controller])
 Subsystem: VMware SVGA II Adapter [15ad:0405]
  InstallationDate: Installed on 2020-11-03 (0 days ago)
  InstallationMedia: Ubuntu-Server 18.04.5 LTS "Bionic Beaver" - Release amd64 
(20200806.1)
  Lsusb:
   Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
   Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  MachineType: innotek GmbH VirtualBox
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=
   LANG=C.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-52-generic 
root=/dev/mapper/ubuntu--vg-ubuntu--lv ro maybe-ubiquity
  Renderer: Software
  SourcePackage: 

[Touch-packages] [Bug 1902853] Re: Failure to create core GL context with llvmpipe when using GLX_ARB_context_flush_control

2020-11-05 Thread Daniel van Vugt
I suggest 20.10, not 20.04 because only 20.10 and later has the latest
Mesa which needs testing before upstreaming the issue.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1902853

Title:
  Failure to create core GL context with llvmpipe when using
  GLX_ARB_context_flush_control

Status in libsdl2 package in Ubuntu:
  Incomplete
Status in mesa package in Ubuntu:
  Incomplete

Bug description:
  When using llvmpipe on the non-HWE xorg version GL core context
  creation fails when using "GLX_ARB_context_flush_control" even though
  the driver reports that the extension is supported.

  Apologies if xorg is the wrong package here, this could be a libgl1
  -mesa-dri/glx bug instead, it's unclear to me where the fault lies in
  the graphics stack.

  xserver-common:
Installed: 2:1.19.6-1ubuntu4.7
Candidate: 2:1.19.6-1ubuntu4.7
  linux-generic:
Installed: 4.15.0.122.109
Candidate: 4.15.0.122.109

  Steps to reproduce on Ubuntu Server:
  1. Install Ubuntu 18.04 server edition in a VM, or other hardware without a 
physical graphics device
  2. Install the desktop with "sudo apt install ubuntu-desktop"
  3. Reboot
  4. Compile and run the attached file

  Steps to reproduce on Ubuntu Desktop:
  1. Install Ubuntu 18.04 desktop edition in a VM, or other hardware without a 
physical graphics device
  2. Remove the HWE packages with "apt remove *-hwe-18.04" and then "apt 
install xserver-xorg-core ubuntu-desktop xserver-xorg xserver-xorg-video-all 
xserver-xorg-input-all libgl1-mesa-dri libgl1-mesa-glx" to get things back to 
normal
  3. Reboot
  4. Compile and run the attached file

  Both examples produce:
  "Could not create GL context: BadValue (integer parameter out of range for 
operation)"

  For both cases, upgrading to (or staying on) the HWE stack allows
  creating the core 3.3 context successfully.

  
  Debugging:

  I've stepped all the way into libxcb for the context creation at
  src/glx.c:3258, with a call to
  "xcb_glx_create_context_attribs_arb_checked", but haven't managed to
  link this up to a received request in another process. The request is
  rejected with BadValue.

  BadVaue in this instance could mean one of two things according to GL spec:
  1. The GLX_RENDER_TYPE attribute is invalid
  2. An attribute or it's bitmask are not recognized.

  We can likely rule out 1 as GLX_RENDER_TYPE is correctly set to
  opengl. Option 2 allows looking at it at a higher level. SDL2 adds
  `GLX_CONTEXT_RELEASE_BEHAVIOUR_ARB=GLX_CONTEXT_RELEASE_BEHAVIOUR_FLUSH_ARB`
  to the attributes (at src/video/x11/SDL_x11opengl.c:720) by default
  when it detects the `GLX_ARB_context_flush_control` extension is
  present, which should be a no-op and the default setting. `glxinfo`
  and other gl functions all show that `GLX_ARB_context_flush_control`
  is present, but removing that usage from the attributes list (by
  removing lines 720 to 726 avoids the issue and we are given a valid GL
  context.

  Due to this, I think something in the graphics stack is rejecting the
  usage of GLX_ARB_context_flush_control, even though it's claiming to
  support it through other gl calls. The llvmpipe GL driver reports core
  support up to 3.3 as well, so this shouldn't be an issue. I also
  suspect it's simply something that's been fixed more recently, as
  installing the newer HWE versions of xorg (and the kernel) fixes the
  issue.

  
  I wouldn't expect to have to upgrade to the HWE stack to be able to get a 
working GL context this way, so I'm reporting this to check if it's a known 
issue or if there's a fix that can be made.

  The attached file depends on "libsdl2-dev" and can be compiled and run with:
  "g++ main.cpp -I/usr/include/SDL2 -lSDL2 -lGL && ./a.out"

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xorg 1:7.7+19ubuntu7.1
  ProcVersionSignature: Ubuntu 5.4.0-52.57~18.04.1-generic 5.4.65
  Uname: Linux 5.4.0-52-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.18
  Architecture: amd64
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  4 09:16:16 2020
  DistUpgraded: Fresh install
  DistroCodename: bionic
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, including running git bisection searches
  GraphicsCard:
   VMware SVGA II Adapter [15ad:0405] (prog-if 00 [VGA controller])
 Subsystem: VMware SVGA II Adapter [15ad:0405]
  InstallationDate: Installed on 2020-11-03 (0 days ago)
  InstallationMedia: Ubuntu-Server 18.04.5 LTS "Bionic Beaver" - Release amd64 
(20200806.1)
  Lsusb:
   Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
   Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  MachineType: innotek GmbH VirtualBox
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=
   LANG=C.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-52-generic 

[Touch-packages] [Bug 1902853] Re: Failure to create core GL context with llvmpipe when using GLX_ARB_context_flush_control

2020-11-05 Thread Marc
I'll double-check on the latest 20.04 images today. I skipped that step
as I assumed, given the much newer HWE stack fixed the issue, that this
would be fixed on 20.04.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1902853

Title:
  Failure to create core GL context with llvmpipe when using
  GLX_ARB_context_flush_control

Status in libsdl2 package in Ubuntu:
  Incomplete
Status in mesa package in Ubuntu:
  Incomplete

Bug description:
  When using llvmpipe on the non-HWE xorg version GL core context
  creation fails when using "GLX_ARB_context_flush_control" even though
  the driver reports that the extension is supported.

  Apologies if xorg is the wrong package here, this could be a libgl1
  -mesa-dri/glx bug instead, it's unclear to me where the fault lies in
  the graphics stack.

  xserver-common:
Installed: 2:1.19.6-1ubuntu4.7
Candidate: 2:1.19.6-1ubuntu4.7
  linux-generic:
Installed: 4.15.0.122.109
Candidate: 4.15.0.122.109

  Steps to reproduce on Ubuntu Server:
  1. Install Ubuntu 18.04 server edition in a VM, or other hardware without a 
physical graphics device
  2. Install the desktop with "sudo apt install ubuntu-desktop"
  3. Reboot
  4. Compile and run the attached file

  Steps to reproduce on Ubuntu Desktop:
  1. Install Ubuntu 18.04 desktop edition in a VM, or other hardware without a 
physical graphics device
  2. Remove the HWE packages with "apt remove *-hwe-18.04" and then "apt 
install xserver-xorg-core ubuntu-desktop xserver-xorg xserver-xorg-video-all 
xserver-xorg-input-all libgl1-mesa-dri libgl1-mesa-glx" to get things back to 
normal
  3. Reboot
  4. Compile and run the attached file

  Both examples produce:
  "Could not create GL context: BadValue (integer parameter out of range for 
operation)"

  For both cases, upgrading to (or staying on) the HWE stack allows
  creating the core 3.3 context successfully.

  
  Debugging:

  I've stepped all the way into libxcb for the context creation at
  src/glx.c:3258, with a call to
  "xcb_glx_create_context_attribs_arb_checked", but haven't managed to
  link this up to a received request in another process. The request is
  rejected with BadValue.

  BadVaue in this instance could mean one of two things according to GL spec:
  1. The GLX_RENDER_TYPE attribute is invalid
  2. An attribute or it's bitmask are not recognized.

  We can likely rule out 1 as GLX_RENDER_TYPE is correctly set to
  opengl. Option 2 allows looking at it at a higher level. SDL2 adds
  `GLX_CONTEXT_RELEASE_BEHAVIOUR_ARB=GLX_CONTEXT_RELEASE_BEHAVIOUR_FLUSH_ARB`
  to the attributes (at src/video/x11/SDL_x11opengl.c:720) by default
  when it detects the `GLX_ARB_context_flush_control` extension is
  present, which should be a no-op and the default setting. `glxinfo`
  and other gl functions all show that `GLX_ARB_context_flush_control`
  is present, but removing that usage from the attributes list (by
  removing lines 720 to 726 avoids the issue and we are given a valid GL
  context.

  Due to this, I think something in the graphics stack is rejecting the
  usage of GLX_ARB_context_flush_control, even though it's claiming to
  support it through other gl calls. The llvmpipe GL driver reports core
  support up to 3.3 as well, so this shouldn't be an issue. I also
  suspect it's simply something that's been fixed more recently, as
  installing the newer HWE versions of xorg (and the kernel) fixes the
  issue.

  
  I wouldn't expect to have to upgrade to the HWE stack to be able to get a 
working GL context this way, so I'm reporting this to check if it's a known 
issue or if there's a fix that can be made.

  The attached file depends on "libsdl2-dev" and can be compiled and run with:
  "g++ main.cpp -I/usr/include/SDL2 -lSDL2 -lGL && ./a.out"

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xorg 1:7.7+19ubuntu7.1
  ProcVersionSignature: Ubuntu 5.4.0-52.57~18.04.1-generic 5.4.65
  Uname: Linux 5.4.0-52-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.18
  Architecture: amd64
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  4 09:16:16 2020
  DistUpgraded: Fresh install
  DistroCodename: bionic
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, including running git bisection searches
  GraphicsCard:
   VMware SVGA II Adapter [15ad:0405] (prog-if 00 [VGA controller])
 Subsystem: VMware SVGA II Adapter [15ad:0405]
  InstallationDate: Installed on 2020-11-03 (0 days ago)
  InstallationMedia: Ubuntu-Server 18.04.5 LTS "Bionic Beaver" - Release amd64 
(20200806.1)
  Lsusb:
   Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
   Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  MachineType: innotek GmbH VirtualBox
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=
   LANG=C.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: 

[Touch-packages] [Bug 1902853] Re: Failure to create core GL context with llvmpipe when using GLX_ARB_context_flush_control

2020-11-04 Thread Daniel van Vugt
I would suggest reporting the issue upstream but they will ask you to
test a newer version first. So please try live booting Ubuntu 20.10 from
USB (which includes Mesa 20.2) and tell us if it has the same problem:

  https://ubuntu.com/download/desktop

If the problem persists then please open a bug upstream at
https://gitlab.freedesktop.org/groups/mesa/-/issues and then tell us the
new issue ID.

** Package changed: xorg (Ubuntu) => mesa (Ubuntu)

** Also affects: libsdl2 (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: libsdl2 (Ubuntu)
   Status: New => Incomplete

** Changed in: mesa (Ubuntu)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1902853

Title:
  Failure to create core GL context with llvmpipe when using
  GLX_ARB_context_flush_control

Status in libsdl2 package in Ubuntu:
  Incomplete
Status in mesa package in Ubuntu:
  Incomplete

Bug description:
  When using llvmpipe on the non-HWE xorg version GL core context
  creation fails when using "GLX_ARB_context_flush_control" even though
  the driver reports that the extension is supported.

  Apologies if xorg is the wrong package here, this could be a libgl1
  -mesa-dri/glx bug instead, it's unclear to me where the fault lies in
  the graphics stack.

  xserver-common:
Installed: 2:1.19.6-1ubuntu4.7
Candidate: 2:1.19.6-1ubuntu4.7
  linux-generic:
Installed: 4.15.0.122.109
Candidate: 4.15.0.122.109

  Steps to reproduce on Ubuntu Server:
  1. Install Ubuntu 18.04 server edition in a VM, or other hardware without a 
physical graphics device
  2. Install the desktop with "sudo apt install ubuntu-desktop"
  3. Reboot
  4. Compile and run the attached file

  Steps to reproduce on Ubuntu Desktop:
  1. Install Ubuntu 18.04 desktop edition in a VM, or other hardware without a 
physical graphics device
  2. Remove the HWE packages with "apt remove *-hwe-18.04" and then "apt 
install xserver-xorg-core ubuntu-desktop xserver-xorg xserver-xorg-video-all 
xserver-xorg-input-all libgl1-mesa-dri libgl1-mesa-glx" to get things back to 
normal
  3. Reboot
  4. Compile and run the attached file

  Both examples produce:
  "Could not create GL context: BadValue (integer parameter out of range for 
operation)"

  For both cases, upgrading to (or staying on) the HWE stack allows
  creating the core 3.3 context successfully.

  
  Debugging:

  I've stepped all the way into libxcb for the context creation at
  src/glx.c:3258, with a call to
  "xcb_glx_create_context_attribs_arb_checked", but haven't managed to
  link this up to a received request in another process. The request is
  rejected with BadValue.

  BadVaue in this instance could mean one of two things according to GL spec:
  1. The GLX_RENDER_TYPE attribute is invalid
  2. An attribute or it's bitmask are not recognized.

  We can likely rule out 1 as GLX_RENDER_TYPE is correctly set to
  opengl. Option 2 allows looking at it at a higher level. SDL2 adds
  `GLX_CONTEXT_RELEASE_BEHAVIOUR_ARB=GLX_CONTEXT_RELEASE_BEHAVIOUR_FLUSH_ARB`
  to the attributes (at src/video/x11/SDL_x11opengl.c:720) by default
  when it detects the `GLX_ARB_context_flush_control` extension is
  present, which should be a no-op and the default setting. `glxinfo`
  and other gl functions all show that `GLX_ARB_context_flush_control`
  is present, but removing that usage from the attributes list (by
  removing lines 720 to 726 avoids the issue and we are given a valid GL
  context.

  Due to this, I think something in the graphics stack is rejecting the
  usage of GLX_ARB_context_flush_control, even though it's claiming to
  support it through other gl calls. The llvmpipe GL driver reports core
  support up to 3.3 as well, so this shouldn't be an issue. I also
  suspect it's simply something that's been fixed more recently, as
  installing the newer HWE versions of xorg (and the kernel) fixes the
  issue.

  
  I wouldn't expect to have to upgrade to the HWE stack to be able to get a 
working GL context this way, so I'm reporting this to check if it's a known 
issue or if there's a fix that can be made.

  The attached file depends on "libsdl2-dev" and can be compiled and run with:
  "g++ main.cpp -I/usr/include/SDL2 -lSDL2 -lGL && ./a.out"

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xorg 1:7.7+19ubuntu7.1
  ProcVersionSignature: Ubuntu 5.4.0-52.57~18.04.1-generic 5.4.65
  Uname: Linux 5.4.0-52-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.18
  Architecture: amd64
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Wed Nov  4 09:16:16 2020
  DistUpgraded: Fresh install
  DistroCodename: bionic
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, including running git bisection searches
  GraphicsCard:
   VMware SVGA II Adapter [15ad:0405] (prog-if 00 [VGA controller])
 Subsystem: VMware SVGA II Adapter