CTU-IIG / carla-simulator.nix

Nix expressions for building Carla simulator and related software
MIT License
7 stars 1 forks source link

System Crush with Nvidia Cards #4

Open nubufi opened 2 days ago

nubufi commented 2 days ago
{

    hardware.opengl = {
        enable = true;
    };

    services.xserver.videoDrivers = ["nvidia"];

    hardware.nvidia = {
        modesetting.enable = true;
        powerManagement.enable = false;
        powerManagement.finegrained = false;
        open = false;
        nvidiaSettings = true;
        package = config.boot.kernelPackages.nvidiaPackages.stable;
        prime = {
            sync.enable = true;
            intelBusId = "PCI:0:2:0";
            nvidiaBusId = "PCI:1:0:0";
        };
    };
}

This is my nvidia configuration file as suggested in nixos wiki. I have Nvidia GeForce RTX 3050 graphic card on my laptop. After I ran the following command nix run github:CTU-IIG/carla-simulator.nix#carla-bin-0_9_15 my system got crushed and restarted a new session. It is propably because of nvidia settings but I don't know what cause it.

wentasah commented 2 days ago

Are you able to extract some logs from the machine (dmesg, journalctl or coredumpctl)? This should give some hint what's going on.

nubufi commented 2 days ago

dmesg.txt journal.txt I hope it helps.

nubufi commented 2 days ago

journal.txt I believe this is more clear. Btw I just installed a steam game so it is not a general nvidia problem.

wentasah commented 2 days ago

This is strange. The only thing that can be seen from the logs is that the connection to the wayland compositor was lost, but there is no sign of any crash, error etc. Even the dmesg doesn't show any problem.

How much memory do you have on the GPU? Sometimes I see problems with low-memory GPUs and high-res displays. High-res displays need a log of GPU memory and Gnome competes for it with CARLA. Then, especially on Nvidia GPUs, problems happen.

nubufi commented 2 days ago

I have 4GB memory an currently 10% is being used.

wentasah commented 7 hours ago

Having only 4GB might be the reason. This page says, that 6GB is the minimum.

You may try whether you'll have more luck with different desktop than Gnome. Or you can try running CARLA with -quality-level=Low. Otherwise, I'm out of ideas.

I'm running CARLA from this overlay only on Intel and AMD GPUs. I don't have any NixOS system with nvidia GPU around.