Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linuxPackages.rtl88x2bu: init at 2020-03-05 #82032

Merged
merged 1 commit into from Jun 4, 2020
Merged

Conversation

Ralith
Copy link
Contributor

@Ralith Ralith commented Mar 8, 2020

Motivation for this change

This got my TP-Link Archer T3U working on 19.09. Also seems to build fine with newer kernels. Not sure how we'll know if/when upstream gets support, or whether that's even a possibility.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passes nix-build -A linuxPackages_latest.rtl88x2bu and diff LGTM.

@contrun
Copy link
Contributor

contrun commented Jun 1, 2020

I just had the same driver missing. Thanks for your PR. Can you please update the rev and sha256. Upstream got updated while this is still waiting for merging. We really need some way to make review for PR faster.

@Ralith
Copy link
Contributor Author

Ralith commented Jun 1, 2020

Out of curiosity, are there recent changes to the source repo that affect you? I reviewed it not long ago and didn't see any major updates.

@contrun
Copy link
Contributor

contrun commented Jun 2, 2020

As a matter of fact, I haven't tried this driver yet.

@contrun
Copy link
Contributor

contrun commented Jun 3, 2020

I just tried this PR. rtl88x2bu driver does not build for kernel 5.6.16.

I tried

{
    "owner": "cilynx",
    "repo": "rtl88x2bu",
    "rev": "0f159d7cd937a12b818121cb1f1c4910bd1adc72",
    "sha256": "0flqnvzfdb4wsiiqv9vf5gfwd5fgpjvhs9zhqknnv1cmp8msgw6y"
}

It works. My wireless nic is now working. Thanks for your contribution.

@Ralith
Copy link
Contributor Author

Ralith commented Jun 3, 2020

Updated and confirmed working on latest 20.03.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM

https://github.com/NixOS/nixpkgs/pull/82032
2 packages marked as broken and skipped:
linuxPackages_hardkernel_4_14.rtl88x2bu linuxPackages_hardkernel_latest.rtl88x2bu

15 packages built:
linuxPackages-libre.rtl88x2bu linuxPackages.rtl88x2bu linuxPackages_4_14.rtl88x2bu linuxPackages_4_19.rtl88x2bu linuxPackages_4_4.rtl88x2bu linuxPackages_4_9.rtl88x2bu linuxPackages_5_6.rtl88x2bu linuxPackages_hardened.rtl88x2bu linuxPackages_latest-libre.rtl88x2bu linuxPackages_latest_hardened.rtl88x2bu linuxPackages_latest_xen_dom0.rtl88x2bu linuxPackages_latest_xen_dom0_hardened.rtl88x2bu linuxPackages_testing_bcachefs.rtl88x2bu linuxPackages_xen_dom0.rtl88x2bu linuxPackages_xen_dom0_hardened.rtl88x2bu

pkgs/os-specific/linux/rtl88x2bu/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff LGTM
commits LGTM
upstream LGTM

https://github.com/NixOS/nixpkgs/pull/82032
2 packages marked as broken and skipped:
linuxPackages_hardkernel_4_14.rtl88x2bu linuxPackages_hardkernel_latest.rtl88x2bu

15 packages built:
linuxPackages-libre.rtl88x2bu linuxPackages.rtl88x2bu linuxPackages_4_14.rtl88x2bu linuxPackages_4_19.rtl88x2bu linuxPackages_4_4.rtl88x2bu linuxPackages_4_9.rtl88x2bu linuxPackages_5_6.rtl88x2bu linuxPackages_hardened.rtl88x2bu linuxPackages_latest-libre.rtl88x2bu linuxPackages_latest_hardened.rtl88x2bu linuxPackages_latest_xen_dom0.rtl88x2bu linuxPackages_latest_xen_dom0_hardened.rtl88x2bu linuxPackages_testing_bcachefs.rtl88x2bu linuxPackages_xen_dom0.rtl88x2bu linuxPackages_xen_dom0_hardened.rtl88x2bu

@jonringer jonringer merged commit 38f5fce into NixOS:master Jun 4, 2020
@Ralith Ralith deleted the rtl88x2bu branch June 4, 2020 20:13
@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/help-installing-wifi-drivers/4575/7

@dav1dnix
Copy link

dav1dnix commented Aug 17, 2020

Hi, I am a new user of NixOS, I can't seem to get this working with my wifi adapter which is an Archer T4U V3.
I have tried boot.extraModulePackages = with config.boot.kernelPackages; [ rtl88x2bu ]; and I got the error undefined variable 'rtl88x2bu', I am not sure whether I am doing anything wrong. I tried enabling nixos-unstable channel and putting unstable rtl88x2bu, but that hasn't worked either. The only thing that did work for me was nix-env -i rtl88x2bu. The driver installed, but I still can't connect to my wifi.
Here is my ifconfig and wpa_supplicant

ifconfig
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.42.0.86  netmask 255.255.255.0  broadcast 10.42.0.255
        inet6 fe80::5ef9:ddff:fe70:c674  prefixlen 64  scopeid 0x20<link>
        ether 5c:f9:dd:70:c6:74  txqueuelen 1000  (Ethernet)
        RX packets 5523  bytes 4434095 (4.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4509  bytes 612492 (598.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf7c00000-f7c20000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2704  bytes 241056 (235.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2704  bytes 241056 (235.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wpa_supplicant service
● wpa_supplicant.service - WPA Supplicant
   Loaded: loaded (/nix/store/b98pwgf69iwlgr2131sy9bp3sgq69g1h-unit-wpa_supplicant.service/wpa_supplicant.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2020-08-17 12:08:26 BST; 17min ago
  Process: 715 ExecStart=/nix/store/fl0z9il4s3q557pnchnn18xfyf43x1cd-unit-script-wpa_supplicant-start (code=exited, status=255/EXCEPTION)
 Main PID: 715 (code=exited, status=255/EXCEPTION)
       IP: 0B in, 0B out
      CPU: 7ms

Aug 17 12:08:26 nixos fl0z9il4s3q557pnchnn18xfyf43x1cd-unit-script-wpa_supplicant-start[715]:   -q = decrease debugging verbosity (-qq even less)
Aug 17 12:08:26 nixos fl0z9il4s3q557pnchnn18xfyf43x1cd-unit-script-wpa_supplicant-start[715]:   -s = log output to syslog instead of stdout
Aug 17 12:08:26 nixos fl0z9il4s3q557pnchnn18xfyf43x1cd-unit-script-wpa_supplicant-start[715]:   -t = include timestamp in debug messages
Aug 17 12:08:26 nixos fl0z9il4s3q557pnchnn18xfyf43x1cd-unit-script-wpa_supplicant-start[715]:   -u = enable DBus control interface
Aug 17 12:08:26 nixos fl0z9il4s3q557pnchnn18xfyf43x1cd-unit-script-wpa_supplicant-start[715]:   -v = show version
Aug 17 12:08:26 nixos fl0z9il4s3q557pnchnn18xfyf43x1cd-unit-script-wpa_supplicant-start[715]:   -W = wait for a control interface monitor before starting
Aug 17 12:08:26 nixos fl0z9il4s3q557pnchnn18xfyf43x1cd-unit-script-wpa_supplicant-start[715]: example:
Aug 17 12:08:26 nixos fl0z9il4s3q557pnchnn18xfyf43x1cd-unit-script-wpa_supplicant-start[715]:   wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf
Aug 17 12:08:26 nixos systemd[1]: wpa_supplicant.service: Main process exited, code=exited, status=255/EXCEPTION
Aug 17 12:08:26 nixos systemd[1]: wpa_supplicant.service: Failed with result 'exit-code'.

@doronbehar
Copy link
Contributor

nix-env -i rtl88x2bu won't work, as that influences nothing over the system.

boot.extraModulePackages = with config.boot.kernelPackages; [ rtl88x2bu ]; Should work, but perhaps could you give us more context @Dps910? Also, to make sure your channels are updated, could you tell us if this command (run by root) works?

# nix search -u rtl88x2bu

@dav1dnix
Copy link

nix-env -i rtl88x2bu won't work, as that influences nothing over the system.

boot.extraModulePackages = with config.boot.kernelPackages; [ rtl88x2bu ]; Should work, but perhaps could you give us more context @Dps910? Also, to make sure your channels are updated, could you tell us if this command (run by root) works?

# nix search -u rtl88x2bu

I updated my channels with nix-channel --update and then I did sudo nix search -u rtl88x2bu. It showed me a lot of packages

  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_4_14.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_4_19.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_4_4.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_4_9.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_5_4.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_5_7.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_hardened.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_hardkernel_4_14.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_hardkernel_latest.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest-libre.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest_hardened.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest_xen_dom0.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest_xen_dom0_hardened.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_testing_bcachefs.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_xen_dom0.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_xen_dom0_hardened.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

@doronbehar
Copy link
Contributor

My setup is a little different, and I'm a bit unsure this tests the issue. Could you run exactly this:

sudo su -l
nix-channel --update
nix-channel --list
nix search -u rtl88x2bu

@dav1dnix
Copy link

My setup is a little different, and I'm a bit unsure this tests the issue. Could you run exactly this:

sudo su -l
nix-channel --update
nix-channel --list
nix search -u rtl88x2bu
[david@nixos:~]$ sudo su -l
[sudo] password for david: 

[root@nixos:~]# nix-channel --update
unpacking channels...

[root@nixos:~]# nix-channel --list
nixos https://nixos.org/channels/nixos-20.03
nixos-unstable https://nixos.org/channels/nixos-unstable

[root@nixos:~]# nix search -u rtl88x2bu 
* nixos-unstable.linuxPackages-libre.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_4_14.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_4_19.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_4_4.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_4_9.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_5_4.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_5_7.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_hardened.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_hardkernel_4_14.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_hardkernel_latest.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest-libre.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest_hardened.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest_xen_dom0.rtl88x2bu (rtl88x2bu)
  Realtek rtl88x2bu driver

* nixos-unstable.linuxPackages_latest_xen_dom0_hardened.rtl88x2bu (rtl88x2bu)

@doronbehar
Copy link
Contributor

The unstable channel is not actually used. Run as root:

# nix-channel --remove nixos
# nix-channel --remove nixos-unstable
# nix-channel --add https://nixos.org/channels/nixos-unstable nixos

@dav1dnix
Copy link

The unstable channel is not actually used. Run as root:

# nix-channel --remove nixos
# nix-channel --remove nixos-unstable
# nix-channel --add https://nixos.org/channels/nixos-unstable nixos

That has worked! Thanks :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants