You are not logged in.

#1 2015-07-05 13:26:44

Tidykoala
Member
Registered: 2015-07-05
Posts: 14

[SOLVED] Internet works only after few minutes

Hi everyone,

I just installed Arch Linux on my new Thinkpad T450s and everyting works almost fine.
There is only a little issue: the laptop connects to the wifi at login but I can’t connect to Internet, I have to wait about 2 minutes more to access it.
I saw that when I have no internet and do 'systemctl | grep Network' the systemd-resolved.service was dead and when I get Internet again, it was running. So it seems that this service isn't starting correctly at boot.

Otherwise, after these 2 minutes of waiting, everything works great big_smile

I'm using GNOME with NetworkManager and wpa_supplicant
I've seen some similar topics on the forum some days ago but I can't find them again. hmm

Do you have an idea how to fix this issue ?

Last edited by Tidykoala (2015-07-05 17:41:10)

Offline

#2 2015-07-05 13:38:14

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,781
Website

Re: [SOLVED] Internet works only after few minutes

Tidykoala wrote:

systemd-resolved.service was dead and when I get Internet again, it was running.
[...]
I'm using GNOME with NetworkManager and wpa_supplicant

You don't have to use systemd-resolved with NetworkManager, that's supposed to be used with systemd-networkd

Post the output of:

