all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* disable software blocking of wifi?
@ 2019-04-05 13:52 znavko
  2019-04-06 20:27 ` Gábor Boskovits
  2019-04-06 20:36 ` znavko
  0 siblings, 2 replies; 8+ messages in thread
From: znavko @ 2019-04-05 13:52 UTC (permalink / raw)
  To: Help Guix


[-- Attachment #1.1: Type: text/plain, Size: 2655 bytes --]

Hello! I am creating my own config. I've disabled networkmanager-service-type, configured wpa-supplicant (but have not yet configured dhcpcd, cause it needs networking service). 
Guix reconfigures my system normally.

But during boot there is a message: rfkill: WLAN soft blocked
And that is why wpa-supplicant fails:

# reboot
# dhclient -v wlp2s0
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/ <https://www.isc.org/software/dhcp/>

RTNETLINK answers: Operation not possible due to RF-kill
Listening on LPF/wlp2s0/xx:xx:xx:xx:55
Sending on   LPF/wlp2s0/xx:xx:xx:xx:55
Sending on   Socket/fallback
DHCPREQUEST for 192.168.1.33 on wlp2s0 to 255.255.255.255 port 67
send_packet: Network is down
dhclient.c:2762: Failed to send 300 byte long packet over wlp2s0 interface.
receive_packet failed on wlp2s0: Network is down
^C

# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:0.0.0.0  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0  TX bytes:0

# rfkill list all
0: ideapad_wlan: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
1: ideapad_bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
2: phy0: Wireless LAN
    Soft blocked: yes
    Hard blocked: no

# rfkill unblock wifi

# herd restart wpa-supplicant
# dhclient -v wlp2s0


So I need manually unblock wifi and restart wpa-supplicant, but it's not coveinent.

I tried this lines as I've got from here https://superuser.com/questions/819547/how-do-i-stop-rfkill-module-from-hardblocking-my-wifi-without-rfkill-command <https://superuser.com/questions/819547/how-do-i-stop-rfkill-module-from-hardblocking-my-wifi-without-rfkill-command> :


 (kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp,wmi,pata_acpi"
                     "modprobe.options.rfkill.master_switch_mode=2"
                     "modprobe.options.rfkill.default_state=1"))

But adding 'wmi,pata_acpi  ' but not helped. If add ideapad_laptop to blacklist, then rfkill does not see interfaces wlan and bluetooth.

# lsmod | grep -e wmi -e acpi
wmi                    32768  1 ideapad_laptop


How to prevent rfkill blocking of wlan?

[-- Attachment #1.2: Type: text/html, Size: 5389 bytes --]

[-- Attachment #2: config-wpa-2.scm --]
[-- Type: text/x-scheme, Size: 4614 bytes --]

;;this is znavko's cute config

(use-modules (gnu) (gnu system nss)
             (gnu system locale) ;;for locale-definition
             (gnu services desktop)
             ;;(gnu services dns) ;;for dnsmasq
             (srfi srfi-1) ;;for remove function
             (gnu services networking) ;;for remove ntp
             (gnu services avahi) ;;for remove avahi
             (gnu services xorg)
             ;;(gnu services databases);;for postgres
             (gnu packages admin) ;;for wpa_supplicant
)
(use-service-modules desktop)
(use-package-modules certs gnome)

;;(define %redundant-linux-modules '("pcspkr" "snd_pcsp"))

(operating-system (host-name "antelope") (timezone "Europe/Moscow") (locale "en_US.utf8")
  (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
                (target "/dev/sda")))
  (file-systems (cons (file-system
                        (device "/dev/sda1") (mount-point "/") (type "ext4"))
                      %base-file-systems))
  (swap-devices '("/dev/sda2"))

  (users (cons* (user-account (name "bob") (group "users")
                (supplementary-groups '("wheel" "netdev" "audio" "video"))
                (home-directory "/home/bob"))
                (user-account (name "mom") (group "users")
                (supplementary-groups '("wheel" "netdev" "audio" "video"))
                (home-directory "/home/mom"))
               %base-user-accounts))

  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access
                   gvfs              ;for user mounts
		   wpa-supplicant
		   isc-dhcp
                   %base-packages))

  (services (cons*  
                    ;;(service postgresql-service-type)
                    (service xfce-desktop-service-type)

                    ;;(service dhcpd-service-type
                    ;;  (dhcpd-configuration
                    ;;    (config-file (local-file "/etc/dhcpcd.conf"))
                    ;;    (interfaces '("wlp2s0"))))


                    (modify-services      
                      (remove (lambda (service)
                        (eq? (service-kind service) ntp-service-type))
                        (remove (lambda (service)
                          (eq? (service-kind service) avahi-service-type))
                          (remove (lambda (service)
                            (eq? (service-kind service) bluetooth-service))

                            (remove (lambda (service)
                              (eq? (service-kind service) network-manager-service-type))

                              ;;(modify-services  
                                (modify-services  
                                  (modify-services %desktop-services
                                    (slim-service-type config =>
                                      (slim-configuration
                                        (xorg-configuration
                                          (xorg-configuration
                                            (extra-config
                                                    
'("Section \"InputClass\"
        Identifier \"touchpad\"
        Driver \"libinput\"
        MatchIsTouchpad \"on\"
        Option \"Tapping\" \"on\"
EndSection")
                                            )))))
                                  )  ;end of modify-services 4th

                                  (wpa-supplicant-service-type config =>
                                    (wpa-supplicant-configuration
                                      (interface "wlp2s0")
                                      (config-file "/etc/wpa_supplicant/wpa_supplicant.conf")))

                                )  ;end of modify-services 3rd

                              ;;)  ;end of modify-services 2nd

                            )  ;end of removenetwork-manager-configuration
                          )  ;end of remove bluetooth-service-type
                        )  ;end of remove avahi
                      )  ;end of remove ntp
                      (elogind-service-type
                        c => (elogind-configuration (handle-lid-switch 'ignore)))
                    );;end of modify-services 1st desktop-services
  ));;end of services

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss)


 (kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp"))
 ;(kernel-arguments
 ;    (list (string-append "modprobe.blacklist="
 ;                         (apply comma-separated
 ;   %redundant-linux-modules))))

);;end of operating-system

  


^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <LbhVgtC--3-1@tutanota.com-LbhmRcf----1>]

end of thread, other threads:[~2019-04-07  7:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-05 13:52 disable software blocking of wifi? znavko
2019-04-06 20:27 ` Gábor Boskovits
2019-04-06 20:36 ` znavko
2019-04-06 20:49   ` Gábor Boskovits
2019-04-06 21:04   ` znavko
2019-04-06 21:21     ` Gábor Boskovits
2019-04-07  7:39     ` znavko
     [not found] <LbhVgtC--3-1@tutanota.com-LbhmRcf----1>
2019-04-05 14:19 ` znavko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.