[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re:Re: How to run "rmmod xxx" when I shutdown my computer.
From: |
tumashu |
Subject: |
Re:Re: How to run "rmmod xxx" when I shutdown my computer. |
Date: |
Sat, 26 Feb 2022 08:16:25 +0800 (CST) |
At 2022-02-26 07:51:53, jbranso@dismail.de wrote:
>February 22, 2022 5:59 PM, "tumashu" <tumashu@163.com> wrote:
>
>> rmmod mt7921e, a mediatek wifi module
>>
>> I find this mode let shutdow time > 10min, so i want to unload it before
>> shutdown
>>
>> not the blacklight.
>
>I suppose another possibility is to purchase an open wifi dongle from
>thinkpenguin.
Good idea too, now i have resolve this problem in the below service :-)
(define-public mt7921e-service-type
(shepherd-service-type
'mt7921e
(lambda _
(shepherd-service
(documentation "关机之前运行 'rmmod mt7921e' 命令。
ThinkPad-T14-AMD 笔记本电脑使用 MEDIATEK 7961 无线网卡,所以开机的时候会自动加
载 mt7921e 内核模块,但这个模块会导致关机时间消耗很长时间(> 5分钟), 这个服务的
主要作用就是在关机之前将 mt7921 模块卸载,加快关机。")
(provision '(mt7921e))
(requirement '(xorg-server))
(start #~(lambda _
(invoke #$(file-append kmod "/bin/modprobe") "mt7921e")
#t))
(stop #~(lambda _
(invoke #$(file-append kmod "/bin/rmmod") "mt7921e")
#f))))
#f
(description "关机之前运行 'rmmod mt7921e' 命令。")))
>
>>
>> --
>> 发自我的网易邮箱手机智能版
>> <br/><br/><br/>
>>
>> ----- Original Message -----
>> From: jbranso@dismail.de
>> To: tumashu <tumashu@163.com>, help-guix <help-guix@gnu.org>
>> Sent: Tue, 22 Feb 2022 22:47:32 +0000
>> Subject: Re: How to run "rmmod xxx" when I shutdown my computer.
>>
>> February 21, 2022 9:45 PM, "tumashu" <tumashu@163.com> wrote:
>>
>>> Hello, every one.
>>>
>>> I find a kernel module let shutdown time > 10min, so I want to run "rmmod
>>> xxx" before shutdown or
>>> reboot. How to do this job in guix system?
>>
>> Hmmm...Could you potentially blacklist the module?
>>
>> https://guix.gnu.org/manual/en/html_node/Bootloader-Configuration.html
>>
>> The linux-arguments may be a way to blacklist kernel modules.
>>
>> May I ask why you wish to remove the module before shutdown or reboot?
>>
>> Also which kernel module?
>>
>>>
>>> Thanks!