Comments (7)
@plredmond: thank you so much for reporting this and the reliable repro steps! it looks like a file descriptor was going away when keyd is restarted. i put in some hacky code to re-open the file descriptors in d2e0387 and it looks like the infinite loop + CPU usage goes away. please try it out - you can use the latest build on the build servers: build.rmkit.dev/ and verify it fixes it
from rmkit.
Does it handle the folio connecting and disconnecting properly when keyd isn't running?
from rmkit.
Yes, it handles the type folio properly when keyd isn't running.
To answer your question I did the following:
(in type-folio, but "lying down"/disconnected)
(in "flight mode")
- via ssh (over usb)
systemctl disable keyd
reboot
- via ssh (over usb)
htop
(to monitor the behavior of remux)
- by hand (after each step pausing 30s to observe
htop
in the ssh window on my laptop and confirm that remux is ok before continuing)- xochitl onscreen: unlock xochitl
- xochitl onscreen: "stand up"/connect type folio 🧍♂️
- xochitl onscreen: "lie down"/disconnect type folio 🛌
- xochitl onscreen: remove rm2 from type folio 📤
- xochitl onscreen: swipe to summon remux (remux appears)
- xochitl+remux onscreen: tap to select yaft from remux (yaft appears)
- yaft portrait-mode onscreen: place rm in type folio 📥
- yaft portrait-mode onscreen: "stand up"/connect type folio 🧍♂️ (yaft changes to landscape-mode)
- yaft landscape-mode onscreen: "lie down"/disconnect type folio 🛌 (yaft changes to portrait-mode)
Throughout this sequence of actions, remux used negligible cpu and 1% of memory.
from rmkit.
Well that's good to know. I haven't looked closely at the code to see how it gets the key device(s) to work with. When keyd is not running, there will be a key input device for the power button, and one for the folio. The folio device will be removed and re-added every time it's disconnected and reconnected. With kyed running the same stuff happens, but there are now new virtual input devices provided by keyd, and it will grab all input on the other devices. Restarting keyd would remove and re-add these virtual devices, as well as ungrab, and then grab the other devices.
Depending on how the code is setup to handles these devices, it might not be happy with these input devices going away as they were the only ones not grabbed when remux started. And when keyd isn't running, it's just not an issue as it gets the power button input device and not the folio as the key input. So the folio device going away doesn't matter. @raisjn or someone else who has looked closer at the code would confirm.
from rmkit.
Ok, thanks for explaining that. I'll try looking at the code if I have time later to set up a build environment.
from rmkit.
Ok, thanks for explaining that. I'll try looking at the code if I have time later to set up a build environment.
If you aren't averse to using docker, using the docker version of the makefile targets does simplify setting up a build environment.
from rmkit.
Thanks @raisjn!
- I downloaded
remux
with sha25636ecc8e0625d2794e4b3741150a5e44928bfe75f4fd7cf466c6968fd0c1c7707
and alsoremux.service
and placed them respectively at/opt/bin/remux
andlib/systemd/system/remux.service
reboot
- Confirm that the
remux
which is running has the above sha256 systemctl restart keyd
Jul 01 20:22:01 reMarkable remux[193]: OPENING /dev/input/event1 AS WACOM
Jul 01 20:22:01 reMarkable remux[193]: OPENING /dev/input/event2 AS TOUCH
Jul 01 20:22:01 reMarkable remux[193]: OPENING /dev/input/event3 : UNKNOWN EVENT DEVICE
Jul 01 20:22:01 reMarkable remux[193]: ERROR OPENING INPUT DEVICE /dev/input/event4
Jul 01 20:22:01 reMarkable systemd[1]: keyd.service: Main process exited, code=exited, status=15/n/a
Jul 01 20:22:01 reMarkable systemd[1]: keyd.service: Failed with result 'exit-code'.
Jul 01 20:22:01 reMarkable systemd[1]: Stopped key remapping daemon.
Jul 01 20:22:01 reMarkable systemd[1]: Started key remapping daemon.
Jul 01 20:22:01 reMarkable kernel: input: keyd virtual keyboard as /devices/virtual/input/input7
Jul 01 20:22:01 reMarkable keyd[337]: CONFIG: parsing /opt/etc/keyd/default.conf
Jul 01 20:22:01 reMarkable kernel: input: keyd virtual pointer as /devices/virtual/input/input8
Jul 01 20:22:01 reMarkable keyd[337]: Starting keyd v2.4.3 ()
Jul 01 20:22:01 reMarkable systemd-logind[237]: Watching system buttons on /dev/input/event4 (keyd virtual keyboard)
Jul 01 20:22:01 reMarkable keyd[337]: DEVICE: ignoring 0fac:1ade (keyd virtual pointer)
Jul 01 20:22:01 reMarkable keyd[337]: DEVICE: match 2edd:0001 /opt/etc/keyd/default.conf (rM_Keyboard)
Jul 01 20:22:01 reMarkable keyd[337]: DEVICE: ignoring 056a:0000 (Wacom I2C Digitizer)
Jul 01 20:22:11 reMarkable systemd[1]: [email protected]: Succeeded.
Jul 01 20:22:11 reMarkable systemd[1]: [email protected]: Scheduled restart job, restart counter is at 1.
Jul 01 20:22:11 reMarkable systemd[1]: Stopped Getty on tty1.
Jul 01 20:22:11 reMarkable systemd[1]: Started Getty on tty1.
load average stays low and remux
seems happy at 0.0% cpu usage! i guess this is fixed 🙂 thank you!
from rmkit.
Related Issues (20)
- [total noob] can you draw monochrome / b&w images to e-ink displays? HOT 8
- [rmkit] Add font fallback support to rmkit.h HOT 2
- [remux] Remux does not seem to clear input buffers on launching another app HOT 3
- [remux] Is remux compatible with 3.8 version ? HOT 2
- Add support for Kobo Sage HOT 2
- Rename default branch to main HOT 2
- remux eats 40% of the CPU after a while on 3.8.2.1965 HOT 10
- [harmony] Kobo Elipsa 2E eraser support HOT 3
- [harmony] Export and save functions on kobo Elipsa 2E do not work HOT 8
- Remux crashes after restarting rM1 HOT 2
- [harmony] project filenames are invalid on Windows because of date formatting
- [general] Rendering regression(s) after FBInk upgrade HOT 12
- [iago] rectangle not perfectly straight
- [remux] Use SleepScreenPath setting from xochitl.conf if present
- [remux] Display personal information on suspend screen
- [bufshot] Screenshots are ~80kb
- [remux] "Corrupted" shutdown screen HOT 2
- [remux] remux may prevent the device from entering sleep triggered by xochitl HOT 22
- error [genie; lamp] - Install without toltec - reMarcable2 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rmkit.