Make duplex/speed/autonegotiation permanent

Every time I turn on opensuse, I have to go into terminal as superuser and type:

/sbin/ethtool -s eth0 duplex full autoneg off

But this is only a temporary change. Is there a more permanent solution?

Thanks!

Hi you could try this. Do this as root (by doing su -)


echo "/sbin/ethtool -s eth0 duplex full autoneg off" >> /etc/init.d/after.local

Then


chmod 744 /etc/init.d/after.local

Does that work as a permanent solution?

when i did echo “/sbin/ethtool -s eth0 duplex full autoneg off” >> /etc/init.d/after.local
it returned: bash: /etc/ini.d/after.local: No such file or directory

I think you had a typo mistake. It is /etc/init.d/after.local not /etc/ini.d/after.local. It should work now.

well, I did a grep -i duplex /var/log/messages and the last line (which is the most recent):

Feb 3 10:08:03 linux-4s4s kernel: 42.705186] b44 ssb0:0: eth0: Link is up at 10 Mbps, half duplex

Most Recent: Feb 3 23:35:17 linux-4s4s kernel: [48477.000240] b44 ssb0:0: eth0: Link is up at 10 Mbps, full duplex

Looks like it did it! Hopefully when I reboot the laptop, it will keep those settings.

Thanks!

No problem :wink:
This change only takes effect on the next boot after you have entered those settings so when you next boot up your laptop check it again with the same command


grep -i duplex /var/log/messages

It should be fine though.

These parameters can also be set within /etc/sysconfig/network-scripts/ifcfg-eth0 (for eth0 interface)

by adding an entry like this:

ETHTOOL_OPTS="duplex full autoneg off"

Interesting:

Feb 3 23:35:17 linux-4s4s kernel: [48477.000240] b44 ssb0:0: eth0: Link is up at 10 Mbps, full duplex
Feb 4 00:23:54 linux-4s4s kernel: 53.705230] b44 ssb0:0: eth0: Link is up at 10 Mbps, half duplex
Feb 4 07:26:58 linux-4s4s kernel: 51.701443] b44 ssb0:0: eth0: Link is up at 10 Mbps, half duplex

But, /sbin/ethtool eth0 says that it is at full duplex, not half. And, autonegotiation is off. What’s happening?