Author Topic: Running Linux on a Samsung phone through Dex mode  (Read 847 times)

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Running Linux on a Samsung phone through Dex mode
« on: August 20, 2019, 01:47:53 pm »
I just found this YouTube video showing Samsung Dex running on a Galaxy phone attached to a big monitor. It's pretty impressive. At the end of the video you can see Ubuntu being tested in Dex mode, and it looks quite functional. I have a Samsung Galaxy S7 edge phone, but unfortunately, you need at least a Galaxy 8 for Dex mode. I'm pretty happy with my phone, but this would be a reason to upgrade.
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #1 on: August 20, 2019, 02:10:01 pm »
I was thinking about Dex the other and trying to remember if anybody had posted about it. I wasn't near my computer at the time so couldn't check. It's certainly a cool ability.

I'm confused about the part about running Ubuntu on DEX. It looks like it's running Ubuntu on the phone and showing it on the monitor but how is it running it on the phone? Off a bootable image? Did he have to replace the existing Android image? Or does Dex itself on the phone have the ability to run other images without replacing the core OS? Sounds like the latter.
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #2 on: August 20, 2019, 02:17:19 pm »
Ah, good question! First of all, running it on the phone hooked to a monitor runs it on a full monitor screen. It's like what Canonical was trying to do with the ill-fated Ubuntu phone years ago. If you want to run Ubuntu, you download the Ubuntu 16.04 beta dex image. It doesn't replace Android; it runs in a container. You have to install Linux on Dex first; you can read about it here.

I actually tried it on a Samsung Galaxy Tab S5e; a tablet I bought and returned a few months ago. It seemed to work OK, and the processor in an S5e is a lot weaker than that of a Galaxy 10 phone. I didn't try a lot of apps, though, and I ran it on the tablet itself, not an external monitor.
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #3 on: August 20, 2019, 02:21:27 pm »
Thanks for that. I get it now.

Regarding the tablet on an external monitor, as long as the resolution is similar to what it is on the tablet (e.g. 1920x1080), it should make no difference running it on an external monitor. Same number of pixels will be rendered.
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #4 on: August 20, 2019, 02:31:21 pm »
True. But Dex can be run at higher resolution on a monitor, and I think it is set up to look different on a monitor than on a phone.
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #5 on: August 20, 2019, 02:47:03 pm »
I think for displaying the desktop it would be fine even for 4K/8K displays.

1920 x 1080 x 32bpp / 8 bits per btye = 8.2 MiB RAM usage
3840 x 1920 x 32bpp / 8 bits per byte = 29.5 MiB RAM usage
7680 x 3840 x 32bpp / 8 bits per byte = 118.0 MiB RAM usage

But if you try to play videos at those resolutions, there might be trouble but I don't claim to understand how video works. Video at 4K would be ~ 1.8 GiB/second (29.5 MiB x 60 fps) but that's ignoring compression so likely still possible.

Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #6 on: December 06, 2019, 08:18:05 am »
I recently bought a usb adapter with HDMI, usb plug-in and two usb A ports and tried it on a 1920x1080 monitor with Samsung DeX, run from my Galaxy S9 phone. It works pretty well, and I'll be using it to demo DeX when it's my turn to give a talk at a PLUG meeting. The adapter is supposed to do 4K, but I don't have a 4K monitor to test it with.
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #7 on: December 06, 2019, 11:48:52 am »
I recently bought a usb adapter with HDMI, usb plug-in and two usb A ports and tried it on a 1920x1080 monitor with Samsung DeX, run from my Galaxy S9 phone. It works pretty well, and I'll be using it to demo DeX when it's my turn to give a talk at a PLUG meeting. The adapter is supposed to do 4K, but I don't have a 4K monitor to test it with.

Even if you did, the projector isn't going to do 4K. Which reminds me of something else. Sometimes had trouble getting HDMI to work there so you might want to bring the stuff you bought with your phone and to the this month's meeting to test it in advance. Or we could drop by there at another time to test it out. I think the projector doesn't support HDMI and we previously used an HDMI to DIV cable but I'm not sure.
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #8 on: December 06, 2019, 12:07:33 pm »
Good idea to test it out. My adapter only has HDMI, so the cable has to have HDMI as the phone output. Whether it works with DVI, I can't say until we test it. However, according to this post, it should work.
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #9 on: December 06, 2019, 12:58:09 pm »
I think this is a step that can be read differently depending on whether or not you're a glass-half-full kind of guy. I'm a bit wary about saying "should" here:

Quote
You can also connect an HDMI-DVI cable or HDMI-VGA cable to your DeX Station. However, those cables may cause Samsung DeX to function incorrectly.

But it can't hurt to try, right? And I'm willing to bring my HDMI monitor and we can sit around it but it's not very big (24 in).

If it does work correctly, I remember you saying this would probably be a short presentation. Is there a particular app or two that you could show off in it to show how well it functions?
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #10 on: December 06, 2019, 01:00:02 pm »
For those without a Samsung phone, apparently there are also some DeX alternatives.
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #11 on: December 06, 2019, 04:25:38 pm »
....
If it does work correctly, I remember you saying this would probably be a short presentation. Is there a particular app or two that you could show off in it to show how well it functions?
....
I can make it short or I can make it longer. I can talk more about what DeX is and how it can work on an external monitor as Android, or on a Mac or PC through an app. (I plan to demo only the Android version.) I would also demo Linux on Dex on the Android version. I can also talk about connection options, how to make the connection and how to troubleshoot if it mirrors the phone instead of going into DeX mode. And how to customize. Given the usual participation from the group, I'm sure this could be made to last an hour or more if we want it to. Or I could do a much shorter version if there is to be another presentation that night.
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Running Linux on a Samsung phone through Dex mode
« Reply #12 on: December 06, 2019, 05:04:48 pm »
Sounds like a good plan, the longer version, that is. I doubt we will have another presentation then unless Bill wants to do his then and if he can't make it, we could roll it over to February.
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin