Skip to content

Resume device output after user program restart #23

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thwuedwin
Copy link

If the userspace program exits while the game is paused, the display flag is not cleared, causing the kernel module to stop producing output. As a result, restarting the program in this state causes it to hang on waiting for device data.

This patch resets the display flag on program exit, ensuring the kernel module resumes output normally when the program is restarted.

kxo has a critical issue: if the userspace program xo-user exits while
the game is paused, restarting the program will cause it to hang.

The userspace program communicates the game state to the kernel module
via the 'kxo_state' attribute exposed through sysfs. This attribute
reflects the current game state (e.g., paused, quitting) and controls
whether the kernel module continues to produce output.

However, if the userspace program exits while the game is paused, the
'display' flag is not cleared. As a result, the kernel module does not
resume producing output when the program is relaunched, even though it
is still functioning correctly.

This patch resolves the issue by resetting the 'display' flag when the
userspace program exits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant