Hi. I just updated my system from 24.05 to 24.11 using the below commands:
sudo nix-channel --add https://channels.nixos.org/nixos-24.11 nixos
sudo nixos-rebuild switch --upgrade
sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
sudo nix-channel --update
sudo nixos-rebuild switch --upgrade
There was a few warning while I was upgrading like renamings and etc. so I updated my configuration and rebuilt for one more time. I rebooted my system a few times after upgrading. I use Hyprland primarily but same issues happen on GNOME too. I have an NVIDIA GPU and Intel CPU:
unitythemaker@blazingfast ~> nix-shell -p vulkan-tools
[nix-shell:~]$ vkcube --gpu_number 0
Selected GPU 0: Intel(R) UHD Graphics (TGL GT1), type: IntegratedGpu
[nix-shell:~]$ vkcube --gpu_number 1
Selected GPU 1: NVIDIA GeForce RTX 3050 Laptop GPU, type: DiscreteGpu
[nix-shell:~]$ vkcube --gpu_number 2
Selected GPU 2: llvmpipe (LLVM 18.1.8, 256 bits), type: Cpu
[nix-shell:~]$ vkcube --gpu_number 3
GPU 3 specified is not present, GPU count = 3
Specified GPU number is not present
Now I am facing issues with some applications. I will just provide the output of them:
pavucontrol
pavucontrol output
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:763: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:794: FINISHME: support more multi-planar formats with DRM modifiers
Gdk-Message: 22:09:33.088: Error 71 (Protocol error) dispatching to Wayland display.
zed-editor
zeditor --foreground (zed-editor)
[2024-12-03T22:10:52+03:00 ERROR git] Error { code: -9, klass: 4, message: "reference 'refs/heads/main' not found" }
wp_linux_drm_syncobj_manager_v1#44: error 0: Surface already has a syncobj attached
[2024-12-03T22:10:52+03:00 ERROR zed::reliability] {
"thread": "main",
"payload": "called `Result::unwrap()` on an `Err` value: ERROR_SURFACE_LOST_KHR",
"location_data": {
"file": "/build/zed-editor-0.163.2-vendor/blade-graphics-0.5.0/src/vulkan/init.rs",
"line": 930
},
"backtrace": [
"core::panicking::panic_fmt",
"core::result::unwrap_failed",
"blade_graphics::hal::init::<impl blade_graphics::hal::Context>::resize",
"gpui::platform::blade::blade_renderer::BladeRenderer::new",
"gpui::platform::linux::wayland::window::WaylandWindow::new",
"<gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::open_window",
"gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::open_window",
"gpui::window::Window::new",
"gpui::app::async_context::AsyncAppContext::open_window",
"workspace::Workspace::new_local::{{closure}}::{{closure}}",
"async_task::raw::RawTask<F,T,S,M>::run",
"<gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::run",
"gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run",
"gpui::app::App::run",
"zed::main",
"std::sys::backtrace::__rust_begin_short_backtrace",
"std::rt::lang_start::{{closure}}",
"std::rt::lang_start_internal",
"main",
"__libc_start_call_main",
"__libc_start_main_alias_2",
"_start"
],
"app_version": "0.163.2",
"release_channel": "Zed",
"os_name": "Linux Wayland",
"os_version": "nixos 24.11",
"architecture": "x86_64",
"panicked_on": 1733253052504,
"system_id": "f0b5ae4c-f098-4350-8796-98c1a774beca",
"installation_id": "6b0cae92-ad57-42a8-a6a9-4ec65232a595",
"session_id": "99c802fe-2f30-4732-949c-b12a099da792"
}
Extra notes:
- uncommenting
#environment.sessionVariables.GSK_RENDERER = "opengl";
line makes pavucontrol work but not zed-editor. - vkcube works without any issues as you can see above.
I tried playing with some options but here is my /etc/nixos/configuration.nix
with more focus on graphics related things:
# 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, lib, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
unstable-small = import <nixos-unstable-small> { config = { allowUnfree = true; }; };
in {
imports =
[ # Include the results of the hardware scan.
<home-manager/nixos>
./hardware-configuration.nix
./zapret.nix
];
specialisation = {
#on-the-go.configuration = {
# system.nixos.tags = [ "on-the-go" ];
# hardware.nvidia = {
# prime.offload.enable = lib.mkForce true;
# prime.offload.enableOffloadCmd = lib.mkForce true;
# prime.sync.enable = lib.mkForce false;
# };
#};
};
nix.settings.auto-optimise-store = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
// ...
# 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;
programs.hyprland = {
# Install the packages from nixpkgs
enable = true;
# Whether to enable XWayland
xwayland.enable = true;
};
// ...
# Enable OpenGL
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
vaapiVdpau
intel-media-driver
libvdpau-va-gl
nvidia-vaapi-driver
];
};
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = true;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
#prime = {
# sync.enable = true;
# # Make sure to use the correct Bus ID values for your system!
# intelBusId = "PCI:0:2:0";
# nvidiaBusId = "PCI:1:0:0";
# # amdgpuBusId = "PCI:54:0:0"; For AMD GPU
#};
};
// ...
# Enable sound with pipewire.
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;
};
users.users.unitythemaker = {
isNormalUser = true;
description = "...";
extraGroups = [ "networkmanager" "wheel" "docker" "wireshark" "kvm" "adbusers" "dialout" ];
shell = pkgs.fish;
packages = with pkgs; [
// ...
];
};
home-manager.useUserPackages = true;
home-manager.users.unitythemaker = { pkgs, ... }: {
programs.fish.enable = true;
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "24.05";
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
gtk = {
enable = true;
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
font = {
name = "Ubuntu Nerd Font";
package = pkgs.ubuntu_font_family;
};
theme = {
name = "adw-gtk3-dark";
package = pkgs.adw-gtk3;
};
iconTheme = {
name = "Adwaita";
package = pkgs.adwaita-icon-theme;
};
cursorTheme = {
name = "Bibata Modern Classic";
package = pkgs.bibata-cursors;
size = 24;
};
};
qt = {
enable = true;
platformTheme.name = "qtct";
};
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
// ...
# Environment variables
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.sessionVariables.QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
environment.sessionVariables.SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "0";
#environment.sessionVariables.GSK_RENDERER = "opengl";
// ...
system.stateVersion = "24.05"; # Did you read the comment?
}