Open ldesousa opened 1 week ago
Yes, this looks look like a GPU drivers problem. As said above nixGL should fix that. https://geospatial-nix.today/ has built in support for nixGL (enable openGL in OTHER tab).
I got the following set-up from geospatial-nix:
geopkgs = inputs.geonix.packages.${pkgs.system};
in {
packages = [
geopkgs.gdal-minimal
];
applications.qgis = {
enable = true;
package = geopkgs.qgis;
withGrass = false;
pythonPackages = p: [ ];
plugins = p: [ ];
};
nixgl.enable = true;
}
When I start the shell some kind of massive compilation starts, it goes on for several hours until it exhausts RAM and crashes. I have 16 GB on chip plus 8 GB in swap.
Is there any alternative?
When I start the shell some kind of massive compilation starts, it goes on for several hours until it exhausts RAM and crashes. I have 16 GB on chip plus 8 GB in swap.
There should be no compilation. Everything should be downloaded from geospatial-nix binary cache. Did you accept it during the first start of geospatial-nix environment (Nix is asking few Yes/No questions) ?
Can we close this issue now ?
There should be no compilation. Everything should be downloaded from geospatial-nix binary cache. Did you accept it during the first start of geospatial-nix environment (Nix is asking few Yes/No questions) ?
I did not get any question from Nix. Is there any flag or parameter I could use to prevent compilation?
You can try to remove ~/local/share/nix/trusted-settings.json
file and run nix command again.
Also, you can try to use --accept-flake-config
flag.
You can try to remove
~/local/share/nix/trusted-settings.json
file and run nix command again.Also, you can try to use
--accept-flake-config
flag.
I just tried both things, but Nix still goes into compilations (see below). Is there any way to limit the number of cores and the RAM the compiler uses?
$ rm ./.local/share/nix/trusted-settings.json
$ nix profile install github:imincik/my-geospatial-nix-flake#qgis --accept-flake-config
warning: ignoring untrusted substituter 'https://geonix.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
warning: ignoring the client-specified setting 'trusted-public-keys', because it is a restricted setting and you are not a trusted user
[2/0/3 built] building qgis-unwrapped-3.38.2 (buildPhase): [592/9784] Building CXX object src/providers/pdal/CMakeFiles/pdal_wrench.dir/__/__/__/external/pda
warning: ignoring untrusted substituter 'https://geonix.cachix.org', you are not a trusted user. warning: ignoring the client-specified setting 'trusted-public-keys', because it is a restricted setting and you are not a trusted user
That's the issue. You are not trusted Nix user. Let me check how to fix it on Ubuntu.
@ldesousa
warning: ignoring untrusted substituter 'https://geonix.cachix.org', you are not a trusted user. warning: ignoring the client-specified setting 'trusted-public-keys', because it is a restricted setting and you are not a trusted user
That's the issue. You are not trusted Nix user. Let me check how to fix it on Ubuntu.
Add yourself as user to /etc/nix/nix.conf
.
trusted-users = <USERNAME>
and restart nix-daemon sudo systemctl restart nix-daemon.service
I expanded the Swap file quite a good deal and the compilation succeeded. At some point it took 22 GB of RAM. However, I still get the same exception when I start QGis (see below).
In the meantime I will add myself to the trusted users.
$ qgis
(process:105355): Gtk-WARNING **: 10:16:49.274: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: 10:16:49.275: Failed to load module "xapp-gtk3-module"
Gtk-Message: 10:16:49.299: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:16:49.299: Failed to load module "canberra-gtk-module"
Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 4.3, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 0, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize 0, samples 1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::CompatibilityProfile)
Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 4.3, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 0, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize 0, samples 1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::CompatibilityProfile)
Fatal: Could not initialize GLX
QGIS died on signal -1Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No thread selected
No stack.
gdb returned 256
[1]+ Aborted (core dumped) qgis
I expanded the Swap file quite a good deal and the compilation succeeded. At some point it took 22 GB of RAM. However, I still get the same exception when I start QGis (see below).
In the meantime I will add myself to the trusted users.
$ qgis (process:105355): Gtk-WARNING **: 10:16:49.274: Locale not supported by C library. Using the fallback 'C' locale. Gtk-Message: 10:16:49.275: Failed to load module "xapp-gtk3-module" Gtk-Message: 10:16:49.299: Failed to load module "canberra-gtk-module" Gtk-Message: 10:16:49.299: Failed to load module "canberra-gtk-module" Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 4.3, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 0, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize 0, samples 1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::CompatibilityProfile) Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 4.3, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 0, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize 0, samples 1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::CompatibilityProfile) Fatal: Could not initialize GLX QGIS died on signal -1Could not attach to process. If your uid matches the uid of the target process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf ptrace: Operation not permitted. No thread selected No stack. gdb returned 256 [1]+ Aborted (core dumped) qgis
That's the issue with GPU driver which should be fixed using nixGL .
Describe the bug
QGis does not start, reporting an exception in the command line. Both from the main and from "unstable".
Steps To Reproduce
Expected behavior
The programme should start without exceptions.
Additional context
Nix 2.24.5 on Ubuntu 24.04.
Notify maintainers
@imincik @l0b0 @nialov @sikmir @willcohen @lsix
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.