You are not logged in.

#1 2013-06-16 20:42:32

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[solved] How to disable ethernet port?

Hello there,

I am trying to reduce the power consumption of my laptop.

Therefore I used powertop to find out some of the main power consumers. One of that is the ethernet port:

  2.14 W      0,0 pkts/s                Device         Network interface: enp0s25 (e1000e)

I could of course deactivate it completely in the BIOS settings but then I would not be able to quickly activate it when having my laptop turned on.

Are there any other options to disable the ethernet port (so that it is no longer consuming power) with the ability to quickly activate it, probably even in NetworkManager?

Thanks!

Last edited by orschiro (2013-06-17 05:14:26)

Offline

#2 2013-06-16 21:18:52

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [solved] How to disable ethernet port?

A nice feature of powertop is using the report

powertop --html=yourpowertop.html

It gives you more for the "bad" settings in the tunables tab, i.e. you see the parameters needed to activate powersaving on the device, e.g.

Enable Audio codec power management	echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';
VM writeback timeout	echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';

these you can use in a service/script to have the system activate them automagically. Note that you won't see those for the "good" settings in the output, so don't fiddle with anything after a clean boot. Additionally your NIC-driver may have some other powersaving options, try looking at the parameters of "modinfo e1000" (or whichever it is).

Offline

#3 2013-06-16 22:23:56

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] How to disable ethernet port?

Strike0 wrote:

A nice feature of powertop is using the report

powertop --html=yourpowertop.html

It gives you more for the "bad" settings in the tunables tab, i.e. you see the parameters needed to activate powersaving on the device, e.g.

Enable Audio codec power management	echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';
VM writeback timeout	echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';

these you can use in a service/script to have the system activate them automagically. Note that you won't see those for the "good" settings in the output, so don't fiddle with anything after a clean boot. Additionally your NIC-driver may have some other powersaving options, try looking at the parameters of "modinfo e1000" (or whichever it is).

Wow, I had no idea about this!  Thanks Strike0.  When I optimized my laptop for power savings, I just googled each setting and then figued out manually how to get the to be persistent on boot.  But instead of simply making a service file with all these things in a oneshot, I used tmpfiles.d, udev rules, and modprobe.d options to get all these things to "good" according to powertop.

Offline

#4 2013-06-17 05:12:48

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to disable ethernet port?

Thanks guys.

But powertop does not tell me how to disable ethernet.

For now I am blacklisting the e1000e on boot which does fine for me. Whenever I need ethernet I can then activate the module manually.

Offline

#5 2013-06-17 17:47:40

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [solved] How to disable ethernet port?

Ok yes, just a small manual step to load it when you need it.
I use "tlp" and that has settings  to disable networking devices you don't use. However, I tried it once quickly and it did not seem to work on my machine. Another thing I noticed is that the powertop readings can be a bit odd at times. I sometimes had a high watt reading for the unused ethernet too, but when manually bringing it the interface/module down the watts appeared to magically wander over to the display (which readings seem to be a bit like a "bucket for the rest").  Anyhow, great tool.
edit:@WonderWoofy: yes, I was wondering where they hide all those settings they enable at the cli until figuring that. Awesome there was something in for you too this time.

Last edited by Strike0 (2013-06-17 18:25:07)

Offline

#6 2013-06-20 13:39:42

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to disable ethernet port?

Strike0 wrote:

I use "tlp" and that has settings  to disable networking devices you don't use. However, I tried it once quickly and it did not seem to work on my machine.

I also use 'tlp' but it does not provide any option to disable ethernet devices, but radio devices.

Offline

#7 2013-06-20 16:39:51

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [solved] How to disable ethernet port?

Oh, yes. I got that wrong, thanks! Funnily I still have "lan wwan" in the config, maybe that's why I was thinking it does not work .. or I merged a pacnew wrongly. well, I'm not aware of a method for you with networkmanager to avoid that manual step then. Though I would still doubt it eats energy in the range of watts as reported by powertop. Did you see such a big effect when you disable it completely?

Offline

#8 2013-06-21 06:56:15

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to disable ethernet port?

Did you see such a big effect when you disable it completely?

Yes I did indeed. Power consumption decreased by 2 Watts!

And since I am using ethernet very rarely I can totally live with a single manual command to activate ethernet port again.

Last edited by orschiro (2013-06-21 13:00:18)

Offline

#9 2013-06-21 15:11:08

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] How to disable ethernet port?

2 Watts?!  What kind of hardware is it?  An ethernet port not in use and not in teh active "up" state should not be using that much power.  I tried disabling my ethernet from the bios, which means that no module was loaded, nor is it powered or shown in lspci, and I saw no significant difference in power consumption.  Presumably, this might be an indication that the system is able to properly handle this decive when inactive.

I would be very interested to hear what is in that machien of yours that eats so much power when idle.

Offline

#10 2013-06-24 05:47:34

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to disable ethernet port?

Well, I was surprised myself. It is the in built port of my Thinkpad X200T.

But maybe the information shown by powertop was simply wrong which I am assuming now. For example it shows me that System baseline power is estimated at 0.00 W.

So to say, I am actually no longer giving too much on the information from powertop.

Offline

Board footer

Powered by FluxBB