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

Crash with hybrid graphics with nvidia driver offload #129

Open
Flashwalker opened this issue Mar 16, 2023 · 0 comments
Open

Crash with hybrid graphics with nvidia driver offload #129

Flashwalker opened this issue Mar 16, 2023 · 0 comments
Labels

Comments

@Flashwalker
Copy link

Flashwalker commented Mar 16, 2023

Describe the bug
Crash with hybrid graphics with nvidia driver offload
If i'm using:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia PW_PRIME_RENDER_OFFLOAD=1

it crash.

Error output

>>> Error output: <<<
$ firejail \
  --env=__NV_PRIME_RENDER_OFFLOAD=1 \
  --env=__GLX_VENDOR_LIBRARY_NAME=nvidia \
  --env=PW_PRIME_RENDER_OFFLOAD=1 \
  --env=DESKTOPINTEGRATION=appimaged \
  --noprofile \
  --appimage MoonPlayer-4.1-x86_64.AppImage

Parent pid 102664, child pid 102665

** Warning: dropping all Linux capabilities and setting NO_NEW_PRIVS prctl **

Mounting appimage type 2
Warning: NVIDIA card detected, nogroups command ignored
Child process initialized in 65.37 ms
QQmlEngine::setContextForObject(): Object already has a QQmlContext
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
qrc:/moonplayer_qml/qml/main.qml:159:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/moonplayer_qml/qml/OpenUrlDialog.qml:37:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/moonplayer_qml/qml/TextInputDialog.qml:34:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/moonplayer_qml/qml/main.qml:111:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/moonplayer_qml/qml/MessageDialog.qml:36:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/moonplayer_qml/qml/ConsoleDialog.qml:66:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iris_drv_video.so
libva info: va_openDriver() returns -1
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 qt_Matrix;
};

uniform buf ubuf;

out vec2 qt_TexCoord;
in vec2 qt_VertexTexCoord;
in vec4 qt_VertexPosition;
in float _qt_order;

void main()
{
    qt_TexCoord = qt_VertexTexCoord;
    gl_Position = ubuf.qt_Matrix * qt_VertexPosition;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 matrix;
    float opacity;
};

uniform buf ubuf;

in vec4 vertexCoord;
out vec4 color;
in vec4 vertexColor;
in float _qt_order;

void main()
{
    gl_Position = ubuf.matrix * vertexCoord;
    color = vertexColor * ubuf.opacity;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 matrix;
    vec2 pixelSize;
    float opacity;
};

uniform buf ubuf;

in vec4 vertex;
in vec4 vertexOffset;
out vec4 color;
in vec4 vertexColor;
in float _qt_order;

void main()
{
    vec4 pos = ubuf.matrix * vertex;
    gl_Position = pos;
    if (!(vertexOffset.x == 0.0))
    {
        vec4 delta = ubuf.matrix[0] * vertexOffset.x;
        vec2 dir = (delta.xy * pos.w) - (pos.xy * delta.w);
        vec2 ndir = (ubuf.pixelSize * 0.5) * normalize(dir / ubuf.pixelSize);
        dir -= ((ndir * delta.w) * pos.w);
        float numerator = dot(dir, (ndir * pos.w) * pos.w);
        float scale = 0.0;
        if (numerator < 0.0)
        {
            scale = 1.0;
        }
        else
        {
            scale = min(1.0, numerator / dot(dir, dir));
        }
        gl_Position += (delta * scale);
    }
    if (!(vertexOffset.y == 0.0))
    {
        vec4 delta_1 = ubuf.matrix[1] * vertexOffset.y;
        vec2 dir_1 = (delta_1.xy * pos.w) - (pos.xy * delta_1.w);
        vec2 ndir_1 = (ubuf.pixelSize * 0.5) * normalize(dir_1 / ubuf.pixelSize);
        dir_1 -= ((ndir_1 * delta_1.w) * pos.w);
        float numerator_1 = dot(dir_1, (ndir_1 * pos.w) * pos.w);
        float scale_1 = 0.0;
        if (numerator_1 < 0.0)
        {
            scale_1 = 1.0;
        }
        else
        {
            scale_1 = min(1.0, numerator_1 / dot(dir_1, dir_1));
        }
        gl_Position += (delta_1 * scale_1);
    }
    color = vertexColor * ubuf.opacity;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 qt_Matrix;
};

uniform buf ubuf;

out vec2 qt_TexCoord;
in vec2 qt_VertexTexCoord;
in vec4 qt_VertexPosition;
in float _qt_order;

void main()
{
    qt_TexCoord = qt_VertexTexCoord;
    gl_Position = ubuf.qt_Matrix * qt_VertexPosition;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 qt_Matrix;
};

uniform buf ubuf;

out vec2 qt_TexCoord;
in vec2 qt_VertexTexCoord;
in vec4 qt_VertexPosition;
in float _qt_order;

void main()
{
    qt_TexCoord = qt_VertexTexCoord;
    gl_Position = ubuf.qt_Matrix * qt_VertexPosition;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 matrix;
    vec2 textureScale;
    vec4 color;
    float alphaMin;
    float alphaMax;
    float fontScale;
    vec4 vecDelta;
};

uniform buf ubuf;

out vec2 sampleCoord;
in vec2 tCoord;
in vec4 vCoord;
out vec3 sampleFarLeft;
out vec3 sampleNearLeft;
out vec3 sampleNearRight;
out vec3 sampleFarRight;
in float _qt_order;

