Skip to content

Enable all firmware by default. #87

Closed
wants to merge 1 commit into from

8 participants

@shlevy
Official Nix/Nixpkgs/NixOS member
shlevy commented Feb 9, 2013

Lots of hardware isn't supported out-of-the-box without this.
Much of that is networking, which makes new installs a pain. Those who want only free
firmware can disable this, but in the normal use case I think it makes more sense enabled.

@shlevy shlevy Enable all firmware by default.
Lots of hardware isn't supported out-of-the-box without this.
Much of that is networking, which makes new installs a pain. Those who want only free
firmware can disable this, but in the normal use case I think it makes more sense enabled.
ea346d1
@viric
Official Nix/Nixpkgs/NixOS member
viric commented Feb 9, 2013
@vcunat
Official Nix/Nixpkgs/NixOS member
vcunat commented Feb 9, 2013

I thought that the nixos-hardware-scan adds the nixos/modules/installer/scan/not-detected.nix file, which should as well include all not-detected firmware.

@edolstra
Official Nix/Nixpkgs/NixOS member

Actually the live CDs don't have this enabled, and pkgs.firmwareLinuxNonfree doesn't currently build due to some disappeared Debian files. I feel that this package shouldn't be enabled by default in general (i.e. outside of the live CD), because it would make NixOS depend by default on an unfree package. It also depends on the size of the package, but I can't determine that right now. It's better if nixos-hardware-scan enables it if necessary.

BTW, I didn't realize we have the Debian unfree firmware package now, which is great since it means we can get rid of almost all other firmware packages...

@viric
Official Nix/Nixpkgs/NixOS member
viric commented Feb 11, 2013
@edolstra
Official Nix/Nixpkgs/NixOS member

Well, they're redistributable, so we can put them in the tarball mirror. That will happen automatically if we add them as Hydra job.

@peti
Official Nix/Nixpkgs/NixOS member
peti commented Mar 21, 2013

Personally, I'd also prefer to keep the current state of affairs, i.e. not to enable all firmware by default.

@domenkozar
Official Nix/Nixpkgs/NixOS member

I've set license to "redistributable", but hydra doesn't have the binaries. https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix

@vcunat
Official Nix/Nixpkgs/NixOS member
vcunat commented May 23, 2013

@iElectric: hydra builds only derivations with platforms set (on the platforms that are set :).

@domenkozar
Official Nix/Nixpkgs/NixOS member

Good point.

@domenkozar
Official Nix/Nixpkgs/NixOS member

I did set meta.platforms, no result.

@vcunat
Official Nix/Nixpkgs/NixOS member
vcunat commented Jun 5, 2013

Strange. I don't have a clue why Hydra doesn't build it.

@peti
Official Nix/Nixpkgs/NixOS member
peti commented Jun 5, 2013

Hydra doesn't build anything with an unfree license. (See the very top of pkgs/top-level/release-lib.nix for reference.)

@vcunat
Official Nix/Nixpkgs/NixOS member
vcunat commented Jun 5, 2013

Oh, well, I thought the meaning was not to build undistributable files, but well, implementation does it this way.

I do believe we should change this.

@domenkozar
Official Nix/Nixpkgs/NixOS member

"unfreeDistributable" should mean: mirror stuff to hydra, but don't build

@vcunat
Official Nix/Nixpkgs/NixOS member
vcunat commented Jun 5, 2013

Ah, I see... the correct license is "unfree-redistributable-firmware", that should also get built by hydra. Definition is in doc/meta.xml. The handling is on pkgs/stdenv/generic/default.nix.

@domenkozar
Official Nix/Nixpkgs/NixOS member

Done. Let's wait for hydra.

@domenkozar
Official Nix/Nixpkgs/NixOS member
@domenkozar
Official Nix/Nixpkgs/NixOS member

So now we can merge this. NixOS will stay free, but it won't be completely open (which isn't the case now, as kernel contains many blobs)

@domenkozar
Official Nix/Nixpkgs/NixOS member

@edolstra objections? :)

@peti
Official Nix/Nixpkgs/NixOS member
peti commented Jun 29, 2013

@iElectric, how about the objections that have been made already a while ago? I don't like the idea of enabling all those blobs by default. It sounds okay to me to do it for the install CD, but for a standard NixOS installation I'd much rather see nixos-scan-hardware improved than this.

@mornfall

@peti Scanning hardware and installing drivers based on that is just so Windows 95. Binary firmware is a non-issue, since it won't run on the main CPU and can't compromise your system that way. Binary drivers may be contentious, but if the installer enables them for your specific hardware, it makes no difference either. Unless something loads the driver, it's inert. And I'd bet that first thing you do when you move to new hardware and your system stops working is install the drivers anyway? I don't really see the problem.

