Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glx_blur_dst ERROR : GL_INVALID_ENUM #98

Closed
zeroryuki opened this issue Jan 29, 2019 · 9 comments
Closed

glx_blur_dst ERROR : GL_INVALID_ENUM #98

zeroryuki opened this issue Jan 29, 2019 · 9 comments

Comments

@zeroryuki
Copy link

Platform

Kali GNU/Linux Rolling 2018.1

GPU, drivers, and screen setup

name of display: :1
display: :1  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) Ivybridge Mobile  (0x166)
    Version: 17.2.5
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.2
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL core profile version string: 4.2 (Core Profile) Mesa 17.2.5
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 17.2.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.2.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Environment

BSPWM

Compton version

**Version:** v5-rc4-25-g4881de9

### Extensions:

* Name Pixmap: Yes
* Shape: Yes
* XRandR: Yes
* Present: Present

### Misc:

* Use Overlay: Yes

Compton configuration:

backend = "glx";


glx-no-stencil = true;

glx-no-rebind-pixmap = true;

glx-swap-method = 2;

shadow = true;
shadow-radius = 5;
shadow-offset-x = -5;
shadow-offset-y = -5;
shadow-opacity = 0.5;

shadow-exclude = [
    "name = 'Notification'",
    "name *= 'compton'",
    "name *= 'Chromium'",
    "name *= 'Chrome'"
];
shadow-ignore-shaped = false;
inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
opacity-rule = [
        "99:class_g = 'Notification'",
        "95:class_g = 'Gnome-terminal' && focused",
        "75:class_g = 'Gnome-terminal' && !focused"
];
inactive-dim = 0.2;
blur-background = true;
blur-background-frame = true;
blur-kern = "7x7box"
blur-background-fixed = true;
blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'"
];

fading = true;
fade-delta = 4;
fade-in-step = 0.03;
fade-out-step = 0.03;
no-fading-openclose = true;
fade-exclude = [ ];
mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
detect-rounded-corners = true;

detect-client-opacity = true;

refresh-rate = 60;

vsync = "opengl-swc";

dbe = true;

sw-opti = true;

unredir-if-possible = true;
focus-exclude = [ ];

detect-transient = true;
detect-client-leader = true;


wintypes:
{
    tooltip =
    {
        fade = true;
        shadow = false;
        opacity = 0.75;
        focus = true;
    };
};

Steps of reproduction

  1. Run compton with my config file without -b flag

Current Behavior

  1. Blur effect are working, the only thing is the error message not stopping
  2. CPU temp keep increasing when run with this setting
@yshui
Copy link
Owner

yshui commented Jan 29, 2019

@zeroryuki Your mesa might be too old. You can find out which GL function is causing the error by using apitrace.

I will see if I can reproduce this when I have access to my intel laptop.

@zeroryuki
Copy link
Author

this is what i get from apitrace

glStringMarkerGREMEDY(len = 87, string = "[ 30/01/2019 01:22:47.920 glx_blur_dst ERROR ] GLX error at line 1138: GL_INVALID_ENUM

@yshui
Copy link
Owner

yshui commented Jan 29, 2019

@zeroryuki If you double click on that frame, then one of the calls in that frame will be marked with a beetle. That is the failing call.

@yshui
Copy link
Owner

yshui commented Jan 29, 2019

@zeroryuki I can totally reproduce this bug. Will investigate.

@yshui
Copy link
Owner

yshui commented Jan 29, 2019

I think this bug is inherited from before the forked. The errors have always been there, but are hidden behind debug build options, thus never discovered.

@zeroryuki
Copy link
Author

zeroryuki commented Jan 29, 2019

@yshui i have tried using tryone144 improved_fbo branch for temporary work, and as u said, it just make the error message gone and hidden. My cpu temp still high, got to change blur-kern = "5x5box", and my cpu is normal again.

note:
this is the only code i add to opengl.h and replace gl_check_err to glx_check_err(ps)

static inline const char *
glx_dump_err_str(GLenum err) {
  switch (err) {
    CASESTRRET(GL_NO_ERROR);
    CASESTRRET(GL_INVALID_ENUM);
    CASESTRRET(GL_INVALID_VALUE);
    CASESTRRET(GL_INVALID_OPERATION);
    CASESTRRET(GL_INVALID_FRAMEBUFFER_OPERATION);
    CASESTRRET(GL_OUT_OF_MEMORY);
    CASESTRRET(GL_STACK_UNDERFLOW);
    CASESTRRET(GL_STACK_OVERFLOW);
  }

  return NULL;
}

/**
 * Check for GLX error.
 *
 * http://blog.nobel-joergensen.com/2013/01/29/debugging-opengl-using-glgeterror/
 */
static inline void
glx_check_err_(session_t *ps, const char *func, int line) {
  if (!ps->psglx->context) return;

  GLenum err = GL_NO_ERROR;

  while (GL_NO_ERROR != (err = glGetError())) {
    print_timestamp(ps);
    printf("%s():%d: GLX error ", func, line);
    const char *errtext = glx_dump_err_str(err);
    if (errtext) {
      printf_dbg("%s\n", errtext);
    }
    else {
      printf_dbg("%d\n", err);
    }
  }
}

#define glx_check_err(ps) glx_check_err_(ps, __func__, __LINE__)
#else
#define glx_check_err(ps) ((void) 0)
#endif

@yshui
Copy link
Owner

yshui commented Jan 29, 2019

@zeroryuki Latest next branch should fix the errors. But I don't think CPU usage is related to this.

blur-kern = "7x7box" is pretty heavy and would probably require a more powerful GPU.

@zeroryuki
Copy link
Author

@yshui your latest commit fixed the issue. yeah for that blur-kern, I've been using it on old compton, never saw any temp increase. thats not a big issue for me. thanks for your work

@yshui yshui closed this as completed Jan 30, 2019
@yshui
Copy link
Owner

yshui commented Jan 30, 2019

@zeroryuki If you think the CPU usage increase is a regression, it would be helpful for us if you can figure out what is causing the increase by using tools like perf. Also I think it is better to open a new issue for the CPU usage increase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants