NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.29k stars 13.54k forks source link

`alsa-ucm-conf` refers to `/bin/rm` and `/bin/mkdir` #294170

Open tobiasBora opened 6 months ago

tobiasBora commented 6 months ago

Describe the bug

To fix this bug #294048 (problem with microphone), I needed to run sudo alsactl init. Unfortunately, this fails as it tries to access /bin/rm and /bin/mkdir. Manually linking it like:

$ sudo ln -s /run/current-system/sw/bin/rm /bin
$ sudo ln -s /run/current-system/sw/bin/mkdir /bin

make i work… but it is not really the way NixOs works ^^'

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run sudo alsactl init (you might want to backup the alsa configuration, as I guess it can reinitialize some configuration?)

Notify maintainers

@AndersonTorres

Metadata

From NixOs 23.11 b8697e57f10292a6165a20f03d2f42920dfaf973


Add a :+1: reaction to issues you find important.

nixos-discourse commented 6 months ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/dell-xps-13-9320-microphone-not-working/40932/2

jmarmstrong1207 commented 6 months ago

Unable to reproduce this. For me, it returns this successfully:

Found hardware: "HDA-Intel" "Nvidia GPU 9a HDMI/DP" "HDA:10de009a,38424897,00100100" "0x3842" "0x4897"
Hardware is initialized using a generic method
Found hardware: "USB-Audio" "USB Mixer" "USB0d8c:0005" "" ""
Hardware is initialized using a generic method
Found hardware: "HDA-Intel" "Realtek ALC1220" "HDA:10ec1220,1458a0c3,00100101" "0x1458" "0xa0c3"
Hardware is initialized using a generic method
Found hardware: "USB-Audio" "USB Mixer" "USB046d:0826" "" ""
Hardware is initialized using a generic method

It might be an issue with your nixos setup. Could you provide the error that it returns?

tobiasBora commented 6 months ago

Hum, I don't think I made anything crazy. The errors and proof that the fix works:


[root@bestos:/home/leo]# cat /etc/nixos/flake.lock | rg nixpkgs_2 -C 6
        "owner": "NixOS",
        "ref": "nixos-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "nixpkgs_2": {
      "locked": {
        "lastModified": 1709569716,
        "narHash": "sha256-iOR44RU4jQ+YPGrn+uQeYAp7Xo7Z/+gT+wXJoGxxLTY=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "617579a787259b9a6419492eaac670a5f7663917",
--
    },
    "root": {
      "inputs": {
        "nix-index-database": "nix-index-database",
        "nix-software-center": "nix-software-center",
        "nixos-hardware": "nixos-hardware",
        "nixpkgs": "nixpkgs_2",
        "nixpkgsmusescorethree": "nixpkgsmusescorethree"
      }
    },
    "systems": {
      "locked": {
        "lastModified": 1681028828,

[root@bestos:/home/leo]# alsactl init
alsa-lib main.c:846:(execute_sequence) exec '/bin/rm -rf /var/lib/alsa/card0.conf.d' failed (exit code 1)

[root@bestos:/home/leo]# ln -s /var/run/current-system/sw/bin/rm /bin

[root@bestos:/home/leo]# alsactl init
alsa-lib main.c:846:(execute_sequence) exec '/bin/mkdir -p -m 0755 /var/lib/alsa/card0.conf.d' failed (exit code 1)

[root@bestos:/home/leo]# ln -s /var/run/current-system/sw/bin/mkdir /bin

[root@bestos:/home/leo]# alsactl init
eclairevoyant commented 6 months ago

Thanks for the error. Seems this is coming from alsa-ucm-conf, and is present in the nixpkgs package as well.