@peti
Official Nix/Nixpkgs/NixOS member
peti commented Jul 1, 2013

@mornfall, I don't like the notion of installing dozens of drivers indiscriminately that my system won't ever need. I think it's fine to provide that option for people who don't mind, but it should not be the default. I don't feel super strongly about it, and if some sort of majority of NixOS users would like to change the default behavior, then I'll go along with it. As it is, however, there seems to be no clear majority in favor of making this change, nor am I aware of any compelling reason why the default NixOS installation should come with lots of drivers that it won't ever load.

@mornfall
mornfall commented Jul 1, 2013

@peti There are two compelling reasons: 1) no need to maintain a tool the purpose of which is to map from hardware to packages [add to this that half the people I know, including myself, had some sort of trouble with wifi when installing nixos] 2) painless hardware migration.
As for installing stuff that's not used, this is NixOS. You already have tons of files you won't ever need (you need all of mysql and postgres just to install Qt; yes, that's around 80M of stuff for the 1.2M of shared libs you actually need). I don't think firmware and drivers is such a huge problem. For minimalist installations, it can always be taken out.

@vcunat
Official Nix/Nixpkgs/NixOS member
vcunat commented Jul 1, 2013

@mornfall:

  • [tons of files] Currently there is quite an effort to reduce the unnecessary size bloat (see e.g. multiple-outputs branch). We certainly don't want this to hold in the future.
  • Some HW-related pkgs don't have a very friendly license (or patent status) AFAIK. Many won't want to have this by default if they never use it.
  • It's not just about firmware, you also have tons of drivers (which are even larger).
  • I don't think device-to-drivers/firmware mapping will be so difficult to do. AFAIK for kernel modules it's standard thing that depmod extracts PCI IDs that every driver can "drive" and exports them into a text file (/lib/modules//modules.pcimap). I hope something similar can be done for firmware as well. We only need a hydra job to build everything, extract those lines and build a PCI ID -> package mapping. To me this *really** seems worth the effort.
@mornfall
mornfall commented Jul 1, 2013

If you don't use something, patents or licenses don't really matter. I know about multiple outputs, but it's a ton of effort to trim nixpkgs down, and storage is only going to become cheaper. I will gladly trade "works out of the box" over a couple hundred MB of default installation. If I was stingy about disk space, I wouldn't be running NixOS in the first place.
Detecting and sorting out hardware is notoriuosly difficult. What about hardware changes? You deploy your configuration on a new laptop and ... sorry, I would tweak your configuration.nix for your new hardware (that's already a near-insurmountable problem?), but you are fucked anyway because your network hardware doesn't work? Or even think about hotplugging in a new gadget. Are you going to write something that notices this and offers the user to magically tweak configuration.nix and nixos-rebuild to enable that hardware? (What if you are running a configuration that's not the same as /etc/nixos right now?)
Because all those things would work with zero effort for both users and developers, if the drivers/firmwere were installed by default. Seems a bad trade to increase work and decrease comfort for everyone over a bit of disk space that can be freed by those who don't care about setting up hardware manually.

@vcunat
Official Nix/Nixpkgs/NixOS member
vcunat commented Jul 1, 2013

I don't really feel strongly about the default settings. But it seems that for installation ISOs this can be vital... do I understand @edolstra correctly that this isn't enabled even there?

@mornfall mornfall referenced this pull request in NixOS/nixpkgs Jul 10, 2013
Closed

ATI driver trouble #687

@bjornfor

+1 for merging this. I am a big believer in "works out of the box".

@edolstra edolstra added a commit that referenced this pull request Aug 14, 2013
@edolstra edolstra Enable the Debian firmware package on the installation CD
It's unfree but we already had such firmware on the CD so we're not
worse off.

Issue #87.
8db22f7
@edolstra edolstra added a commit that referenced this pull request Aug 14, 2013
@edolstra edolstra not-detected.nix: Enable all firmware
Note that since the configuration produced by nixos-hardware-scan
includes not-detected.nix, you get all firmware when following the
regular installation procedure.

Issue #87.
5060160
@edolstra
Official Nix/Nixpkgs/NixOS member

Okay, I've now enabled all firmware on the installation CD, and (implicitly) in configurations generated by nixos-hardware-scan. That should make things work "out of the box" for most users, I think.

@domenkozar
Official Nix/Nixpkgs/NixOS member

Wonderful.

@bjornfor

So what is the difference between what we have now and what this pull provides? Should we close this pull?

@peti
Official Nix/Nixpkgs/NixOS member
peti commented Aug 17, 2013

I'll go out on a limb and just do it. :-)

@peti peti closed this Aug 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.