Closed ThomasMader closed 2 years ago
The pkg "pkgs.broadcom_sta" in NixOS configuration should do it, but I'm not sure if we're allowed to distribute it. Does wifi work with other live cds?
IIRC it is redistributable (and there are very few drivers that aren't).
We have a policy that Hydra doesn't build anything depending on unfree stuff, including the ISOs. Maybe we might make an exception for redistributable drivers?
/cc @edolstra about allow-ability of unfree drivers on Hydra.
My friend suffered from the same issue. He has the same Wi-Fi card (BCM4360 14e4:43a0), and the network doesn't work on the Live CD. Unfortunately, he has no Ethernet...
b43 driver failed with:
b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog 12, Type 11 (AC), Revision 1)
b43: probe of bcma0:1 failed with error -95
So I ended up packing a custom Live CD with the broadcom_sta. Can confirm it works fine.
I've checked up broadcom_sta is unfreeRedistributable (https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/broadcom-sta/default.nix#L45), so it would be nice to include it in the default image.
broadcom_sta should be able to just go into hardware.firmware in nixos/modules/hardware/all-firmware.nix. The biggest issue though is that we want to use open source drivers when they are available.
according to https://wiki.debian.org/wl:
That leaves BCM43227 BCM43228 BCM43142 BCM43142 and BCM4360 that will need the broadcom provided "sta" driver. I don't know if there is a way to let only enable it for certain hardware?
While we're at it, can we see if there is any other nonfree wifi drivers that should be included?
Any update on this?
The issue seems to be waiting on @edolstra's input
(triage) @domenkozar, could you look into this?
Hello! I want to try nixos on my laptop. Unfortunately, I have BCM43142 WiFi module, which is not working without proprietary drivers. I suppose, broadcom_sta
will make it working.
But I don't have opportunity to use wired connection during installation.
Perhaps, someone can make custom installation ISO for me?
@vitvakatu here you go!
NixOS minimal (330M)
$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix
$ sha256sum nixos-17.03.git.12a3947-x86_64-linux.iso
fc762c9f94f0ca1ae48c9ccf0de9935b34503e7991191bcaf4b389adad338b75 nixos-17.03.git.12a3947-x86_64-linux.iso
NixOS graphical KDE (806M)
$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-graphical-kde.nix
$ sha256sum nixos-17.03.git.12a3947-x86_64-linux.iso
b564729a25dc92df2113324422820e7efe7f2cc47a33182c71379f25710d1c63 nixos-17.03.git.12a3947-x86_64-linux.iso
Built from https://github.com/rasendubi/nixpkgs/tree/nixos-broadcom-sta, nixos
directory.
@rasendubi Thank you so much! I successfully installed it :)
I have the same problem - a wireless card made by broadcom. However, I am able to connect via ethernet. Can you please provide the steps to install the broadcom wireless card when connected via ethernet?
Or alternatively, can you provide a more detailed steps to build the iso? That is, should I clone your folder? If so, which folder?
I plan to build a usb bootable using UnetBootin.
@kyp0717: and your card isn't covered by our broadcom_sta
module? EDIT: you probably have to enable the module explicitly.
@rasendubi - After having installed using your image, is it possible to update the system to use upstream NixOS repos?
Otherwise, what is the recommended way to do "offline installation" of Broadcom drivers on a fresh install of NixOS on Mac?
@srid yes. Actually, it is only live image that is built using custom repo; the system you'll install from it will use upstream repo.
@rasendubi Ah, I see. I'll give it a try, thanks.
any tips how do I install 18.03 from windows without this?
Nvm, used the provided custom image, thanks @rasendubi :)
Would be good though to include these essential modules in the std image
@vcunat would this commit fix the issue:
c495d79237d372a777144cdd0ab9b7f09e572db1
?
I think that those drivers are already in the live cd.
To add to the last comment, I've tried 18.03 graphical install ISO and no luck (no module wl found, checked files manually in kernel modules too), the image linked in this pr helped.
Or do you mean it was on the nix store in the image? (I'm new to nixos so didn't check that.. Learning curve :) )
On a side note - had some fun with wpa supplicant and DHCP :) I'd suggest to document running wpa supplicant in foreground as then it reports errors on screen.. Also how to install DHCP (nix-env -i) and to run dhclient..
Anyways, its installed now, lessons learned. So far I like what I see, very much so!
I don't think that commit would work. It's linuxPackages.broadcom_sta
– a kernel module, not a firmware per se. EDIT: the link above looks right and was tested https://github.com/rasendubi/nixpkgs/commit/d135ae91b5
NixOS noob here.
I tried @rasendubi's iso files and they worked (thank you!) but I'm not sure where to go from there.
For context, I am trying to dual boot between NixOS and macOS. Should I dd
the iso to a partition on my disk? Should I use it on a USB drive and from then build another version of NixOS while running the live USB somehow?
-- not sure if this is the right place to ask but it seems relevant and it might be helpful to others
There is nothing special about my iso. Just install your system as normal.
Don't forget to add "wl" and "broadcom_sta" so your fresh system has WiFi, too.
(I have something like this in my configuration.nix
)
boot.initrd.kernelModules = [ "wl" ];
boot.kernelModules = [ "kvm-intel" "wl" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
FWIW, "normal" means "follow the manual."
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Still important to me
The links to iso's no longer work, but this is how I build one from an existing NixOs installation:
# Clone nixpkgs repo
$ git clone https://github.com/NixOS/nixpkgs.git && cd nixpkgs
# Checkout the target channel (nixos-unstable in my case)
$ git switch nixos-unstable
# Apply the following patch
$ git diff
diff --git a/nixos/modules/profiles/all-hardware.nix b/nixos/modules/profiles/all-hardware.nix
index 19f821ae17f..c12866466da 100644
--- a/nixos/modules/profiles/all-hardware.nix
+++ b/nixos/modules/profiles/all-hardware.nix
@@ -3,7 +3,7 @@
# enabled in the initrd. Its primary use is in the NixOS installation
# CDs.
-{ ... }:
+{ config, ... }:
{
@@ -51,6 +51,10 @@
# Include lots of firmware.
hardware.enableRedistributableFirmware = true;
+ boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
+ boot.kernelModules = [ "wl" ];
+ nixpkgs.config.allowUnfree = true;
+
imports =
[ ../hardware/network/zydas-zd1211.nix ];
# build the image
$ cd nixos
$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix default.nix
# Write iso to the USB stick
$ cat ./result/iso/nixos-21.03.git.ff8a3c75b9aM-x86_64-linux.iso > /dev/sdb
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
Yeah... I had ran out of space on gdrive and dropped isos. Wasn't sure how much interest there is given they are real old. Will update to 20.09 and host on s3 tomorrow.
NixOS 20.09 Live CD images with broadcom drivers:
Besides adding broadcom driver to the live CD itself, there are no other differences. To install the system, follow the manual as usual.
Don't forget to install broadcom drivers into your final system, so it has Wi-Fi, too! Add the following lines your configuration.nix (or make sure they exist in hardware-configuration.nix):
nixpkgs.config.allowUnfree = true;
boot.kernelModules = [ "wl" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
Enjoy!
For anyone else trying to install nixOS on their Macs, it seems like I'm not able to build my own images on x86_Darwin. Getting this:
error: Package ‘syslinux-unstable-20190207’ in /Users/stel/Code/nixpkgs/pkgs/os-specific/linux/syslinux/default.nix:96 is not supported on ‘x86_64-darwin’, refusing to evaluate.
In case anyone else has the same issue, after https://github.com/NixOS/nixpkgs/issues/15162#issuecomment-751451253 I still have some remaining issues trying to install on a Mac (an iMac in my case).
WiFi in the live USB works fine, but in the installed system I still can't get it to work. First one is a silly one, which is if you find you have no WiFi adapter found by Gnome after the install, you have to make sure you remembered to add your user to the networkmanager
group via extraGroups
, c.f. https://nixos.org/manual/nixos/stable/#sec-user-management.
Second is even after that, now I can connect to WiFi, but cannot get to the internet, just my local network. Somehow I think default routes I believe are being incorrectly discovered, but I don't know how to fix that yet. Will update after figuring it out (or asking for help).
EDIT: OK, indeed it was incorrect default routes, running sudo ip route del default && sudo ip route add default via $MYROUTERIP
lets me reach the internet now. Not sure why the LiveUSB got me working internet and the booted system didn't -- I'm no expert neither on NixOS nor networking, so this may be offtopic for this ticket, if so feel free to hide the comment, but leaving it here given as I say, this worked fine on the LiveUSB boot, and I have no other LAN devices with WiFi issues, so maybe it'll help someone else.
I wrote some docs in https://github.com/NixOS/nixpkgs/pull/168306, which should probably document this sufficiently.
In case anyone else has the same issue, after #15162 (comment) I still have some remaining issues trying to install on a Mac (an iMac in my case).
WiFi in the live USB works fine, but in the installed system I still can't get it to work. First one is a silly one, which is if you find you have no WiFi adapter found by Gnome after the install, you have to make sure you remembered to add your user to the
networkmanager
group viaextraGroups
, c.f. https://nixos.org/manual/nixos/stable/#sec-user-management.~Second is even after that, now I can connect to WiFi, but cannot get to the internet, just my local network. Somehow I think default routes I believe are being incorrectly discovered, but I don't know how to fix that yet. Will update after figuring it out (or asking for help).~
EDIT: OK, indeed it was incorrect default routes, running
sudo ip route del default && sudo ip route add default via $MYROUTERIP
lets me reach the internet now. Not sure why the LiveUSB got me working internet and the booted system didn't -- I'm no expert neither on NixOS nor networking, so this may be offtopic for this ticket, if so feel free to hide the comment, but leaving it here given as I say, this worked fine on the LiveUSB boot, and I have no other LAN devices with WiFi issues, so maybe it'll help someone else.
I encountered the same route problem too. For some reason, I have to let the system installed on my computer boot in legacy mode, instead of EFI. As I have tested, networkmanager with wpa_supplicant as its backend doesn't work well, but it works if you only use wpa_supplicant without networkmanager. However, simply using wpa_supplicant without a gui front-end(wpa_gui doesn't work on my computer) isn't a good idea for me.
I solved the problem by using iwd as the backend of networkmanager instead. Add the following code in your configuration.nix and everything will work perfectly!
networking.networkmanager.wifi.backend = "iwd"
NOTE: The system installed on my computer boots in legecy mode, but I boot the LiveCD in EFI mode. If your computer boots in EFI mode, you'll probably NOT encounter those problems.
My machine is a MacBook Pro 12-mid.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/no-wifi-on-fresh-install-kde-plasma/29537/2
This comes from #11540 but is separated into this issue. I installed NixOS unstable (16.03) on my Mac Mini 7,1 and have the following probem with it.
The Live CD wasn't able to provide me with WiFi. I guess the Live CD doesn't come with the needed drivers for my WiFI card (BCM4360 14e4:43a0) which are commercial :-( -> broadcom_sta I resolved my problem by using an Ethernet connection, after the installation WiFi worked. Would be nice if those could be packaged with the Live CD.