ls -l /etc/systemd/system/*.wants
ls -l /etc/resolv.conf
cat /etc/resolv.conf
systemd-analyze blame

Jin, Jîyan, Azadî

Offline

#3 2015-07-05 14:05:30

Tidykoala
Member
Registered: 2015-07-05
Posts: 14

Re: [SOLVED] Internet works only after few minutes

Thank you for your reply.

I understand, I admit that while I was reading the wiki to search the issue, I got quite confused between the role of each networking software: dhcpcd, NetworkManager...

Here are the outputs of the command lines you asked:

$ ls -l /etc/systemd/system/*.wants
/etc/systemd/system/getty.target.wants:
total 0
lrwxrwxrwx 1 root root 38 Jul  4 03:59 getty@tty1.service -> /usr/lib/systemd/system/getty@.service

/etc/systemd/system/multi-user.target.wants:
total 0
lrwxrwxrwx 1 root root 39 Jul  4 23:39 dhcpcd@eth0.service -> /usr/lib/systemd/system/dhcpcd@.service
lrwxrwxrwx 1 root root 46 Jul  5 14:23 NetworkManager.service -> /usr/lib/systemd/system/NetworkManager.service
lrwxrwxrwx 1 root root 40 Jul  4 03:59 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 48 Jul  4 23:57 systemd-resolved.service -> /usr/lib/systemd/system/systemd-resolved.service 
$ ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 32 Jul  4 23:46 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf 
$ cat /etc/resolv.conf
# Generated by resolvconf
nameserver 192.168.1.1 
$ systemd-analyze blame
          1.107s accounts-daemon.service
           699ms dev-mapper-lvm_storage\x2drootvol.device
           150ms lvm2-pvscan@254:0.service
           134ms systemd-resolved.service
           133ms systemd-journald.service
           103ms NetworkManager.service
            96ms systemd-hostnamed.service
            68ms systemd-localed.service
            40ms systemd-vconsole-setup.service
            37ms polkit.service
            34ms systemd-journal-flush.service
            30ms systemd-user-sessions.service
            28ms systemd-udevd.service
            25ms systemd-udev-trigger.service
            23ms systemd-fsck@dev-sda1.service
            22ms udisks2.service
            20ms gdm.service
            20ms systemd-fsck@dev-mapper-lvm_storage\x2dhomevol.service
            18ms systemd-tmpfiles-setup-dev.service
            18ms colord.service
            17ms wpa_supplicant.service
            17ms systemd-tmpfiles-clean.service
            17ms user@120.service
            15ms user@1000.service
            14ms dev-mapper-lvm_storage\x2dswapvol.swap
            13ms tmp.mount
            13ms systemd-sysctl.service
            11ms sys-kernel-debug.mount
            11ms systemd-logind.service
            11ms dev-mqueue.mount
            10ms sys-kernel-config.mount
             9ms kmod-static-nodes.service
             9ms systemd-remount-fs.service
             7ms dev-hugepages.mount
             7ms systemd-rfkill@rfkill1.service
             6ms upower.service
             5ms systemd-tmpfiles-setup.service
             5ms home.mount
             4ms systemd-update-utmp.service
             4ms rtkit-daemon.service
             4ms systemd-random-seed.service
             3ms boot.mount
             3ms systemd-backlight@backlight:intel_backlight.service
             2ms sys-fs-fuse-connections.mount
             1ms systemd-rfkill@rfkill2.service 

Offline

#4 2015-07-05 14:22:22

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,781
Website

Re: [SOLVED] Internet works only after few minutes

Disable the dhcpcd & systemd-resolved .services:

# systemctl disable dhcpcd@eth0.service systemd-resolved.service

You will also have to delete the resolv.conf symlink to let NetworkManager over-write the file (or create your own and disable this "feature" in NetworkManager).

I'm a bit confused by the content of /etc/resolv.conf because the systemd-resolved.service should have a message of it's own in the file (along with at least one more entry) -- is the file immutable or something?

Also, are you sure your ethernet interface is called "eth0"?
http://www.freedesktop.org/wiki/Softwar … faceNames/

Post the output of:

uname -a

EDIT: typo & silly question

Last edited by Head_on_a_Stick (2015-07-05 14:23:28)


Jin, Jîyan, Azadî

Offline

#5 2015-07-05 14:50:27

Tidykoala
Member
Registered: 2015-07-05
Posts: 14

Re: [SOLVED] Internet works only after few minutes

Thank you very much, I followed your instructions and now it works from start!

I'm thinking same as you, eth0 should not be the interface of my ethernet connection but enp0s25. I don't understand where it comes from. hmm

uname -a gives me: Linux 4.0.7-2-ARCH

When I put the computer off, I see one error about something having a time-out, but it disappears too fast and I don't manage to read it entirely. I'm thinking it is related to some networking.

And, is it normal that just before displaying the GNOME login, it stays quite some long seconds before on the dmesg ?

Offline

#6 2015-07-05 16:53:57

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,781
Website

Re: [SOLVED] Internet works only after few minutes

Tidykoala wrote:

eth0 should not be the interface of my ethernet connection but enp0s25. I don't understand where it comes from

Post the output of:

ip l
cat /proc/cmdline
Tidykoala wrote:

it stays quite some long seconds before on the dmesg

What is the output of:

systemctl --failed

You can examine error messages using `journalctl`
https://wiki.archlinux.org/index.php/Systemd#Journal

EDIT: Also, your `uname -a` output is incomplete -- post the *full* output and please use code tags when posting terminal output.

Last edited by Head_on_a_Stick (2015-07-05 16:58:51)


Jin, Jîyan, Azadî

Offline

#7 2015-07-05 17:38:50

Tidykoala
Member
Registered: 2015-07-05
Posts: 14

Re: [SOLVED] Internet works only after few minutes

As you can see, there is no eth0 interface hmm

$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 68:f7:28:e7:ce:65 brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 5c:e0:c5:50:c0:76 brd ff:ff:ff:ff:ff:ff
$ cat /proc/cmdline
BOOT_IMAGE=../vmlinuz-linux root=/dev/mapper/lvm_storage-rootvol cryptdevice=/dev/sda2:lvm_storage rw initrd=../initramfs-linux.img
$ systemctl --failed
0 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

It seems there are no fails at boot, so it's perhaps just normal that it takes 2-3 seconds before the login with the same dmesg screen even if I got a SSD.

For the uname:

$ uname -a
Linux foobar 4.0.7-2-ARCH #1 SMP PREEMPT Tue Jun 30 07:50:21 UTC 2015 x86_64 GNU/Linux

Thank you for the journalctl tip, I will look it more in depth.

Offline

Board footer

Powered by FluxBB