Home | News | Download | Packages | Forum | Wiki | Github

[SOLVED] Very slow internet speed after first startx


#1

Hi,

how to fix internet speed after first startx command (C2D laptop). What did I do:

  1. I installed Void from minimal iso image (including intel-ucode)

  2. After first boot I installed xorg, xfce, ff, speedtest-cli and my internet speed is very high.

  3. When I run startx comand for the first time internet speed is much lower. I checked both glibc and musl. On musl internet speed is lower about an half and on glibc internet speed is very, very slow.

EDIT: web okla speedtest shows good internet speed, but it is slow. What’s going on?

Does know somebody, how to fix it. I wonder, did I miss something?

Thx


#2

Check your /etc/resolv.conf


#3

OH I forgot about /etc/resolv.conf

Thanks mcz


#4

@rjb Please could you explain how you solved the issue? Thanks.


#5

Here you are cr6.

After fresh install file /etc/resolv.conf contains default DNS servers. It is usually your router and it uses mainly your ISP DNS servers. I change those servers to OpenNic DNS servers to prevent DNS leak for OpenVPN.

To change DNS servers you have to change the line (it is examle only):

nameserver 192.168.0.1

to nameserver XXX.XXX.XXX.XXX

Replace X’s with OpenNic DNS servers.

After that I run this command to forbid dhcpcd to change it to the previous state again:

chattr +i /etc/resolv.conf

It is possible to make the system to use specified DNS servers, when OpenVPN is running and default DNS servers, when OpenVPN is down. But I don’t know, how to do it.:blush:

I have a copy of some config files to quick set up system after fresh installation. And /etc/resolv.conf also. It was very old and contained wrong OpenNic servers. Thats why I had a problem with internet speed.


#6

It might be better to use /etc/resolv.conf.{head,tail}.


#7

Could you explain it little more mcz, please


#8

Generally if you are running dhcpcd then you don’t want to prevent it from overwriting /etc/resolv.conf, you just want it to take your settings into account. The intended way to do this is to put your settings in /etc/resolv.conf.head or /etc/resolv.conf.tail so dhcpcd can merge these two files with generated settings.

PS
cat /usr/libexec/dhcpcd-hooks/20-resolv.conf


#9

And so if you have one, that’s where DNS server settings belong for the entire LAN.


(Masato the Empty) #10

@rjb
In addition to @mcz’s method, if you’re just looking for a simple way to keep your dhcp client from clobbering your manually-set resolve.conf, any good software should have such a method.

For dhcpcd, you use the nohook option in dhcpcd.conf. See /nohook in man dhcpcd.conf as one of its examples is exactly for this purpose…

I personally balk at setting files immutable to protect them for software that expects to update them… it always makes me look for a better way that I’m missing, or better software.

<idle musing starts here>

I’m guessing you’re talking about a VPN that doesn’t provide you with dns… Custom run hook to update your resolve.conf only when the openVPN connection goes up (and put it back when it goes down). Probably worth it if you can figure it out (you just need to see dhcpcd’s docs on what variables you can check for identifying the connection). I used OpenNIC’s servers for a few years but was ultimately dissatisfied with their performance/reliability (this was quite a few years ago though).


#11

Thank You all for interesting hints.