You are not logged in.

#1 2025-01-07 13:01:14

prince2phor
Member
Registered: 2024-12-16
Posts: 13

connection question

Hi all, I use wired and wifi connections on my laptop. I'd like the wifi automatically disabled when I use the wired connection ; and the wifi connection automatically on when I don't use the wired one. How to set that up? thanks in advance.
ps: I use the mate desktop with network-manager.

Offline

#2 2025-01-07 16:21:53

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: connection question

Offline

#3 2025-01-07 17:15:42

prince2phor
Member
Registered: 2024-12-16
Posts: 13

Re: connection question

Thanks for answering with a link to a solution, but it's not exactly what I'm looking for...

So, whatever, I'm going to look up on the net for a better solution. Thanks.

Offline

#4 2025-01-07 17:38:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,383

Re: connection question

It's exactly the solution to your described problem. If it isn't then your problem description doesn't match your end goal.

Offline

#5 2025-01-07 22:59:53

mackin_cheese
Member
Registered: 2025-01-07
Posts: 477

Re: connection question

How is that not the solution you are looking? your request and that solution linked are 1:1 the same

Offline

#6 2025-01-08 14:39:15

prince2phor
Member
Registered: 2024-12-16
Posts: 13

Re: connection question

It doesn't! I don't want both connections (wifi and wired) connected in the same time. I use mainly wired connection. And maybe an hour a day (wifi). When I disconnect wifi it doesn't reconnect automatically when Ethernet cable is removed... I use a command line "nmcli con up my-uid" to reconnect the wifi manually. The script doesn't do it.

Offline

#7 2025-01-08 14:58:01

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: connection question

Did you check the journal to see why the script failed?

I've had sucess following https://wiki.archlinux.org/title/System … _interface but I appreciate you might not want to change away from NM.


Jin, Jîyan, Azadî

Offline

#8 2025-01-08 15:04:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,383

Re: connection question

It should, otherwise you can also add the corresponding nmcli con command to the radio on directive. It's a dispatcher script, did you put it at the correct location and make it executable and enabled and started the NetworkManager-dispatcher.service?

Last edited by V1del (2025-01-08 15:05:04)

Offline

#9 2025-01-08 15:17:36

mackin_cheese
Member
Registered: 2025-01-07
Posts: 477

Re: connection question

what is your output of /etc/NetworkManager/dispatcher.d/wlan_auto_toggle.sh

Offline

#10 2025-01-08 15:26:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,831

Re: connection question

https://deepl.com is fluent in french and english.

Offline

#11 2025-01-08 15:57:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,383

Re: connection question

FWIW if you don't actually care about the fact the wlan device is still active, I'm pretty sure you can define routing rules (might even already be default) so that the ethernet connection is prioritised anyway even if WLAN is connected at the same time

Offline

#12 2025-01-08 17:20:34

prince2phor
Member
Registered: 2024-12-16
Posts: 13

Re: connection question

I tried the tutorial on that page: https://blog.christophersmart.com/2021/ … rkmanager/
What it does? the wifi is disabled when Ethernet is turned on ; but when I turn Ethernet off it doesn't enable wifi again, and even less my personal wifi connection.

Ps: To Seth, Deepl told me you can't speak French... :-)

Offline

#13 2025-01-08 17:24:26

prince2phor
Member
Registered: 2024-12-16
Posts: 13

Re: connection question

OK, my mistake... wifi is enabled again when Ethernet is turned off... but my personal wifi connection isn't restored... I have to put it back manually if I want Internet.

Something I didn't figure out correctly on what the script does? maybe Deepl could help on this?

Last edited by prince2phor (2025-01-08 17:25:33)

Offline

#14 2025-01-08 17:53:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,831

Re: connection question

You said anything about some blog?
Try https://wiki.archlinux.org/title/Networ … et_on_boot

Je ne parle pas français, mais si je peux, c'est une autre question.

Offline

#15 2025-01-08 17:53:48

prince2phor
Member
Registered: 2024-12-16
Posts: 13

Re: connection question

OK my mistake (part 2) I finally noticed that something wasn't well set on my known connection in Network-Manager. "Connect automatically" with priority was unticked... So now It works like a clockwise.
Who said that users are often responsible of the issue they're asking help for... thanks!

Last edited by prince2phor (2025-01-08 17:54:15)

Offline

#16 2025-01-08 18:01:20

mackin_cheese
Member
Registered: 2025-01-07
Posts: 477

Re: connection question

Next time, please read any wiki articles we link you carefully and thoroughly instead of saying "it doesn't work!"

Offline

#17 2025-01-08 18:20:47

prince2phor
Member
Registered: 2024-12-16
Posts: 13

Re: connection question

Next time I won't ask here to avoid reading such comments.

Offline

#18 2025-01-08 18:50:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,383

Re: connection question

Checking your auto connection settings would've been my next suggestion, but generally we can help you better if you provide more info on the trouble you have.

If you consider this [SOLVED] please mark it as such by editing the title in your first post.

Offline

Board footer

Powered by FluxBB