Disabling daily Fedora auto reboots

After using Tuxedo OS (a kubuntu variant provided by the manufacturer Tuxedo) for a year or so, I decided to give Fedora another try – no special reason, just out of curiosity. I’ve been happy so far, everything works as you’d expect. However, I noticed that every day in the morning, if I didn’t put my notebook to sleep, it would reboot automatically. Since I have disk encryption enabled, it then just sits there and waits for the drive key to be entered. Since I didn’t witness the actual reboot I didn’t know when exactly this was happening.

Internet search didn’t reveal anything, so I went log hunting. To find the time of the last reboot I used

sudo journalctl --boot=-1

This shows you the log output beginning from the the last reboot. I could see that the reboot happens at 8 am in the morning. In order to find the reason I searched backwards from that time and sure enough I found a systemd service that was invoked: fedora-up.

[Service]
Type=oneshot
ExecStartPre='/usr/bin/dnf' clean 'all'
ExecStart='/usr/bin/dnf' distro-sync -y
ExecStart='/usr/bin/dnf' autoremove -y
ExecStartPost='/usr/bin/sync'
ExecStartPost='/usr/bin/systemctl' reboot

As you can see it triggers a reboot after commands in ExecStart have been run. There’s also a systemd timer present and it schedules fedora-up to be executed daily at 8am. Even now, knowing the service name resonsible, I still can’t find information about it online.

Now what to do? Disable the timer so that the whole service is not run automatically? Or just remove the reboot from the service? For now I decided to just remove the reboot from the service file – that why I will still get daily update notifications even if I don’t reboot my notebook. I’ll have to see if this change sticks or if Fedora will overwrite the file at some point. But at least I know the reason for the daily reboots now…

Leave a Reply

Your email address will not be published. Required fields are marked *