Skip to content

feat: add X server connection retry mechanism#429

Closed
chenjun1982 wants to merge 1 commit intoubuntu:mainfrom
chenjun1982:main
Closed

feat: add X server connection retry mechanism#429
chenjun1982 wants to merge 1 commit intoubuntu:mainfrom
chenjun1982:main

Conversation

@chenjun1982
Copy link
Copy Markdown

Added configurable retry mechanism for X server connection failures when receiving SIGUSR1 signal. The system now supports retrying connection attempts with configurable timeout and maximum retry count. This improves reliability when X server startup encounters temporary issues.

New configuration options in lightdm.conf:

  • xserver-retry-on-connection-failure: Enable/disable retry mechanism
  • xserver-retry-timeout: Timeout in seconds for retry attempts (default:5)
  • xserver-retry-max-count: Maximum retry attempts (default: 3)

The implementation tracks retry attempts, sets up timeout handlers, and properly cleans up resources. Connection success stops the retry mechanism immediately, while failures continue retrying until timeout or max attempts are reached.

Log: Added automatic retry for X server connection failures

Influence:

  1. Test X server startup with normal successful connection
  2. Test X server connection failure scenario with retry mechanism enabled
  3. Verify retry timeout behavior with different timeout values
  4. Test maximum retry count enforcement
  5. Verify configuration options work correctly in lightdm.conf
  6. Test retry mechanism disabled configuration
  7. Verify resource cleanup after connection success/failure
  8. Test additional SIGUSR1 signals after successful connection

@chenjun1982 chenjun1982 reopened this Mar 12, 2026
@chenjun1982
Copy link
Copy Markdown
Author

chenjun1982 commented Mar 12, 2026

When the Linux system restarts, LightDM starts the X service. LightDM then connects to the X service after receiving signal 10 from it. At this point, the X service may reset and resend signal 10, but LightDM does not reprocess this signal, resulting in a black screen.
企业微信截图_17725044236670

Added configurable retry mechanism for X server connection failures when
receiving SIGUSR1 signal. The system now supports retrying connection
attempts with configurable timeout and maximum retry count. This
improves reliability when X server startup encounters temporary issues.

New configuration options in lightdm.conf:
- xserver-retry-on-connection-failure: Enable/disable retry mechanism
- xserver-retry-timeout: Timeout in seconds for retry attempts (default:5)
- xserver-retry-max-count: Maximum retry attempts (default: 3)

The implementation tracks retry attempts, sets up timeout handlers,
and properly cleans up resources. Connection success stops the retry
mechanism immediately, while failures continue retrying until timeout or
max attempts are reached.

Log: Added automatic retry for X server connection failures

Influence:
1. Test X server startup with normal successful connection
2. Test X server connection failure scenario with retry mechanism enabled
3. Verify retry timeout behavior with different timeout values
4. Test maximum retry count enforcement
5. Verify configuration options work correctly in lightdm.conf
6. Test retry mechanism disabled configuration
7. Verify resource cleanup after connection success/failure
8. Test additional SIGUSR1 signals after successful connection
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