Sorry, yet another offload mode post… I didn’t find the solution in others posts
Here the output of Lutris in Offload mode:
[eyome@nixos:~]$ nvidia-offload lutris
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 150 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 50
Current serial number in output stream: 51
2023-05-01 20:59:14,081: ['glxinfo', '-B'] command failed: Command '['glxinfo', '-B']' returned non-zero exit status 1.
2023-05-01 20:59:14,081: No available glxinfo output
2023-05-01 20:59:14,082: Invalid glxinfo received
2023-05-01 20:59:14,967: Starting Lutris 0.5.12
2023-05-01 20:59:15,084: glxinfo is not available on your system, unable to detect driver version
2023-05-01 20:59:15,084: GPU: 8086:0166 17AA:21F5 (i915 drivers)
MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete
(lutris:2675): Gtk-CRITICAL **: 20:59:15.299: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
2023-05-01 20:59:15,560: Startup complete
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 150 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 50
Current serial number in output stream: 51
2023-05-01 20:59:44,722: ['glxinfo', '-B'] command failed: Command '['glxinfo', '-B']' returned non-zero exit status 1.
2023-05-01 20:59:44,722: No available glxinfo output
MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete
It seems my Nvidia card is not recognize.
Here my configuration.nix:
## Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
#let
# nix-software-center = (import (pkgs.fetchFromGitHub {
# owner = "vlinkz";
# repo = "nix-software-center";
# rev = "0.1.2";
# sha256 = "xiqF1mP8wFubdsAQ1BmfjzCgOD3YZf7EGWl9i69FTls=";
# })) {};
#in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./nvidia.nix
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
# boot.loader.grub.useOSProber = true;
# Enable ntfs partition
boot.supportedFilesystems = [ "ntfs" ];
system.fsPackages = [ pkgs.ntfs3g ];
fileSystems."/mnt/Commune" =
{ device = "/dev/disk/by-uuid/688BFB195753AE87";
fsType = "ntfs3";
options = ["force" "rw" "uid=1000" "nofail"];
};
networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Paris";
# Select internationalisation properties.
i18n.defaultLocale = "fr_FR.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "fr_FR.UTF-8";
LC_IDENTIFICATION = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MONETARY = "fr_FR.UTF-8";
LC_NAME = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.UTF-8";
LC_TIME = "fr_FR.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "fr";
xkbVariant = "";
};
# Configure console keymap
console.keyMap = "fr";
# Enable CUPS to print documents.
services.printing.enable = true;
services.avahi.enable = true;
services.avahi.nssmdns = true;
# for a WiFi printer
services.avahi.openFirewall = true;
# Enable scanner
services.saned.enable = true;
hardware.sane.enable = true;
hardware.sane.openFirewall = true;
services.ipp-usb.enable = true;
hardware.sane.extraBackends = [ pkgs.sane-airscan ];
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.eyome = {
isNormalUser = true;
description = "eyome";
extraGroups = [ "networkmanager" "wheel" "scanners" "lp" ];
packages = with pkgs; [
amberol
bottles
curtail
dino
drawing
firefox
fragments
fuse
gnomeExtensions.gsconnect
gnome.gnome-boxes
gnome-firmware
gnome-frog
gnome.gnome-software
gnome.gnome-tweaks
kodi
libreoffice-fresh
lutris
material-design-icons
mesa
mousai
neofetch
nix-diff
nixos-option
# nix-software-center
noto-fonts-emoji
ntfs3g
# rustdesk
sane-airscan
shortwave
ungoogled-chromium
];
};
# Enabled Gsconnect
programs.kdeconnect = {
enable = true;
package = pkgs.gnomeExtensions.gsconnect;
};
# Enabled Flatpak
services.flatpak.enable = true;
# Enabled Fwupd
services.fwupd.enable = true;
# Gnome paquets exlusion
environment.gnome.excludePackages = [ pkgs.gnome-tour pkgs.gnome.geary ];
environment.systemPackages = [
];
# Others paquets exlusion
services.xserver.excludePackages = [ pkgs.xterm ];
# Enable virtualisation
virtualisation.libvirtd.enable = true;
# Experimental paquet inclusion
nix.extraOptions = ''experimental-features = nix-command flakes'';
# Enable automatic login for the user.
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "eyome";
# Workaround for GNOME autologin
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable OpenGL for 32-bit programs such as in Wine
hardware.opengl.driSupport32Bit = true;
# NVIDIA drivers
hardware.nvidia.modesetting.enable = true;
hardware.opengl.enable = true;
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment?
}
Here my Nvidia.nix:
{ pkgs, ... }:
let
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec "$@"
'';
in {
environment.systemPackages = [ nvidia-offload ];
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.prime = {
offload.enable = true;
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
intelBusId = "PCI:0:2:0";
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
nvidiaBusId = "PCI:1:0:0";
};
}
And here my lspci:
[nix-shell:~]$ lspci
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 7 Series/C210 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1000M] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
02:00.0 System peripheral: Ricoh Co Ltd MMC/SD Host Controller (rev 08)
02:00.3 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 PCIe IEEE 1394 Controller (rev 04)
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34)
Could someone help me?..