Always load broadcom before tg3
* Hopefully won't cause any problems.
This commit is contained in:
parent
3a801ba72d
commit
d31991a67f
2 changed files with 1 additions and 19 deletions
|
|
@ -37,18 +37,6 @@ def connect_to_network():
|
||||||
message = 'Connecting to {}...'.format(WIFI_SSID),
|
message = 'Connecting to {}...'.format(WIFI_SSID),
|
||||||
function = run_program,
|
function = run_program,
|
||||||
cmd = cmd)
|
cmd = cmd)
|
||||||
|
|
||||||
# LAN
|
|
||||||
if not is_connected():
|
|
||||||
# Reload the tg3/broadcom driver (known fix for some Dell systems)
|
|
||||||
try_and_print(message='Reloading drivers...', function=reload_tg3)
|
|
||||||
|
|
||||||
# Rebuild conkyrc
|
|
||||||
shutil.copyfile(
|
|
||||||
'/etc/skel/.conkyrc',
|
|
||||||
'{HOME}/.conkyrc'.format(**global_vars['Env']))
|
|
||||||
cmd = ['{HOME}/.update_conky'.format(**global_vars['Env'])]
|
|
||||||
run_program(cmd, check=False)
|
|
||||||
|
|
||||||
def is_connected():
|
def is_connected():
|
||||||
"""Check for a valid private IP."""
|
"""Check for a valid private IP."""
|
||||||
|
|
@ -79,13 +67,6 @@ def speedtest():
|
||||||
output = [(a, float(b), c) for a, b, c in output]
|
output = [(a, float(b), c) for a, b, c in output]
|
||||||
return ['{:10}{:6.2f} {}'.format(*line) for line in output]
|
return ['{:10}{:6.2f} {}'.format(*line) for line in output]
|
||||||
|
|
||||||
def reload_tg3():
|
|
||||||
"""Reload tg3 module as a workaround for some Dell systems."""
|
|
||||||
run_program(['sudo', 'modprobe', '-r', 'tg3'])
|
|
||||||
run_program(['sudo', 'modprobe', 'broadcom'])
|
|
||||||
run_program(['sudo', 'modprobe', 'tg3'])
|
|
||||||
sleep(5)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print("This file is not meant to be called directly.")
|
print("This file is not meant to be called directly.")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
softdep tg3 pre: broadcom
|
||||||
Loading…
Reference in a new issue