Results 1 to 8 of 8

Thread: Setting ethtool options when using NetworkManager

  1. #1

    Question Setting ethtool options when using NetworkManager

    Due to a strange and unresolved issue discussed in this thread I need to set the ethernet adapter to default to 10mpbs as it works much faster than 100mbps. This is an old Acer Travelmate 2410 in case that matters.

    I found this info and created this script:

    Code:
    # cat /etc/NetworkManager/dispatcher.d/set-10mpbs 
    #!/bin/sh
    
    
    ACTION=$2
    
    
    if [ "$ACTION" = "up" ]; then
       /sbin/ethtool -s enp6s7 speed 10 duplex full
       echo "Set to 10mpbs full duplex"
    fi
    However it seems not to do anything although the ownership and permissions are as explained on the link by Novell, i.e.

    Code:
    # l /etc/NetworkManager/dispatcher.d/set-10mpbs
    -rwxr-x--x 1 root root 139 Jan 19 15:13 /etc/NetworkManager/dispatcher.d/set-10mpbs*
    So what would be the way to set 10mpbs to be active by default?

  2. #2
    Join Date
    Sep 2012
    Posts
    5,141

    Default Re: Setting ethtool options when using NetworkManager

    You should be able to set speed with "speed" property of 802-3-ethernet setting. You will probably need to edit configuration file directly, unless there is some frontend that exposes it.
    Code:
    bor@bor-Latitude-E5450:~$ nmcli c show c7a81999-53d8-382b-af27-c2f77a49b696...
    802-3-ethernet.port:                    --
    802-3-ethernet.speed:                   0

  3. #3

    Default Re: Setting ethtool options when using NetworkManager

    Could you please explain in a little more detail as I really don't understand what you are talking about. Thanks!

  4. #4
    Join Date
    Sep 2012
    Posts
    5,141

    Default Re: Setting ethtool options when using NetworkManager

    See "man nm-settings". You can modify individual settings using e.g. nmcli, here is tutorial for doing it: https://access.redhat.com/documentat...ool_nmcli.html

  5. #5

    Default Re: Setting ethtool options when using NetworkManager

    Thank you, I have done some reading but it seems impossible to set speed using nmcli:

    Code:
    # nmcli connection edit LAN
    
    
    ===| nmcli interactive connection editor |===
    
    
    Editing existing '802-3-ethernet' connection: 'LAN'
    
    
    Type 'help' or '?' for available commands.
    Type 'describe [<setting>.<prop>]' for detailed property description.
    
    
    You may edit the following settings: connection, 802-3-ethernet (ethernet), 802-1x, dcb, ipv4, ipv6
    nmcli> describe 802-3-ethernet.speed
    
    
    === [speed] ===
    [NM property description]
    If non-zero, request that the device use only the specified speed.  In Mbit/s, ie 100 == 100Mbit/s.
    
    
    nmcli> set 802-3-ethernet.speed 10
    Error: failed to set 'speed' property: the property can't be changed
    nmcli>
    Any other idea probably?

  6. #6
    Join Date
    Sep 2012
    Posts
    5,141

    Default Re: Setting ethtool options when using NetworkManager

    You can try to edit connection definition directly under /etc/NetworkManager/system-connections. You will need to stop NM, edit, start.

  7. #7

    Default Re: Setting ethtool options when using NetworkManager

    Ok, I added 'speed=10' in the [ethernet] section of the LAN connection and rebooted. But speed is still 100mbps.

  8. #8

    Default Re: Setting ethtool options when using NetworkManager

    BTW I just noticed the following in the journal:

    Code:
    nm-dispatcher[934]: /etc/NetworkManager/dispatcher.d/set-10mpbs: line 6: /sbin/ethtool: No such file or directory
    After fixing the line to use /usr/sbin/ethtool everything works, no need for other gym

    Thank you for your time!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •