Re: What's the correct procedure for replacing a DKMS module when it's upstreamed?

2023-03-28 Thread Kushal Kumaran
On Tue, Mar 28 2023 at 03:07:10 PM, Andy Smith  wrote:
> Hi Kushal,
>
> On Sun, Mar 26, 2023 at 08:13:33PM -0700, Kushal Kumaran wrote:
>> If you installed a -dkms package to get the kernel module (there are
>> several such packages in the debian repositories),
>
> Yep, that's what I did. The git repository I linked to builds an
> rt89-dkms .deb package.
>
>> uninstalling it will remove it.
>
> But will that remove the module from the currently running kernel?
> That would be undesirable since I would still be relying upon it to
> make the wifi work until I rebooted!
>

You can remove the dkms-built modules for specific kernel versions.  See
the dkms manpage.

-- 
regards,
kushal



Re: What's the correct procedure for replacing a DKMS module when it's upstreamed?

2023-03-28 Thread Andy Smith
Hi Kushal,

On Sun, Mar 26, 2023 at 08:13:33PM -0700, Kushal Kumaran wrote:
> If you installed a -dkms package to get the kernel module (there are
> several such packages in the debian repositories),

Yep, that's what I did. The git repository I linked to builds an
rt89-dkms .deb package.

> uninstalling it will remove it.

But will that remove the module from the currently running kernel?
That would be undesirable since I would still be relying upon it to
make the wifi work until I rebooted!

Cheers,
Andy



Re: What's the correct procedure for replacing a DKMS module when it's upstreamed?

2023-03-26 Thread Kushal Kumaran
On Sun, Mar 26 2023 at 05:07:29 PM, Andy Smith  wrote:
> On Sun, Mar 26, 2023 at 04:51:25AM +, Andy Smith wrote:
>> I have to build the kernel driver as an external DKMS
>> module from:
>> 
>> https://github.com/lwfinger/rtw89
>> 
>> Specifically that is the rtw_8852be module.
>> 
>> That works fine, but it seems that this driver actually is present
>> in upstream kernel versions somewhere in v6.1.x.
>
> After asking about this on debian-kernel it was pointed out that the
> driver is not actually functional until somewhere in the 6.2
> upstream kernel, so is unlikely to be making it to a 6.1 LTS kernel
> that will be found in bookworm.
>
> It may be in the trixie kernel package and/or I may end up getting
> it from some future bookworm-backports kernel package, so the
> question still remains about the proper way to transition from a
> DKMS to an included module.
>

If you used dkms add to install the driver in the first place, dkms
remove will remove it.  See the manpage for the dkms command for
details.

If you installed a -dkms package to get the kernel module (there are
several such packages in the debian repositories), uninstalling it will
remove it.

-- 
regards,
kushal



Re: What's the correct procedure for replacing a DKMS module when it's upstreamed?

2023-03-26 Thread Andy Smith
On Sun, Mar 26, 2023 at 04:51:25AM +, Andy Smith wrote:
> I have to build the kernel driver as an external DKMS
> module from:
> 
> https://github.com/lwfinger/rtw89
> 
> Specifically that is the rtw_8852be module.
> 
> That works fine, but it seems that this driver actually is present
> in upstream kernel versions somewhere in v6.1.x.

After asking about this on debian-kernel it was pointed out that the
driver is not actually functional until somewhere in the 6.2
upstream kernel, so is unlikely to be making it to a 6.1 LTS kernel
that will be found in bookworm.

It may be in the trixie kernel package and/or I may end up getting
it from some future bookworm-backports kernel package, so the
question still remains about the proper way to transition from a
DKMS to an included module.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



What's the correct procedure for replacing a DKMS module when it's upstreamed?

2023-03-25 Thread Andy Smith
Hi,

I have a Debian testing system with a Realtek 8852be wireless card.
As the kernel in Debian testing does not currently support this
hardware, I have to build the kernel driver as an external DKMS
module from:

https://github.com/lwfinger/rtw89

Specifically that is the rtw_8852be module.

That works fine, but it seems that this driver actually is present
in upstream kernel versions somewhere in v6.1.x.

As far as I understand, as the upstream kernel does have this driver
from some point in 6.1.x, then at some point a kernel upgrade on
this system is going to end up trying to build and install a DKMS
module that already exists in the kernel it has just installed.

What is the correct procedure for transitioning between the DKMS
module and the one inside the new kernel package, when the time
comes?

How can I stop DKMS from building the rtw89 driver on a particular
new kernel version without removing it all from the kernel I'll be
using at the point of install?

As the device is a laptop and its only form of networking is by
wifi, it would be rather inconvenient if the wifi stopped working in
the middle of an upgrade. If that does happen to occur though I can
get out of the pickle by using USB tethering to my phone. Still, I'd
rather avoid it.

Will uninstalling the rtw89-dkms package unload the modules from the
currently-running kernel immediately? If not then I suppose the
correct way, upon seeing that a new kernel package containing the
driver is to be installed, would be to uninstall rtw89-dkms first.
That way the hooks from the rtw89-dkms package would not be called
when the new kernel package is installed.

That might then have the disadvantage that if my next boot is not
into the new kernel then there will no longer be an rtw_8852be
module and so no networking. I will keep the checkout of the driver
locally though, and I already installed it once so can do so again
if need be.

Thoughts?

I do not think there is a kernel package available in any version of
Debian right now that has this driver since:

$ apt-file search rtw89_8852be

returns nothing whereas for example:

$ apt-file search rtw89_8852a

does have results in the latest kernel packages.

Compare also:

https://codesearch.debian.net/search?q=rtw89_8852a=1

vs.:

https://codesearch.debian.net/search?q=rtw89_8852be=1

I know I could get ahead of the game by building an upstream kernel
package but to be honest I'd rather just consume Debian package
updates plus a DKMS until it's included.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting