( 8/10) Check if user should be informed about rebooting

…after certain system package upgrades.

However it doesn’t tell if the user needs actually to reboot or not.
I got this message just now after updating my kernels so I think I should have been informed to reboot the system?

 ( 7/10) Reloading system bus configuration...
 ( 8/10) Check if user should be informed about rebooting after certain system package upgrades.
 ( 9/10) Probing GDK-Pixbuf loader modules...
 (10/10) Updating the desktop file MIME type cache...

Only if the updated kernel is the one that you are currently booted on.

1 Like

I got updates to both of the kernels that I have installed. Zen which is currently running and lts as backup.

core/linux-lts                5.10.64-1      5.10.66-1       -0.01 MiB      74.83 MiB
core/linux-lts-headers        5.10.64-1      5.10.66-1        0.00 MiB      22.98 MiB
extra/linux-zen               5.14.3.zen1-1  5.14.5.zen1-1    0.00 MiB     130.65 MiB
extra/linux-zen-headers       5.14.3.zen1-1  5.14.5.zen1-1   -0.02 MiB      24.65 MiB

:thinking:

hm strange, in this case you should see a notification to reboot…
maybe a problem with that part of the script, 8/10 ?

I didn’t see this behavior yet

1 Like

Weird, according to:

cat "/usr/share/libalpm/hooks/eos-reboot-required.hook"

It should also signal about -zen kernel

@joekamprad @manuel looks like script doesn’t work?

/usr/bin/eos-reboot-required2

When trying launching just /usr/bin/eos-reboot-required without 2 it works :upside_down_face:
Or even directly /usr/bin/eos-reboot-required works as well

1 Like

As far as I know what shows in the text is only a description of the purpose of the ‘hook’ - that it shows up is because it means you need to reboot. It should also pop up a notification (upper right on my screen YMMV) that you SHOULD reboot.

It checks such things as kernels and updates to systemd and so on, so its track record is pretty good!

I also tried that. No result.

cat /usr/bin/eos-reboot-required2
#!/bin/bash

# Avoid unnecessary reboots: don't notify if an updated package is
# - not currently running (e.g. alternative kernel)
# - not in use (e.g. alternative driver)

RunningKernel() {
    cat /proc/cmdline | sed 's|.*/vmlinuz-\(linux[a-z0-9-]*\) .*|\1|'
}

Main() {
    local targets=$(tee /dev/null)  # targets from the hook (stdin)
    local target
    local notify=no
    local runningKernel="$(RunningKernel)"

    for target in $targets ; do
        case "$target" in
            linux | linux-lts | linux-zen | linux-hardened | linux-lts?? | linux-lts???)
                # Note: only official and older LTS kernels are checked.
                if [ "$target" = "$runningKernel" ] ; then
                    notify=yes
                    break
                fi
                ;;
            nvidia)
                if [ "$runningKernel" = "linux" ] ; then
                    notify=yes
                    break
                fi
                ;;
            nvidia-lts)
                if [ "$runningKernel" = "linux-lts" ] ; then
                    notify=yes
                    break
                fi
                ;;
            btrfs-progs)
                if [ -n "$(/usr/bin/df -hT | awk '{print $2}' | grep -w btrfs)" ] ; then
                    notify=yes
                    break
                fi
                ;;
            *)
                notify=yes
                break
                ;;
        esac
    done
    if [ "$notify" = "yes" ] ; then
        /usr/bin/eos-reboot-required
    fi
}


I get no notifications at all. :slightly_frowning_face:

Looks like that condition fails:

linux | linux-lts | linux-zen | linux-hardened | linux-lts?? | linux-lts???)
1 Like

I gonna reboot.
Back in a minute.

Sounds like you need to check out why your notifications aren’t working! What happens when you try this in a terminal?

notify-send "This is a test notification"

??

Not had much practice trouble-shooting it (never had a problem) but if that doesn’t show then something is mis-set or wrong…

I do get a notification a the top of the screen:

2 Likes

It’s a bug in /usr/bin/eos-reboot-required2

They work if you use notify-send or /usr/bin/eos-reboot-required or even directly /usr/bin/eos-reboot-required

2 Likes

So changing
Exec = /usr/bin/eos-reboot-required2
to
Exec = /usr/bin/eos-reboot-required
in
/usr/share/libalpm/hooks/eos-reboot-required.hook
should fix it?

Btw, perhaps I should move the topic to bug report ?

Yes
Well, that’s one way to fix it, although i’d just wait until @joekamprad & @manuel would fix it :wink:

1 Like

Yeah, that was a mistake. I am not on ARM. :sweat_smile:

We are cross-editing!

Moved to #arch-based-related-questions:bug-reports

1 Like

BTW …KDE gives me notifications when to reboot. :sweat_smile:

I bet it makes you coffee in the morning as well :sweat_smile:

2 Likes

here it runs also fine on xfce4 and i3 (my i3 does not count as it has… not much in common with EndeavourOS in general :wink: )

@pebcak do you sit behind your Desktop? :upside_down_face:
could be the issue?

Ah I mean what is your Desktop ?

2 Likes