56

I would like to show the screen of my Ubuntu laptop on a Samsung TV.

The TV has a menu entry called "mirror screen".

But up to now I found no way to get it working.

I need a wireless way to us the TV as monitor.

Any hints?

Exact hardware version: Samsung SmartTV UE55J6250

If it is not possible via software am willing to buy some hardware.

dav2dev
  • 145
  • 1
  • 9
guettli
  • 2,932
  • 12
  • 67
  • 115
  • On a friend's LG TV a similarly named option is actually for [Miracast](https://en.wikipedia.org/wiki/Miracast). You might want to check if that's the case in your TV and clarify accordingly. – muru Mar 19 '18 at 10:04
  • Buy a Chromecast, open Chrome, from the menu choose "Cast...", select "Cast desktop" and select your Chromecast. – Jos Mar 19 '18 at 10:06
  • @Jos That means ignoring the TV's built in chrome cast like feature or potentially adding a second chrome cast via dongle if the TV has chrome cast built in. – WinEunuuchs2Unix Mar 19 '18 at 10:39
  • What Samsung TV model number do you have? – WinEunuuchs2Unix Mar 19 '18 at 10:39
  • It might be limited to Samsung phones and tablets but more goggling is required: http://www.samsung.com/uk/support/tv-audio-video/what-is-screen-mirroring-and-how-do-i-use-it-with-my-samsung-tv-and-samsung-mobile-device/ – WinEunuuchs2Unix Mar 19 '18 at 12:17
  • This website is full of these questions "mirror ubuntu to smart tv" and most of them don't have answers, so probably impossible or very hard to do. you might want to try this though https://github.com/albfan/miraclecast – Lynob Mar 22 '18 at 11:08
  • 1
    I guess [miraclecast](https://github.com/albfan/miraclecast) can cast the screen to TV. – Ping Chu Hung Mar 26 '18 at 14:30
  • Note in my answer below Chromecast can mirror the entire Ubuntu desktop now. Not just the chrome browser like version 1. – WinEunuuchs2Unix Mar 28 '18 at 15:15

3 Answers3

48

By 2020, it's possible to do Screen Mirroring on a Samsung Smart TV as Wireless Display, without any HDMI cable (I use it every day, Samsung TV UN40J5500, with Ubuntu 20.04). The simplest way to do it, in my opinion, is to install gnome-network-displays via flatpak.

  1. Download .flatpakref from Flathub: https://flathub.org/apps/details/org.gnome.NetworkDisplays
  2. Install: flatpak install org.gnome.NetworkDisplays.flatpakref
  3. Run: flatpak run org.gnome.NetworkDisplays
  4. Select TV to display gnome network displays for samsung smart tv
  5. Should start streaming screen to TV.

Important: check that your audio is working on TV. In my case, I need to use PulseAudio Volume Manager.

  1. Install: sudo apt install pavucontrol
  2. Run: pavucontrol
  3. Select: Output Devices -> Show: Virtual Output Devices -> Set Fallback.

pavucontrol Virtual Output Device

Finally, if your TV is not located or if screen is suddently frozen, this is what I do:

  1. close gnome-network-displays (if open)
  2. stop: systemctl stop NetworkManager.service
  3. stop: systemctl stop wpa_supplicant.service
  4. start: systemctl start NetworkManager.service
  5. start: systemctl start wpa_supplicant.service

Then, I re-open the network displays and it goes back to work.

My experience with Wireless Displays is usually very good, I manage to watch movies with audio in perfect sync. Just for extra information, I use 5GHz Wifi (maybe it helps...) on router Archer C60, and my CPU is Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz (not very new but works fine).

For extra information, it's nice to visit the project repository: https://gitlab.gnome.org/GNOME/gnome-network-displays

Another project that "partially worked" for me was MiracleCast (at least for TV discovery and motivation to know if it COULD work possibly on linux...). I don't think it's complete yet (see Open Issue), but it's another possible alternative for the future: https://github.com/albfan/miraclecast/issues/4

Good luck!

https://gitlab.gnome.org/GNOME/gnome-network-displays

igormcoelho
  • 764
  • 6
  • 7
  • Trying to make this work with a Samsung Q80T, but so far I get errors starting "screencasting portal". I'm going to the project site, but curious if you can explain what that means? – tim.rohrer Jan 06 '21 at 03:33
  • it worked for me but it's slow and not practical (there is a delay of few second which make it impossible to use the tv as a work monitor, it could be used for streaming movie from pc). It probably needs to first connect your pc bluetooth with the tv one to get autorisations. – Abdu Feb 01 '21 at 22:19
  • @tim.rohrer I don't know much about the project itself, but the list of TVs which are "tested" seems to be quite small indeed. It worked for my TV, but it's hard to say which model will work or not... maybe you can find more info here: https://gitlab.gnome.org/GNOME/gnome-network-displays – igormcoelho Mar 02 '21 at 22:43
  • 1
    @Abdu I completely agree with you, it's slow. Like you said, my use-case was for watching movies, so it worked, but for real-time interaction it would be hard. It has some delay of 1-2 seconds, that's why I emphasized that audio should also be in sync with TV, otherwise movies wouldn't work as well. I don't know what causes this delay, or if this could be prevented somehow, does it also happen with Chromecast? – igormcoelho Mar 02 '21 at 22:46
  • Had an error conecting to my tv: https://askubuntu.com/questions/1412807 – ofirule Jun 07 '22 at 21:17
  • 1
    Tried to help you @ofirule on that new issue... mine is working again, after few tries, it's working nicely again on Ubuntu 22.04. My suggestion is for you to try Live USB on Ubuntu 22.04, validate that it works on your hardware, then try to debug which package is causing the problems you mention. Good luck! – igormcoelho Jun 12 '22 at 00:03
  • 1
    Thank you so much!!! – mrSuperEvening Jul 01 '23 at 19:31
8

Google Chromecast is likely the best and cheapest option for mirroring your Ubuntu desktop to your TV. Here is a short youtube video.

For setting up in Ubuntu 16.04 there are other users to help out if you have a problem: Google cast on Ubuntu 16.04

Note there is a now a version 2, an ultra option and even an Ethernet option.

The cost (without options) is reasonable around $35 USD.

Although this is the recommended option for the OP, check your TV model first before buying a Google Chromecast. It could very well be your TV already has it built in. Also check your blu-ray player as some of them have Google Chromecast already built in too.

Image:

IMG:

Google cast extension has been discontinued, now is integrated into Chrome/Chromium:

screenshot

Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401
  • @guettli AFAIK this will "only" allow you to cast the contents of Google Chrome. If you want to stream videos, you might want to give **[UPNP/DNLA](https://askubuntu.com/a/1010569/783023)** a try. No additional hardware needed ! – Robert Riedl Apr 10 '18 at 07:13
  • 1
    "Google Cast" extension no longer exist in the Chrome Web Store: `This extension has been discontinued. Learn more` What is the new/alternative solution? – Sun Bear Oct 17 '18 at 03:30
  • 1
    Thanks for updating your answer. The `Cast` button works but I got the _"No Cast destinations found. Need help?"_ message. According to [Step 3](https://support.google.com/chromecast/answer/3249268) in ChromeCast Help, it states *It is compatible with both 2.4 GHz WiFi 802.11 b/g/n WiFi networks and 5 GHz networks.* If the SmartTV and Ubuntu 16.04 Workstation is connected to the network via LAN (not wifi), can ChromeCast still work? The Workstation is able to ping the Samsung SmartTV. I am able to ChromeCast to the SmartTV using a mobile phone. – Sun Bear Oct 17 '18 at 10:51
  • @SunBear We need to thank Pablo for the edit. The concept of Chromecast is wireless connections. For wired connection HDMI is the preference and I use a 25 foot cable to laptop. There probably are Ethernet LAN broadcasting apps but I don't recall reading about any. – WinEunuuchs2Unix Oct 17 '18 at 10:58
  • @PabloBianchi Thank you for updating this answer. WinEunuuchs2Unix, I have tried using another Workstation that is connected to the network via wireless 5GHz to ChromeCast to the same SmartTV. However, I still get _"No Cast destinations found. Need help?"_ message. What should I do next? – Sun Bear Oct 17 '18 at 11:42
  • According to [Chromecast](https://support.google.com/chromecast/answer/7022492?hl=en), Linux is not an officially supported OS. In addition, its online staff had adviced me that Linux user should be mindful that there is no guarantee that Chromecast will work with Linux OS and there isn't a compatibility roadmap for Linux. – Sun Bear Oct 18 '18 at 12:09
  • 5
    For me chromecast works ONLY in youtube, and it is meaningless, because I can open youtube on TV directly. – Crusader Jul 28 '20 at 20:51
  • 2
    I confirm @Crusader's observation. With Ubuntu 20.04 and Chrome 85, I can only mirror a tab if is on YouTube from the Chrome browser to my Samsung SmartTv. Any other tab or desktop will not work. VLC and Firefox will not work. There is definitively something proprietary going on. – Hans Deragon Sep 26 '20 at 14:20
  • Nowadays it can also share the full screen, just select it in sources before selecting the destination device. At least with Ubuntu 22.04 and chrome 103.0.5060.114 – PhoneixS Jul 13 '22 at 14:24
5

This is my work-around, not a real solution.

The laptop gets connected to the TV via a short cable.

I use a wireless keyboard (inclusive touch-pad) to control the laptop.

guettli
  • 2,932
  • 12
  • 67
  • 115
  • 1
    Clever approach!! :) – Whoami Oct 08 '19 at 11:46
  • @Whoami it took me days to find this work-around. A laughed about my blindness, that it took so long find a simple solution to this. – guettli Oct 08 '19 at 12:35
  • Worthy work-around :) – Whoami Oct 09 '19 at 08:32
  • The only real solution at the moment...! – Jochen Haßfurter Mar 26 '20 at 11:52
  • 3
    An alternative to the wireless keyboard is just using Android smartphone and install "kdeconnect" to Ubuntu (same same on Android app). Just `sudo apt install kdeconnect`, then execute `kdeconnect-cli`, Android app should find computer if on same network/wifi and you can move cursor/touchpad on screen. – igormcoelho Dec 20 '20 at 23:46
  • Unfortunately, this answer doesn't set the user use multi-view with Samsung TVs. – tim.rohrer Jan 06 '21 at 02:51
  • @tim.rohrer sorry, I don't understand the sentence you wrote. – guettli Jan 06 '21 at 09:28
  • 1
    My apologies. set=let. In my mind, the main reason for wanting to share to a TV is so multi-view or PIP can be used. For example, Samsung TVs will let you display TV channels (and other inputs) if one of the inputs is WiFi-based sharing (i.e., computer monitor sharing). However, they won't let you display two inputs (generally) if they're both wired. – tim.rohrer Jan 06 '21 at 18:28