My monitor ( ROG SWIFT PG278Q ) was working on my previous pc when I had nvidia. I got a new pc with a AMD Radeon RX 7800 XT and now the monitor is just black at 640x480.
fresh install of nixos plasma.
The monitor is plugged in the video card via displayport.
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, ... }:
{
imports =
[ # Include the results of the hardware scan.
<nixos-hardware/common/gpu/amd/default.nix>
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
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 = "America/New_York";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# 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";
variant = "";
};
# Graphics
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
services.xserver.videoDrivers = [ "amdgpu" ];
# 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
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
# Enable CUPS to print documents.
services.printing.enable = true;
# 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;
};
# 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.dustin = {
isNormalUser = true;
description = "Dustin";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
# thunderbird
];
};
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Allow disk management
programs.partition-manager.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
steam
discord
wezterm
git
btop
tmux
neovim
tldr
element-web
thunderbird
];
# 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.11"; # Did you read the comment?
}
hardware-configuration.nix
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPatches = [
{
name = "Rust Support";
patch = null;
features = {
rust = true;
};
}
];
boot.extraModulePackages = [ ];
boot.kernelParams = [
"video=DP-1:2560x1440@144"
"video=DP-2:2560x1440@144"
];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2fd952b0-f307-4b3b-8edf-7d5e554c6767";
fsType = "ext4";
};
fileSystems."/run/media/dustin/games" = {
device = "/dev/disk/by-uuid/24a83170-d6e1-4188-95ad-ecc2827204fe";
fsType = "auto";
};
fileSystems."/run/media/dustin/projects" = {
device = "/dev/disk/by-uuid/14e4e640-5100-4e6f-beba-d389e22757a6";
fsType = "auto";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/ECE2-0221";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp112s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp111s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.graphics.extraPackages = with pkgs; [
amdvlk
rocmPackages.clr.icd
];
# For 32 bit applications
hardware.graphics.extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
environment.systemPackages = with pkgs; [ lact ];
systemd.packages = with pkgs; [ lact ];
systemd.services.lactd.wantedBy = ["multi-user.target"];
}
But everything works fine now with the kernelParams?
The error just says that the system could not read the resolution of your monitor. If you don’t have any other issues just ignore it.
the kernelParams sets the resolution. The system settings, shows the screen. The computer acts like the monitor exists, but I’m stuck with a black screen. I can move windows to the screen, I just can’t see 'em.
So just to clarify. Both of your monitors are have a blackscreen.
First of all can you describe a bit more what you changed so that this behavior happened?
Was it only the GPU switch, did you do a full re installation or have you changed any cables.
Also when booting do you have a direct blackscreen or can you login.
Third question is are you using X or wayland. If you are using either try the other one.
I have 2 monitors. One works (HDMI 1080), the other is blackscreen (Displayport QHD).
It has been a blackscreen since install on this pc. I used the same 2 monitors, with the same cords, on a previous pc running nix, but the old pc had nvidia ( 2060 super ). The old pc died, and got a new pc. new pc
The blackscreen monitor works when booting, bios, selecting nix build. As soon as it hits the login screen, the monitor blacks out.
I am using X. I have tried wayland. With wayland, the screen was still black and my mouse didnt work, so I just use X so i can have my mouse.
after trying the kernelParams, plasma’s display configuration window shows a 3rd montior. My working monitor is still working at 1080, and the other 2 in display configuration is at 640x480.
This should tell you where the monitor is connected. Pleas post the output of that.
Second try another port on the gpu.
Third run this command and post the output: xrandr
Fourth run this command and post the output: ls /sys/class/drm/*/edid
[dustin@nixos:~]$ sudo nixos-rebuild switch
[sudo] password for dustin:
building Nix...
building the system configuration...
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
… while evaluating derivation 'nixos-system-nixos-24.11.717608.bf3287dac860'
whose name attribute is located at /nix/store/sdmikw0x2qf11yhnxach7bv1ysa7p0yj-nixos-24.11/nixos/pkgs/stdenv/generic/make-derivation.nix:396:13
… while evaluating attribute 'buildCommand' of derivation 'nixos-system-nixos-24.11.717608.bf3287dac860'
at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:1:2295:
… while evaluating the option `boot.bootspec.writer':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: A definition for option `boot.kernelParams."[definition 1-entry 1]"' is not of type `string, with spaces inside double quotes'. Definition values:
- In `/etc/nixos/hardware-configuration.nix': "drm.edid_firmware=DP-2:edid/PG278Q.bin "
while the kernalPatch runs, I’ve tried to identify which one is my monitor.
Model#: PG278Q
S/N: E9LMQS002509
Manufactured Date: September 2014
Power: 19V 4.74A
I can’t find anymore info on the monitor itself. I’ll dig around for the box. I hope I didn’t throw it away.
I highly doubt that this will work since your monitor is from 2014 but the oldest in the list is from 2016. You could however try to get the EDID by yourself. Therefor try this:
install read-edid
sudo modprobe i2c-dev (to read from the
sudo get-edid > edid.bin (if this doesn’t work try to specify the monitors bus with the -b flag e.g. sudo get-edit -b 2)
And than this config again (maybe with updated file names):