Fix Xorg Wizard session save at reboot
This is a very old bug! Thanks to Caramel who discovered the problem:
https://forum.puppylinux.com/viewtopic.php?p=168843#p168843
...yes, changes are made to /etc/modprobe.d/gpu.conf and then a reboot; however the changed file doesn't get saved.
There is a section of code in /usr/sbin/xorgwizard-cli that was written in 2015, in the Quirky Linux days, and it is completely wrong for EasyOS. That is starting at line 1466.
There is a simple fix, that I think will restore session save:
#20260422 fix very old save-session code...
#save to .session/session1 if running in ram ...
if [ "$EOS_TOP_LEVEL_ZRAM" == "1" ];then #in /etc/rc.d/PUPSTATE
#/usr/sbin/reboot calls /etc/rc.d/rc.shutdown, which will save session if this file has "yes"...
echo -n 'yes' > /tmp/ask-save-zram1-answer
fi
sync
exec reboot ###EXIT###
That should do it, writing "yes" to /tmp/ask-save-zram1-answer, /etc/rc.d/rc.shutdown will then perform the session-save.
Oh man, that explains a lot of odd behaviour that puzzled me.
Quirky did not use an aufs/overlayfs and all writing was direct to
the physical media. EasyOS can also be direct-write, but the
default is to run in RAM and save at shutdown or via the "save"
icon on the desktop. So Easy's indirect save would have caused
Xorg Wizard to misbehave.
Tags: easy