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

Prevent sleep when scrcpy is fullscreen on Linux #1370

Closed
NusryNizam opened this issue May 9, 2020 · 5 comments
Closed

Prevent sleep when scrcpy is fullscreen on Linux #1370

NusryNizam opened this issue May 9, 2020 · 5 comments

Comments

@NusryNizam
Copy link

Whenever I watch a video using scrcpy on Ubuntu (20.04), the screen dims and turns off. I would like to make it be on while scrcpy is fullscreen.
Is it possible to implement at software level?

@char101
Copy link

char101 commented May 9, 2020

You can create a script that

  1. check if scrcpy is running
  2. run adb shell input keyevent mouse to prevent the screen from turning off
  3. sleep for 30 seconds or longer depending on your screen timeout setting
  4. go to 1.

@rom1v
Copy link
Collaborator

rom1v commented May 9, 2020

The feature --stay-awake is implemented on development branch: #631 (comment)

@rom1v rom1v closed this as completed May 9, 2020
@NusryNizam
Copy link
Author

NusryNizam commented May 9, 2020

@rom1v I mean to prevent Linux from sleeping while using scrcpy in fullscreen.

@rom1v
Copy link
Collaborator

rom1v commented May 9, 2020

Oh ok, it's the reverse of #380 then :)

@rom1v rom1v reopened this May 9, 2020
rom1v pushed a commit that referenced this issue Jun 18, 2020
PR #1502 <#1502>
Fixes #1370 <#1370>

Signed-off-by: Romain Vimont <rom@rom1v.com>
@rom1v
Copy link
Collaborator

rom1v commented Jun 18, 2020

Fixed by #1502.

@rom1v rom1v closed this as completed Jun 18, 2020
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

No branches or pull requests

3 participants