eljamm
August 11, 2024, 4:24pm
21
I’m pretty sure this does support Wayland as it’s working for me on Gnome. What issues are you having, exactly? and what DE are you using?
Also, I tested now using:
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.open = true;
And it did not remove the nvidia-*
commands.
1 Like
Nika03
August 11, 2024, 6:01pm
22
KDE Plasma 6.0.5
Windows that I have autostarting, start. DE is not present. Resolution isn’t right.
eljamm:
Also, I tested now using:
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.open = true;
And it did not remove the nvidia-*
commands.
Doesn’t help in my case. Adding hardware.nvidia.open = true;
still yields aforementioned problem when running KDE in Wayland. Only time that KDE ran in Wayland was with nvidia-open
driver.
eljamm
August 11, 2024, 6:24pm
23
With the non-open drivers, try these suggestion from this post :
hardware.nvidia.powerManagement.enable = true;
boot.initrd.kernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" "nvidia_modeset" ];
Note: Config-wise, it’s enough to just add the above and rebuild, but you might also need to do this before you reboot:
sudo systemctl enable nvidia-suspend.service nvidia-hibernate.service
Don’t know if this can fix your problems with KDE, but it’s worth trying.
TLATER
August 11, 2024, 6:44pm
24
Can you share your full config? Wayland, nvidia-settings
, 6.10 kernel support all should be working on 555.58.02
- I’m running that kernel/driver version too.
The fact that nvidia-settings is missing is very suspicious - the config is dead simple , the only way this doesn’t work is if you never evaluate the nvidia module or explicitly disable it. Since you clearly didn’t do the latter, there’s probably something seriously wrong with your config.
eljamm
August 11, 2024, 7:00pm
25
From this line , if services.xserver.videoDrivers
does not contain "nvidia"
, then nvidiaEnabled
evaluates to false
, thus nvidia_x11
evaluates to null
. That’s why nvidia_x11.settings
is not installed in the line you referenced.
If this is the case, maybe this will work?
services.xserver.videoDrivers = [
"nvidia"
"nvidia-open"
];
1 Like
TLATER
August 11, 2024, 7:13pm
26
More specifically, the whole nvidia config is disabled .
That said, does nvidia-open
in videoDrivers
even do anything? Grepping for that string in nixpkgs results in no relevant results. AIUI, the way to enable the open drivers is hardware.nvidia.open
, and we’re just dreaming up a new videoDrivers
string that doesn’t exist for some reason. Without hardware.nvidia.open
you’re missing some important settings anyway, so broken graphics is kinda expected.
1 Like
eljamm
August 11, 2024, 7:40pm
27
You’re right, "nvidia-open"
doesn’t seem to be a thing, in which case, nouveau
could have been used instead of the open Nvidia drivers since the latter’s config was disabled and that’s why there were no problems with Plasma 6 and Wayland.
Nika03
August 12, 2024, 4:23am
28
sure lol, I don’t have it on github yet bc I’m lazy `:P
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./modules/env.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Kernel
#boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
boot.blacklistedKernelModules = [ "amdgpu" ];
boot.kernelParams =
[
"amd_iommu=on"
# slim HD 5450 650M 1GB DDR3
#"vfio-pci.ids=1002:68f9,1002:aa68,"
# thicc HD 4870 1GB DDR5
"vfio-pci.ids=1002:9440,1002:aa30,"
];
boot.kernelModules = [
"vfio_virqfd"
"vfio_pci"
"vfio_iommu_type1"
"vfio"
"nct6775"
];
boot.extraModprobeConfig = "options vfio-pci ids=1002:68f9,1002:aa68";
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/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
services.udev.extraRules = ''
# Pen Tablet
SUBSYSTEM=="usb", ATTRS{product}=="XP-Pen Artist 12 (2nd Gen)", ATTRS{idProduct}=="094a", ATTRS{idVendor}=="28bd", MODE="0660", GROUP="plugdev"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0666", GROUP="plugdev"
# Arduino
KERNEL=="ttyUSB*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb-serial", ATTRS{idProduct}=="7523", ATTRS{idVendor}=="1a86", MODE="0666", GROUP="plugdev"
#SUBSYSTEMS=="usb", ATTRS{idProduct}=="7523", ATTRS{idVendor}=="1a86", MODE="0666", GROUP="plugdev"
'';
# file system shenanigans
fileSystems."/mnt/Games" =
{
device = "/dev/disk/by-uuid/9226e50e-fc7b-4a95-baac-a59b1d779899";
fsType = "ext4";
options =
[
"users"
"nofail"
"x-gvfs-show"
"exec"
];
label = "Games";
};
fileSystems."/mnt/SeagateBarracuda" =
{
device = "/dev/disk/by-uuid/1b78ca3b-618f-496f-8a6e-d4e575f5d84b";
fsType = "ext4";
options =
[
"users"
"nofail"
"x-gvfs-show"
"exec"
];
label = "Seagate Barracuda";
};
fileSystems."/mnt/HGST" =
{
device = "/dev/disk/by-uuid/a18e9a89-3b84-4bc0-85fc-5828bd1e7342";
fsType = "ext4";
options =
[
"users"
"nofail"
"x-gvfs-show"
"exec"
];
label = "HGST";
};
fileSystems."/mnt/WinVM" =
{
device = "/dev/disk/by-uuid/3199b99a-c2f5-42c7-b41e-11d83b97da4d";
fsType = "ext4";
options =
[
"users"
"x-gvfs-show"
"exec"
];
label = "WinVM";
};
fileSystems."/mnt/smb" = {
device = "//192.168.0.16/nika";
fsType = "cifs";
options = let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/home/nika/.dotfiles/smb-secrets"];
};
# fuck nvidia
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
open = true;
nvidiaSettings = true;
# modesetting.enable = true;
};
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.58.02";
sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM=";
sha256_aarch64 = "sha256-wb20isMrRg8PeQBU96lWJzBMkjfySAUaqt4EgZnhyF8=";
openSha256 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY=";
settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8=";
persistencedSha256 = "sha256-a1D7ZZmcKFWfPjjH1REqPM5j/YLWKnbkP9qfRyIyxAw=";
};
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Bluetooth
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
hardware.sane = {
enable = true;
extraBackends = [ pkgs.sane-airscan ];
};
hardware.opentabletdriver.enable = true;
# turn off the daemon service - it's borked afaik so for now I'll just use autostart until there either there's a fix or I'll fix it
hardware.opentabletdriver.daemon.enable = true;
services.hardware.openrgb.enable = true;
services.avahi.enable = true;
services.avahi.nssmdns4 = true;
# Enable sound with pipewire.
hardware.pulseaudio = {
enable = true;
extraConfig = "load-module module-equalizer-sink\nload-module module-dbus-protocol";
};
security.rtkit.enable = true;
# By default, NixOS uses Pipewire. Below is the default setting
# 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;
# };
# TLP Power management
# services.tlp = {
# enable = true;
# settings = {
# CPU_SCALING_GOVERNOR_ON_BAT="performance";
# CPU_SCALING_GOVERNOR_ON_AC="performance";
#
# # 100 is max
# CPU_MAX_PERF_ON_BAT=100;
# CPU_MAX_PERF_ON_AC=100;
# };
# };
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
users.groups.plugdev = {};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.nika = {
isNormalUser = true;
description = "nika";
extraGroups = [ "networkmanager" "wheel" "libvirtd" "wireshark" "openrazer" "scanner" "lp" "plugdev" ];
packages = with pkgs; [
kdePackages.kate
# thunderbird
];
};
services.davfs2.enable = true;
services.samba.enable = true;
#services.monero.enable = true;
# services.xmrig = {
# enable = true;
# settings = {
# autosave = true;
# cpu = true;
# opencl = false;
# cuda = true;
# pools = [
# {
# url = "pool.supportxmr.com:443";
# user = "your-wallet";
# keepalive = true;
# tls = true;
# }
# ];
# };
# };
# Install firefox.
programs.firefox.enable = true;
# Install Steam
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
# install git
programs.git = {
enable = true;
};
programs.wireshark = {
enable = true;
};
programs.coolercontrol.enable = true;
hardware.openrazer.enable = true;
#nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
# "steam"
# "steam-original"
# "steam-run"
#];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# libvirtdeez nuts AAAAAAAAAAAAaa
virtualisation.libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
ovmf = {
enable = true;
packages = [(pkgs.OVMF.override {
secureBoot = true;
tpmSupport = true;
}).fd];
};
};
};
# Automatically delete generations older than 30 days every week
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
# specialisation."VFIO".configuration = {
# system.nixos.tags = [ "with-vfio" ];
# vfio.enable = true;
#};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
librewolf
lshw
vlc
wineWowPackages.stable
winetricks
gparted
ntfs3g
kdePackages.yakuake
htop
_1password-gui
vencord
spotify
obs-studio
cowsay
kdePackages.kalarm
nextcloud-client
pciutils
exfat
wireshark
exfatprogs
cifs-utils
kdePackages.kdenlive
glaxnimate
hyfetch
openrazer-daemon
polychromatic
canon-cups-ufr2
libsForQt5.skanlite
gnome.simple-scan
openrgb-with-all-plugins
popsicle
libsForQt5.xp-pen-g430-driver
krita
libsForQt5.xp-pen-deco-01-v2-driver
tmuxPlugins.open
screen
# linux-wallpaperengine
signal-desktop
monero-gui
qpaeq
xmrig
vesktop
coolercontrol.coolercontrol-gui
coolercontrol.coolercontrol-ui-data
lm_sensors
yt-dlp
arduino
usbutils
audacity
freerdp3
remmina
xclicker
# QEMU stuff
qemu
virt-manager
virt-viewer
dnsmasq
vde2
bridge-utils
netcat-openbsd
libguestfs
libvirt
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = 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 = "24.05"; # Did you read the comment?
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}
Nika03
August 12, 2024, 4:52am
29
I can’t wrap my head around that file
bakayu
August 12, 2024, 5:43am
30
I was previously getting some problems with version 550, after a bit of digging in forums I found that 550 drivers were causing the random kernel panicks that I was having for some time, switching to open kernels fixed it for the time being but then I got this problem today when I tried rebuilding, thanks to you its fixed now, cheers!
2 Likes
TLATER
August 12, 2024, 9:38am
31
Appreciate the sentiment, hopefully amd/intel release a less humongous/power hungry model at some point…
Modesetting is mandatory for wayland .
The powermanagement setting is required to support sleep .
Otherwise this looks correct. For the record, what is the exact set of problems (including whether nvidia-settings
works) you get after a nixos-rebuild boot --use-remote-sudo && systemctl reboot
with:
# fuck nvidia
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
open = true;
nvidiaSettings = true;
modesetting.enable = true;
powerManagement.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.58.02";
sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM=";
sha256_aarch64 = "sha256-wb20isMrRg8PeQBU96lWJzBMkjfySAUaqt4EgZnhyF8=";
openSha256 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY=";
settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8=";
persistencedSha256 = "sha256-a1D7ZZmcKFWfPjjH1REqPM5j/YLWKnbkP9qfRyIyxAw=";
};
};
I also force the GBM backend and the GLX library, but I think that’s working around old wlroots bugs:
# Required to run the correct GBM backend for nvidia GPUs on wayland
GBM_BACKEND = "nvidia-drm";
# Apparently, without this nouveau may attempt to be used instead
# (despite it being blacklisted)
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
And finally I set the "nvidia-drm.fbdev=1"
kernel arg to work around this bug , but that should have been fixed in the driver/kernel by now.
I don’t seem to set services.xserver.videoDrivers
at all in my config, as a side note, I don’t understand how that works… My config checks if it’s in that list to switch the sway flag, though, and that’s definitely working, so I guess it ends up in there by default somehow. Either way, that setting should not be harmful.
Nika03
August 12, 2024, 8:03pm
32
Hey, you wanted to see it. I write with intent of only my eyes seeing it.
It’s no longer commented out.
My PC never sleeps, it’s my slave and works 24/7 mining XMR to support the network. I will add it though in case I eventually want it to have a breather.
TLATER:
I also force the GBM backend and the GLX library, but I think that’s working around old wlroots bugs:
# Required to run the correct GBM backend for nvidia GPUs on wayland
GBM_BACKEND = "nvidia-drm";
# Apparently, without this nouveau may attempt to be used instead
# (despite it being blacklisted)
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
And finally I set the "nvidia-drm.fbdev=1"
kernel arg to work around this bug , but that should have been fixed in the driver/kernel by now.
Hope you don’t mind me skipping this part
TLATER:
I don’t seem to set services.xserver.videoDrivers
at all in my config, as a side note, I don’t understand how that works… My config checks if it’s in that list to switch the sway flag, though, and that’s definitely working, so I guess it ends up in there by default somehow. Either way, that setting should not be harmful.
Let’s give it a try.
Here it is:
# fuck nvidia
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
open = true;
nvidiaSettings = true;
modesetting.enable = true;
powerManagement.enable = true;
};
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.58.02";
sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM=";
sha256_aarch64 = "sha256-wb20isMrRg8PeQBU96lWJzBMkjfySAUaqt4EgZnhyF8=";
openSha256 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY=";
settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8=";
persistencedSha256 = "sha256-a1D7ZZmcKFWfPjjH1REqPM5j/YLWKnbkP9qfRyIyxAw=";
};
};
I’ll give it a shot with this config.
Nika03
August 12, 2024, 8:16pm
33
Well my resolution while using Wayland is now proper but Plasma left to get milk and cigarettes. I can’t make a screenshot but basically
this again. I’ll make a pic from my phone and send it in a moment
Nika03
August 12, 2024, 8:17pm
34
Here it is. Sorry about the filter.