Announcement

Collapse
No announcement yet.

How to keep wireless driver working across kernel updates?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to keep wireless driver working across kernel updates?

    I had a Kernel update today (through KPackagekit). From 2.6.31-14-generic to 2.6.31-15-generic

    After reboot the Broadcom wl driver does not load -- apparently because this driver is not included in the distribution (I had copied it into the /lib/modules/ tree, as per instructions that came with the driver).
    It started working fine after I repeated the installation steps.

    This is a pain to repeat after every kernel update. Is there someway to fix it so that custom kernel modules (such as wl.ko in this case) keep working?

    PS: It seems that kernel modules need to be rebuilt specifically for every new kernel (with the corresponding linux-headers-...). If this is true, I wonder how Ubuntu managed it! I had the same module working fine across updates and upgrades in the pre-Karmic versions. I do remember that vmware had to rebuild their kernel modules after every kernel update, but that was happening automatically.

    Thanks for any help/advice.
    Dell Inspiron 1525; Kubuntu 9.10 64bit

    #2
    Re: How to keep wireless driver working across kernel updates?

    Install wicd, ditch the network manager.

    Comment


      #3
      Re: How to keep wireless driver working across kernel updates?

      Oh... I had already ditched the default network manager; I am using wicd. (Perhaps I should've mentioned it earlier).
      If I am not way off the mark, the wicd starts up much later in the game. The kernel module must load first if the wireless lan port (eth1 in my case) is to be created at all. Since that is not loading, wicd is unable find any wireless interface to work with.
      Dell Inspiron 1525; Kubuntu 9.10 64bit

      Comment


        #4
        Re: How to keep wireless driver working across kernel updates?

        This is a pain to repeat after every kernel update.
        There is a possibility to write a script, which tests if there are driver files in current kernel folders and autoinstalls them. The script has to be autorun as a root. So it's possible but not so easy.
        For a script see http://ubuntuforums.org/showthread.php?t=835573
        For autorun see for example this from my web site http://www.notes.own.cz/?p=417
        Kubuntu 16.04 on two computers and Kubuntu 17.04 on DELL Latitude 13

        Comment


          #5
          Re: How to keep wireless driver working across kernel updates?

          Thanks for the links, josefko.
          I modified the script in the 1st link you gave, to do what I need with the broadcom drivers. I will come to know whether the "postinst.d" file works, after the next kernel update (I tested the script separately, but not by installing new kernel image/headers).

          I tried making something out of your second link (it's not in English ). I will perhaps return to it if the 1st attempt fails.
          Dell Inspiron 1525; Kubuntu 9.10 64bit

          Comment


            #6
            Re: How to keep wireless driver working across kernel updates?

            Now when I see, that you are interested, I translated the second link

            Autostart script as a root in Kubuntu
            For example to refresh of firewall Guarddog settings automatically after start of the session. Without this refresh Guarddog sometimes blocks all traffic. It works for all users, it is not necessary to add sudo.

            The command that has to be run manually
            Code:
            $sudo /etc/rc.firewall
            Method how to run this command automatically: make a script - here it is a file named firewall
            Code:
            #!/bin/bash
            sleep 1
            /etc/rc.firewall
            Save script somewhere in the system, for example in /opt or /root and make a link to it in the folder
            /etc/init.d
            Run shell command and you are done.
            Code:
            ~$ sudo update-rc.d -f firewall defaults
            After execution of the the last command, there was a warning, but did no harm
            Code:
            etc/init.d/firewall missing LSB information
            Next possibilities - start, stop, restart, remove
            Code:
            $ sudo invoke-rc.d firewall [start|stop|restart]
            $ sudo update-rc.d -f firewall remove
            Kubuntu 16.04 on two computers and Kubuntu 17.04 on DELL Latitude 13

            Comment


              #7
              Re: How to keep wireless driver working across kernel updates?

              Thanks again, josefko!
              This info is quite useful; gave me a full-morning's worth of reading up (man pages and sample scripts) to do.

              In this case (broadcom wl drivers), the kernel modules should load without such a script (I could be wrong...); so unless you/someone correct me on that, I will wait until the until the next kernel update to test that hypothesis.

              I had another use for these scripts -- to autorun nm-applet (for some reason, it doesn't autorun on kde). But for that, I found another way (to change the nm-applet.desktop file in /etc/xdg/autostart) that might be more appropriate, since it is done after KDE comes up. I will post an update on that when I complete the task. So for now, this info you gave goes into my knowledge base for future use.

              Oh BTW, it seems that there are other ways of configuring autostart stuff in Linux now. I am not sure I understood it fully, but some init.d scripts have now been converted to a new "upstart-job" format. A bit confusing, since there is a legacy rc.d method, the init.d/script with LSB-info method, and now the upstart-job method. Seems there is "a lot to learn"
              Dell Inspiron 1525; Kubuntu 9.10 64bit

              Comment


                #8
                Re: How to keep wireless driver working across kernel updates?

                the kernel modules should load without such a script
                Let me know please if and how it works, I need to do something with my webcam driver and what I offered you was just an untested idea how to do it. I still block kernel updates to avoid compilling again and again.
                I tested the autorun script alone and it makes from Guarddog the best firewall on Kubuntu for me - easy to learn, with many options, works behind router and without bugs.
                The most simplest way to autorun - from System Settings - doesn't start scripts as a root. I am glad I have at least one way to run root scripts that works.
                Kubuntu 16.04 on two computers and Kubuntu 17.04 on DELL Latitude 13

                Comment


                  #9
                  Re: How to keep wireless driver working across kernel updates?

                  Bad news: Today I had a kernel update and my script (that I mentioned in prev posts) did not work.
                  It seems that the postinst.d script did run (as root). There was a wl.ko file in my new /lib/modules/2.6.31-16-generic tree. But this file was the same as what I had for the 2.6.31-15-generic. Also, my /usr/src/broadcom-wl-driver directory (where the "make" was supposed to happen) showed only the old timestamps for all files except for the modules.order file.
                  So the exact sequence of what happened seems to be a mystery, but there is one definite "bug" in my script. When it runs make, it uses the "current" linux-headers (instead of the newly-downloaded headers). I have to now find a way to use the new headers and wait for the next release to test whether this works!
                  Dell Inspiron 1525; Kubuntu 9.10 64bit

                  Comment


                    #10
                    Re: How to keep wireless driver working across kernel updates?

                    Perhaps the DKMS package could help? It is intended to automate the process of recompiling & installing kernel modules after a kernel update. You'll need the source code for the module of course and the necessary support for compiling kernel modules (headers, tools etc).

                    I found this package when I needed another version of the hso-driver for my 3G-dongle on my (then) 9.04 kubuntu. Thanks to Pharscape :-)

                    Read here for an instruction on how to get the hso-driver automatically updated (I'm sure you can make the changes to fit your needs):
                    http://www.pharscape.org/forum/index...sg2757#msg2757

                    You can read more on the background to this particular problem here; some links may be interesting:
                    http://www.pharscape.org/article-1238396689.html

                    Comment

                    Working...
                    X