Skip to content
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

investigate if per process swtcon makes sense #3

Closed
raisjn opened this issue Oct 28, 2020 · 4 comments
Closed

investigate if per process swtcon makes sense #3

raisjn opened this issue Oct 28, 2020 · 4 comments
Labels
question Further information is requested

Comments

@raisjn
Copy link
Collaborator

raisjn commented Oct 28, 2020

this task is to run multiple applications using the LD_PRELOAD technique (or other) to get a SWTCON per process and investigate what happens in terms of stability and performance of the display

@raisjn
Copy link
Collaborator Author

raisjn commented Oct 28, 2020

one way to do this would be: LD_PRELOAD=./librm2fb.so APP="myapp" remarkable-shutdown. we can then use dlopen() to open myapp binary (which has to be compiled as a shared library) and extract the main() and call it.

the pie flag could be interesting here too (it allows binary to be executable or shared library)

@pgaskin
Copy link

pgaskin commented Oct 29, 2020

To make it more streamlined, if you can make a copy of remarkable-shutdown, you should be able to use DT_NEEDED to have a persistent LD_PRELOAD, and make it so you can symlink the binary to another filename and have it load the filename plus .real (or something like that). This would also give you more flexibility for changes to the shim without breaking compatibility.

@raisjn
Copy link
Collaborator Author

raisjn commented Nov 3, 2020

i've been playing around with pausing and resuming processes that use SWTCON and having two of them run at the same time (or even one running, the other paused and then resumed) will cause the state of the display to get messed up.

in specific, one thing that happens is: it seems like the SWTCON loses the knowledge of how to activate pixels if the pixel is not in the state the SWTCON expects. one thing that helps here is flashing a black then white screen and then the SWTCON seems to return to a better state.

i think (big guess here) the SWTCON has knowledge or memory of what is last displayed and uses that to figure out how to drive the display.

@raisjn raisjn added the question Further information is requested label Nov 5, 2020
@raisjn
Copy link
Collaborator Author

raisjn commented Dec 24, 2020

so far, we've decided to go with one server process that does SWTCON stuff

@raisjn raisjn closed this as completed Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants