Closed UnsavedTrash closed 1 year ago
From the preview it seems that it did load the desktop environment (albeit the stock one), I think scrcpy may be incorrectly capturing the screen. Try to play around with scrcpy flags in order to get it to capture the screen properly.
The "The host system has incompatible settings" is the script not being able to get the native resolution of the phone. Since the code relies on shebang behavior, it is very likely something changed in the android terminal output.
Either way, thanks for the (very detailed) reporting, however I may not be available at the moment because I am studying for an exam.
Also please try launching this script with the resolution and density already set:
./startscreen.sh 1920x1080 120
running it like that yields identical behavior to what was initially reported.
$ ./startscreen.sh 1920x1080 120
* daemon not running; starting now at tcp:5037
* daemon started successfully
payload/stage1.sh: 1 file pushed, 0 skipped. 5.7 MB/s (881 bytes in 0.000s)
payload/stage2.sh: 1 file pushed, 0 skipped. 7.0 MB/s (1247 bytes in 0.000s)
scrcpy 2.1 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 142.1 MB/s (56955 bytes in 0.000s)
-----------------------------------------------------
| |
| Please unlock the phone once the screen appears |
| |
-----------------------------------------------------
SCRCPY PID: 5693
[server] INFO: Device: [Google] google Pixel 7 Pro (Android 13)
[server] WARN: Display doesn't have FLAG_SUPPORTS_PROTECTED_BUFFERS flag, mirroring can be restricted
INFO: USB device: 2B051FDH300DEP (18d1:4ee7) Google Pixel 7 Pro
INFO: Renderer: opengl
INFO: OpenGL version: 4.6.0 NVIDIA 535.54.03
INFO: Trilinear filtering enabled
INFO: Texture: 1080x2336
[server] INFO: Device screen turned off
~/scrcpy-desktop main ./startscreen.sh ✔
scrcpy 2.1 <https://github.com/Genymobile/scrcpy>
payload/stage1.sh: 1 file push...5.8 MB/s (881 bytes in 0.000s)
payload/stage2.sh: 1 file push....3 MB/s (1247 bytes in 0.000s)
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 212.0 MB/s (56955 bytes in 0.000s)
-----------------------------------------------------
| |
| Please unlock the phone once the screen appears |
| |
-----------------------------------------------------
SCRCPY PID: 43660
[server] INFO: Device: [Google] google Pixel 6a (Android 13)
INFO: USB device: 26101JEGR01982 (18d1:4ee7) Google Pixel 6a
[server] WARN: Display doesn't have FLAG_SUPPORTS_PROTECTED_BUFFERS flag, mirroring can be restricted
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 23.0.4
INFO: Trilinear filtering enabled
INFO: Texture: 1080x2400
[server] INFO: Device screen turned off
I am also experiencing this issue. It was working the day before yesterday, before I did my weekly computer updates, if that provides any hints.
Mobile OS: Stock Linux OS: Manjaro 6.2.16-2
can you give me your /var/log/pacman.log
i may find what might be the offending package @kinostl
@nikp123 Sure thing. It includes a lot, it was a kernel update.
you upgraded scrcpy 2.0 -> 2.1, that may be our clue
Yep confirmed on scrcpy 2.1, we have the EXACT same issue.
It's weird though, sometimes it works and sometimes it doesn't.
Ok, narrowing it down a bit. It seems that scrcpy grabs the (wrong?) display. However if you launch a second instance it grabs the correct one.
Activating a second instance does not fix it for me.
This is an upstream regression, since Android is reporting the correct "virtual resolution" via dumpsys display
. Might have to file this over at scrcpy.
If you do adb shell 'dumpsys display | grep mDisplayId='
you'll get the active display IDs of your android device.
0 is always your primary, your phone's screen. The other ID is the virtual display, setting it via scrcpy --display $num
, it recognizes the screen properly, but it fails to grab its resolution. This may be a bug on scrcpy's part as suggested by my previous comment.
There isn't much I can do apart from getting this fixed in upstream?
For right now the advice to downgrade was useful enough for me. I just confirmed that downgrading fixes it on my end.
@kinostl can you try invoking scrcpy manually just to make sure that my behaviour of it fixing itself when running a second instance isn't a fluke. ie:
adb shell 'dumpsys display | grep mDisplayId='
to grab the display IDscrcpy --display $num
Already filed at https://github.com/Genymobile/scrcpy/issues/4157
Seems that their crop thing is not up to snuff. I'll try making it work with the --crop
parameter.
@nikp123 I don't think I can replicate on my end.
Weird, I guess its a per machine behaviour.
Already filed at Genymobile/scrcpy#4157 Seems that their crop thing is not up to snuff. I'll try making it work with the
--crop
parameter.
--crop
doesn't really help, it's still the wrong display resolution. We'll have to wait for an update from upstream.
Seems to be fixed in a future release, we just need to wait for it to get released.
I can also confirm that the downgrade to scrcpy 2.0.1 fixed the issue for me.
Scrcpy 2.1.1 fixes this. Closing.
Desktop OS: Arch Linux Desktop details: RTX 3090, R7-5700x, NVIDIA driver 535.54.03 Mobile OS: GrapheneOS Model: Pixel 7 Pro SCRCPY Version: 2.1
Although the script does set all the right developer options and reboots the phone after the first run, it fails to actually engage a desktop environment. I have tried many configurations and a few different versions of Null keyboard1 as well as many different settings configurations of Taskbar. The secondary screen overlay does show and it gives me a slice of the view but never actually loads Taskbar.
I also get the error
Host system has incompatible settings. Sorry about that.
The SCRCPY window opens in the standard resolution of the pixel as if I was running SCRCPY unmodified. The only difference being no ability to interact, see any apps, and the bottom third of the screen displays nothing.
If I attempt to expand the window it also shows no additional image to the left or right, although in the hovering overlay for the emulated second display when looking at the phone shows much more of the image. Despite the hovering 2nd display showing more of the image it still shows no Taskbar, just the wallpaper.
Phone POV![image](https://github.com/nikp123/scrcpy-desktop/assets/75506304/b4ac84f2-12af-4796-be88-f045ea12f3cb)
1 null keyboard is no longer available on google play so the read me may need updating.