void main()
{
    sampleCoord = tCoord * ubuf.textureScale;
    gl_Position = ubuf.matrix * vCoord;
    vec3 wDelta = ubuf.vecDelta.xyw * gl_Position.w;
    vec3 farLeft = vCoord.xyw - (wDelta * 0.666999995708465576171875);
    vec3 nearLeft = vCoord.xyw - (wDelta * 0.333000004291534423828125);
    vec3 nearRight = vCoord.xyw + (wDelta * 0.333000004291534423828125);
    vec3 farRight = vCoord.xyw + (wDelta * 0.666999995708465576171875);
    vec2 scale = ubuf.textureScale / vec2(ubuf.fontScale);
    vec2 base = sampleCoord - (scale * vCoord.xy);
    sampleFarLeft = vec3((base * farLeft.z) + (scale * farLeft.xy), farLeft.z);
    sampleNearLeft = vec3((base * nearLeft.z) + (scale * nearLeft.xy), nearLeft.z);
    sampleNearRight = vec3((base * nearRight.z) + (scale * nearRight.xy), nearRight.z);
    sampleFarRight = vec3((base * farRight.z) + (scale * farRight.xy), farRight.z);
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 matrix;
    float opacity;
};

uniform buf ubuf;

in vec4 vertexCoord;
out vec4 color;
in vec4 vertexColor;
in float _qt_order;

void main()
{
    gl_Position = ubuf.matrix * vertexCoord;
    color = vertexColor * ubuf.opacity;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 matrix;
    vec2 pixelSize;
    float opacity;
};

uniform buf ubuf;

in vec4 vertex;
in vec4 vertexOffset;
out vec4 color;
in vec4 vertexColor;
in float _qt_order;

void main()
{
    vec4 pos = ubuf.matrix * vertex;
    gl_Position = pos;
    if (!(vertexOffset.x == 0.0))
    {
        vec4 delta = ubuf.matrix[0] * vertexOffset.x;
        vec2 dir = (delta.xy * pos.w) - (pos.xy * delta.w);
        vec2 ndir = (ubuf.pixelSize * 0.5) * normalize(dir / ubuf.pixelSize);
        dir -= ((ndir * delta.w) * pos.w);
        float numerator = dot(dir, (ndir * pos.w) * pos.w);
        float scale = 0.0;
        if (numerator < 0.0)
        {
            scale = 1.0;
        }
        else
        {
            scale = min(1.0, numerator / dot(dir, dir));
        }
        gl_Position += (delta * scale);
    }
    if (!(vertexOffset.y == 0.0))
    {
        vec4 delta_1 = ubuf.matrix[1] * vertexOffset.y;
        vec2 dir_1 = (delta_1.xy * pos.w) - (pos.xy * delta_1.w);
        vec2 ndir_1 = (ubuf.pixelSize * 0.5) * normalize(dir_1 / ubuf.pixelSize);
        dir_1 -= ((ndir_1 * delta_1.w) * pos.w);
        float numerator_1 = dot(dir_1, (ndir_1 * pos.w) * pos.w);
        float scale_1 = 0.0;
        if (numerator_1 < 0.0)
        {
            scale_1 = 1.0;
        }
        else
        {
            scale_1 = min(1.0, numerator_1 / dot(dir_1, dir_1));
        }
        gl_Position += (delta_1 * scale_1);
    }
    color = vertexColor * ubuf.opacity;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 qt_Matrix;
};

uniform buf ubuf;

out vec2 qt_TexCoord;
in vec2 qt_VertexTexCoord;
in vec4 qt_VertexPosition;
in float _qt_order;

void main()
{
    qt_TexCoord = qt_VertexTexCoord;
    gl_Position = ubuf.qt_Matrix * qt_VertexPosition;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 qt_Matrix;
};

uniform buf ubuf;

out vec2 qt_TexCoord;
in vec2 qt_VertexTexCoord;
in vec4 qt_VertexPosition;
in float _qt_order;

void main()
{
    qt_TexCoord = qt_VertexTexCoord;
    gl_Position = ubuf.qt_Matrix * qt_VertexPosition;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state
Failed to compile shader: 
Source was:
#version 150

struct buf
{
    mat4 qt_Matrix;
};

uniform buf ubuf;

out vec2 qt_TexCoord;
in vec2 qt_VertexTexCoord;
in vec4 qt_VertexPosition;
in float _qt_order;

void main()
{
    qt_TexCoord = qt_VertexTexCoord;
    gl_Position = ubuf.qt_Matrix * qt_VertexPosition;
    gl_Position.z = _qt_order * gl_Position.w;
}


Failed to build graphics pipeline state

Parent is shutting down, bye...
AppImage detached

To Reproduce
Steps to reproduce the behavior:

  1. boot in hybrid graphics mode
  2. start firejail --env=__NV_PRIME_RENDER_OFFLOAD=1 --env=__GLX_VENDOR_LIBRARY_NAME=nvidia --env=PW_PRIME_RENDER_OFFLOAD=1 --env=DESKTOPINTEGRATION=appimaged --noprofile --appimage MoonPlayer-4.1-x86_64.AppImage

System information (please complete the following information):

  • OS: Ubuntu 22.04 Linux-x86_64 6.2
  • Graphic card: GTX 1050
  • NVIDIA Driver Version: 470.161.03 or 525.85.05
  • X.Org version: 1.21.1.3

Additional context
v3.7 not crash

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

No branches or pull requests

1 participant