Chromecast: no device found

I have a chromecast dongle on my TV. My android phone can cast to it, which means that the device is correctly installed. On both my two laptops (Ubuntu 22.04), I get: “no device found”.
I have tried from Vivaldi and from VLC.
I have tried disabling Wayland. I have also have a fresh install of Ubuntu 23.10 (default and therefore minimal) on a Virtualbox VM, No luck there either. I have tried disabling my laptops VPN (though this does not seem to be required for my phone).
Does anybody have a clue as to what may be causing lack of communication between the Google dongle and my Ubuntu?

Do you have a firewall on your laptop?
If yes, make sure TCP ports 8008,8009, and UDP ports 1 to 65535 are open.

2 Likes

Thank you, but no - not to my knowledge. I see there is something called ufw and that it is disabled by default. I have not enabled it.

This says that it can be done with Linux

It says you can cast, but you can not configure it from Linux

I would be checking your Wifi setup. It uses Wifi, but it may
need a different setup to your normal Wifi.
If your Wifi setup cant see the device, then browsers or VLC
have no chance.

Also have a look at this

and

2 Likes

I’ve done it before - many years ago (late 2015) using Ubuntu 15.x…

It just worked… Can’t remember anything special I had to do either…

But I did use Google Chrome - I think youtube in Chrome gives you to option to cast to a Chromecast… However - I did ALSO get VLC casting to the ChromeCast, I don’t remember it being particularly difficult.

The most “difficult” part was that where I was doing this - there was no internet, so I had to tether the chromecast, and the Ubuntu laptop, to my phone via WiFi…

3 Likes

To Neville Jackson: Your two links are interesting. I shall certainly check them out tomorrow (midnight here now).

I’m pretty confident about my Wifi setup though.

Yes, I too have been able to cast to TV a year or 5 ago. Something has changed, and I don’t know what or why.

That is different, you have the phone in between.
I think Kaia wants a direct Wifi link?
It should be possible

You just need to search around for ideas. You will find
what has changed.
I find it helps to go away from the computer and read things

1 Like

I was able to use MS Edge to cast on my Pop!_OS laptop.

It didn’t work for me when using the same hardware but running Ubuntu 23.10 using Gnome Boxes.

It did work for me when using the same hardware but running Ubuntu 23.10 using VirtualBox.

1 Like

Ah… Edge! I had forgotten all about the MS possibility. The device was NOT found with Edge.
So it is a “hardware” problem, after all. I shall factory reset the dongle and see if that helps.

UPDATE: Right. I have factory reset the dongle and Ubuntu 22.04 can now see the device. I think the problem must have been caused by the VPN. Google TV/Chromecast is evidently extremely ticklish about VPN. I shall post a new question about Chromecast and VPN :wink: Thanks for the support!

I doubt.
The same hardware problem on 2 latpops?
I suspect network (firewall) problem.

I give you a commandline to fiddle with:
ffmpeg -f pulse -ac 2 -i default -f x11grab -s 1920x1080 -r 30 -thread_queue_size 65535 -i :0.0+0,0 -acodec libmp3lame -b:a 128k -vcodec libx264 -b:v 12600K -pix_fmt yuv420p -preset ultrafast -tune zerolatency -g 15 -fflags flush_packets -fflags nobuffer -f mpegts - | cvlc - -vv --network-caching 1 --live-caching 1 --file-caching 1 --disc-caching 1 --sout="#chromecast{ip=192.168.1.175,mux=ts}"

For this to work you need ffmpeg and vlc to be installed, and use X11, not wayland.
Adapt it:
Where you see 192.168.1.175, change it to your smartTV’s IP.
This command line grabs the desktop (ffmpeg) -my desktop is fullHD-, encodes it, and passes to cvlc to cast to the chromecast device.
My only problem is that it has a latency of 6 seconds, otherwise it works.
Because of -vv in the parameters of cvlc you’ll see a lot of debug messages, hopefully you’ll be able to identify the cause of your problem.

4 Likes

Lazlo - very sorry, but my latest post disappeared for some reason. I tested from Edge (I have a dual boot) and it didn’t work there either. Then I reset the dongle to factory settings, and after that Ubuntu was able to see it.
I think what had happened was that I had forgotten to disable VPN on my computer and that Google is very ticklish about VPN.

So now the challenge is connecting in spite of VPN. Do you think that is possible? Both the TVdongle and the laptops are on the same wifi network, but when I use VPN on my laptop I of course get a different IP. Is it possible to create a sort of virtual network on a laptop, and use it to connect both the dongle and the laptop? I would rather not tamper with my router.

3 Likes

I think that would depend on the VPN. When I connect to my work VPN I can still use local resources. In fact, I’m pretty sure I’ve done some casting while on VPN.

Some VPNs are a “split” VPN where only traffic destined for work (in my case) uses the VPN tunnel. Other traffic like internet traffic doesn’t. This can make a lot of sense and cuts down on the bandwidth used by all the VPN clients connecting since internet traffic takes the local route rather than traversing the VPN.

Pulse VPN is what we use, and my internet traffic is directed over VPN too. Even so I can still use local resources.

1 Like

Does that not depend on the routing table?

I see the VPN service I use recommends using a “smart DNS” proxy.The steps to take are clearly outlined, but since I’m reluctant to tamper with the router, I guess I shall just have to settle for the HDMI cable or use my mobile phone as a hotspot. A site (heavily promoting a certain VPN service) provides a fairly generic howto

I meant the routing table in your computer.
Surely it can decide whether a particular packet goes to
the VPN or not?

2 Likes

You wrote “split tunneling”! Yes indeed. I’m on to that now. Working on it. Want to bypass VPN for Firefox and have to find the “executable”. So I threw out the snap, to install the deb, but it’s not working as expected. YET, but this is certainly a promising avenue.

Yippee. Split tunneling did it! Chrome is now devoted to such sites that (and chromecasting) that do not accept VPN.

Thank you!

2 Likes