-
Notifications
You must be signed in to change notification settings - Fork 60
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
linux-stracciatella: add 'CONFIG_MODULE_UNLOAD=y' #803
Comments
Thank you for reporting this compatibility issue. Is there a reason you haven't opened up an upstream issue/PR to link to this one?
xochitl also tries to unload/load the wifi module, same with rm2-suspend-fix.
Yes it does, therwise xochitl wouldn't be able to unload the wifi module.
The other changes to the koreader suspend/resume scripts would better live in rm2-suspend-fix after thinking through how to do it in a way that is compatible with all the other packages in toltec. Oxide would not be happy with it for example. |
Do you mean in reMarkable/linux? I don't see a lot of activity there and I don't have the kernel dev knowledge to justify this change. So, I thought the best chance to see this even considered would be in Etn40ff's kernel. Glad to hear it works on rM2 at least. In rM1 I get the output below. Are you (or someone else) able to confirm?
Good point about the disabling of some of those services. I think usb is using |
No, I meant Etn40ff's repository for the kernel, which is upstream for toltec.
I only have a rM1 myself, so I can't confirm that things work as expected with this kernel on a rM2.
Oh, you are probably correct about the USB handling, it's still required for normal wireless communication to work when other applications are running. For toltec to accept a fix, we would want to avoid outright disabling services where possible, and try to resolve any conflicts instead. Which is why toltec/package/xochitl/package Lines 68 to 75 in 37e693f
Upon reviewing things, disabling toltec/package/xochitl/xochitl Lines 18 to 20 in 37e693f
On the rM1 we disable toltec/package/toltec-base/package Lines 36 to 38 in 37e693f
Upon looking at |
I can confirm that |
They probably did it to allow unloading the wifi module on the rM2 when it suspends, which I don't believe they ever backported to the rM1. |
@Etn40ff Thank you so much! You can count on me for rM1 testing. I would submit a PR to your repo, but I am not sure if other files need to change. I also couldn't figure out how you are generating the tar file that is sourced by the toltec recipe. I see rM2 has
whereas rM1 only has
|
It's just using a GitHub feature that lets you download an export of any commit hash. So if you have your own fork with changes you can change the URL to be your fork, and the commit hash of the latest commit you made. Then you can use toltecmk to build the recipe locally for testing. |
Thanks for clearing that up Eeems! Also, I was wondering where that To answer your questions, when dhcpcd[138]: wlan0: interface not found or invalid
dhcpcd[138]: dhcpcd exited
systemd[1]: dhcpcd.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: dhcpcd.service: Failed with result 'exit-code'.
systemd[1]: Failed to start dhcpcd on all interfaces.
systemd[1]: dhcpcd.service: Scheduled restart job, restart counter is at 1. When systemd[1]: sys-subsystem-net-devices-wlan0.device: Job sys-subsystem-net-devices-wlan0.device/start timed out.
systemd[1]: Timed out waiting for device /sys/subsystem/net/devices/wlan0.
systemd[1]: Dependency failed for Disable wowlan.
systemd[1]: disable-wowlan.service: Job disable-wowlan.service/start failed with result 'dependency'.
systemd[1]: sys-subsystem-net-devices-wlan0.device: Job sys-subsystem-net-devices-wlan0.device/start failed with result 'timeout'.
That's interesting! Based on this, I managed to speed up USBnet startup even further by disabling systemd[1]: [email protected]: Bound to unit sys-subsystem-net-devices-usb1.device, but unit isn't active.
systemd[1]: Dependency failed for ifplugd on usb1.
systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'. |
Based on this, I think it would make sense to leave the modules loaded on boot, and only unload it on suspend or disable of wifi. A script can determine if wifi should be on or not by looking at the value stored under We would have to think through all the possible launchers and making sure they properly unloaded the module if it should be off, and that they work properly with enabling the module when turning on wifi. The current list of launchers we would have to work with:
Oh, we should probably add that to |
I propose to remove
for rm2 and add
for rm1. If you agree I will make the appropriate changes. |
I would recommend leaving |
Upon thinking about this a bit more, it would also be worth upstreaming this all the way to rM's kernel. While there isn't a bunch of activity on the repo, that's because this is just their public facing repository. They do all their development in private repos, and then update the public repos after releasing OS updates. They have been receptive to changes in the past. It can tend to be slow though as any work on merging community member changes on public repos appears to only be done as a side-of-the-desk activity. |
This is now #808, it needs testing on RM1 |
Closed by Etn40ff/linux-remarkable#2 and #808. Thank you Etn40ff and Eeems! |
Device/Package information:
Describe the issue
The stock rM1 kernel does not allow unloading modules.
Packages, such as KOReader, that rely on
modprobe brcmfmac
andmodprobe -r brcmfmac
to enable and disable Wi-Fi (and to detect Wi-Fi status) do not work as expected.Workaround
/etc/modprobe.d/blacklist.conf
/opt/koreader/enable-wifi.sh
/opt/koreader/disable-wifi.sh
Side Benefits
With this workaround I am seeing an increase in battery life, and USBnet startup of around 2 seconds
Questions
CONFIG_MODULE_UNLOAD=y
to linux-stracciatella?The text was updated successfully, but these errors were encountered: