as there is currently no way to use "samsung dex for pc" on linux desktops, it would be great to be able to use scrcpy for it
This would be great! DeX on Windows offers this functionality, so it shouldn't be to difficult to somehow trick the phone into displaying in Dex mode
i think this would only be useful if it would be possible to use drm-content in scrcpy
i think this would only be useful if it would be possible to use drm-content in scrcpy
Not really. Dex can do much more than playing Netflix.
scrcpy is already absolutely amazing - I love it!
but that would be the icing on the cake
Could you test the new --display option on dev (the development branch), please?
Here is a win64 release for the current dev branch:
SHA256
09489ac673ed3b0bb7aba7e0858c43137a7480d1a2d4f8a51f698acbc49be735 scrcpy-server
c9be0cd73651a376932ca0e4ca1c07275aa776a5e5520b5b184fcff943affdd5 scrcpy.exe
(replace these two files in the v1.12.1 release)
I have tested it on my samsung galaxy note10+,
It has two displays
[server] ERROR: Try to use one of the available display ids:
[server] ERROR: scrcpy --display 0
[server] ERROR: scrcpy --display 2
Press any key to continue...
Display 0 works like usual scrcpy.
scrcpy-win64-v1.12.1-4-gf9786e5> .\scrcpy.exe --display 2
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
.\scrcpy-server: 1 file pushed. 3.0 MB/s (27842 bytes in 0.009s)
[server] INFO: Device: samsung SM-N9750 (Android 10)
[server] WARN: Display doesn't have FLAG_SUPPORTS_PROTECTED_BUFFERS flag, mirroring can be restricted
INFO: Initial texture: 1920x1080
Display 2 has only black screen. And it doesn't have any response.
OK, thank you for the test :+1:
So this flag is not set (whatever it means) for Dex⦠:disappointed:
-- display flag worked for me on the Note 9. Dex must be running separately for the flag to work.

Cool, thanks :+1:
(While you're here, could you test rotation with Ctrl+β and Ctrl+β, and that clicks work correctly on rotated display, please?)
Cool, thanks π
(While you're here, could you test rotation with
Ctrl+βandCtrl+β, and that clicks work correctly on rotated display, please?)
Rotation worked but the launcher did not adjust itself. That might be a limitation with the Dex launcher though. Clicks worked as expected too.
If we can find a way to trigger Dex manually, this would be perfect. scrcpy with a high bit rate seems to be much smoother than the Dex application.

Rotation worked but the launcher did not adjust itself. That might be a limitation with the Dex launcher though.
Yes, that's expected, this is just a local rotation, for applications like Camera or video conferencing apps which keep their system orientation but rotate their widgets (in that case, it is convenient to rotate the display manually).
To rotate the app, it's Ctrl+r (but works only if the app support the requested orientation).
If we can find a way to trigger Dex manually
(TBH, I don't really know what Dex is, so I hope other people will find a way :wink:)
Sorry, I only checked single clicks previously and they worked. But double-clicking doesn't work when rotated. And right-click does not work in any state.
To rotate the app, it's
Ctrl+r(but works only if the app support the requested orientation).
Ctrl+r doesn't change anything in supported apps (WhatsApp, Gallery) in both landscape and rotated states.
If we can find a way to trigger Dex manually
(TBH, I don't really know what Dex is, so I hope other people will find a way π)
Dex is the Samsung's "Android desktop mode" and it's triggered if you attach an external monitor to a Samsung smartphone with a cable. In practice you have a desktop computer using only your smartphone and an external monitor.
What @dishanrajapaksha means with "trigger Dex manually" (I guess since I'm looking for this solution too) is to make the smartphone to think that and external monitor is attached but without attaching an HDMI cable to the smartphone. It could be the final perfect solution to have a wireless "Android desktop mode" :)
Sorry, I only checked single clicks previously and they worked. But double-clicking doesn't work when rotated.
Oh, good catch! Fixed by 9f4735ede3c541163a530c5c474b39ba4696773b.
And right-click does not work in any state.
Right-click is bound to BACK, because on "normal" devices, there is no meaningful "right-click". :confused:
Ctrl+r doesn't change anything in supported apps (WhatsApp, Gallery) in both landscape and rotated states.
Dex maybe does not support rotation at all.
If you use Ctrl+r on these apps on the device, does it work?
-- displayflag worked for me on the Note 9. Dex must be running separately for the flag to work.
Hmmm, why I only see black screen? Do you do anything else?
Ctrl+r doesn't change anything in supported apps (WhatsApp, Gallery) in both landscape and rotated states.
Ah yes. I forgot that. Dex has some right-click menus just like what you'd find in Windows.
Also, Dex freeform windows have 'resize' cursor icon when the cursor is moved to window edges. That's not triggering in scrcpy.
Dex maybe does not support rotation at all.
I think this is the case, nothing happens in the Dex window when I press Ctrl+r.
If you use Ctrl+r on these apps on the device, does it work?
Yes. Device display apps get changed.
Hmmm, why I only see black screen? Do you do anything else?
Did you try running the display command while Dex is running? I connected the phone to my laptop and opened Dex Windows app and then ran scrcpy with the display command.
Also, Dex freeform windows have 'resize' cursor icon too when the cursor is moved to window edges. That's not triggering in scrcpy.
If you can build scrcpy, you could play with the source code to do some tests:
:wink:
If you can build scrcpy, you could play with the source code to do some tests:
Thank you. I'll fiddle around and see what I can do π
Released in v1.13.
What @dishanrajapaksha means with "trigger Dex manually" (I guess since I'm looking for this solution too) is to make the smartphone to think that and external monitor is attached but without attaching an HDMI cable to the smartphone. It could be the final perfect solution to have a wireless "Android desktop mode" :)
As far as I understood, the only way right now to make Dex run is either to have an HDMI cable connected or as @dishanrajapaksha mentioned, using the Windows Dex program, which defeats the purpose... I mean, the original question by @subjectdenied is if it can run on Linux. The original Dex program (which is needed as @dishanrajapaksha mentioned) has no Linux version. Did you @webian find any solution yet?
I'm not sure if I'm missing something, but I don't see the solution to the main question of this issue.
As far as I understood, the only way right now to make Dex run is either to have an HDMI cable connected or as @dishanrajapaksha mentioned, using the Windows Dex program, which defeats the purpose...
Another new way recently added by Samsung is to cast Dex wirelessly to a TV or a Windows PC supporting Miracast (or a monitor with a wireless dongle I suppose).
As far as I understood, the only way right now to make Dex run is either to have an HDMI cable connected or as @dishanrajapaksha mentioned, using the Windows Dex program, which defeats the purpose...
Another new way recently added by Samsung is to cast Dex wirelessly to a TV or a Windows PC supporting Miracast (or a monitor with a wireless dongle I suppose).
Miracasting doesn't support input unfortunately. I couldn't figure out a way at least on my Windows PC with the Connect app.
I have seen some people talking about tricking the phone to think that an HDMI is connected using a dummy HDMI plug. See this link for more info.
I wonder if we can do do it virtually? Make the phone think an HDMI is connected suing an app?
I wonder if we can do do it virtually? Make the phone think an HDMI is connected suing an app?
I found this post but the linked apk doesn't work. Its a post from 2013, so that's expected I guess.
Exactly @dishanrajapaksha, we need an HDMI Virtual Switch. Some software that make the phone (more precisely Dex) think HDMI cable is connected. Then we can use Dex with scrcpy wirelessly.
Most helpful comment
scrcpy is already absolutely amazing - I love it!
but that would be the icing on the cake