xfce4-settings-4.13.6-1.fc30 (fc30 means Fedora 30) Forum thread https://forum.xfce.org/viewtopic.php?id=13109 - There is an option in the settings editor (xfconf) to set numlock on or off by default but it isn't present in the keyboard settings GUI. So I went with setting numlock to on and checking to save state, but this isn't working. Now I have what I need as by the forum thread I discovered the setting to turn it on as default but if, for instance, I disable it, it starts enabled because of 'restore state' not working.
https://git.xfce.org/xfce/xfce4-settings/tree/xfsettingsd/keyboards.c#n306 It appears that xfconf_channel_set_bool() does not create the property in case it is missing.
Created attachment 8694 patch Closing the D-Bus connection after (instead of before) shutting down xfconf fixes this bug. The property is now created or updated whenever xfsettingsd is terminated. Also, the toggle button in the settings GUI was incorrectly set to 'active'.
Theo Linkspfeifer referenced this bugreport in commit 5bfabccb9a13e4612b6017bdc9a407f606718580 Fix numlock state restoration (Bug #15642) https://git.xfce.org/xfce/xfce4-settings/commit?id=5bfabccb9a13e4612b6017bdc9a407f606718580
Thanks for the patch, looks good to me. Committed above.