Page 2 of 3
Start-up lag on KDE
Posted: 17 Apr 2020, 18:19
by Ed_P
meet wrote: ↑17 Apr 2020, 15:53
Does this mean that the location /mnt/live/memory/images/changes basically opens the save.dat file?
No. It is the changes that will be written to the save.dat file.
And while you can view the details of usage you should
not change them while the system is running.
Try this script, it should satisfy your curiosity.
Spaceused.sh
Code: Select all
#!/bin/sh
# https://forum.porteus.org/viewtopic.php?f=81&t=1941&start=15#p13272
# https://forum.porteus.org/viewtopic.php?f=117&t=3205&p=25099#p25097
# mloop requires changes= cheatcodes not be used (Always Fresh mode)
# nor modsavedat/porteussave.dat.xzm!!
BOOTDEV=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
if [ "$BOOTDEV" == "/mnt/isoloop" ]; then
BOOTDEV=`grep -A1 "ISO=" /var/log/porteus-livedbg`
BOOTDEV=${BOOTDEV:4:9}
fi
VERSION=$(cat /etc/porteus-version)
FOLDER=porteus${VERSION:9:3}
GUEST="$BOOTDEV/$FOLDER/Guest"
MODULES="$BOOTDEV/$FOLDER/Modules"
# Color definitions
txtbld=$(tput bold) # Bold
txtred=${txtbld}$(tput setaf 1) # Red
rst=$(tput sgr0) # Reset
function redpswd() {
echo -e "$1" $txtred
}
if [ `whoami` != "root" ]; then
redpswd "Enter root's password"
su -c "sh $0 $1"
exit
fi
echo $rst
if [ "$1" == "" ]; then
if [ -a /mnt/live/memory/images/changes ]; then
SPACEDATDIR=/mnt/live/memory/images/changes
echo "SPACEDATDIR = $SPACEDATDIR"
else
echo mloop $BOOTDEV/$FOLDER/changes/porteussave.dat
mloop $BOOTDEV/$FOLDER/changes/porteussave.dat &>/dev/null
SPACEDATDIR=/mnt/loop
echo "SPACEDATDIR = $SPACEDATDIR < $BOOTDEV/$FOLDER/changes/porteussave.dat"
fi
else
echo mloop $1
mloop $1
SPACEDATDIR=/mnt/loop
echo "SPACEDATDIR = $SPACEDATDIR < $1"
fi
if [ ! -d ${SPACEDATDIR}/home ]; then
echo " Error!! "
dmesg | tail > t
UUIDck=$(grep -A1 "duplicate UUID" t)
if [ ! "$UUIDck" == "" ]; then
echo
echo " * This is NOT Always Fresh mode. * "
echo
else
echo
echo "dmesg | tail "
dmesg | tail
fi
rm t
uloop
exit
fi
echo
echo du -sh
du -sh ${SPACEDATDIR} # Show the amount used
echo df -h
df -h ${SPACEDATDIR} # Show filesystem summary
echo
du -sh ${SPACEDATDIR}/opt
du -sh ${SPACEDATDIR}/root
du -sh ${SPACEDATDIR}/etc
du -sh ${SPACEDATDIR}/usr
du -sh ${SPACEDATDIR}/var
du -sh ${SPACEDATDIR}/home
echo
if [ -d "${SPACEDATDIR}/home/guest/.PlayOnLinux" ]; then
du -sh ${SPACEDATDIR}/home/guest/.PlayOnLinux
fi
if [ -d "${SPACEDATDIR}/home/guest/.wine" ]; then
du -sh ${SPACEDATDIR}/home/guest/.wine
fi
echo
echo Press Enter for more details, Ctrl+C to end.
read
du -sh ${SPACEDATDIR}/etc/usm
#echo ls ${SPACEDATDIR}/etc/usm
#ls ${SPACEDATDIR}/etc/usm
#cat ${SPACEDATDIR}/etc/usm/usm.conf
echo
du -sh ${SPACEDATDIR}/var/log
du -sh ${SPACEDATDIR}/var/usm
du -h ${SPACEDATDIR}/var/usm/*
echo
du -sh ${SPACEDATDIR}/home/guest/Downloads
du -sh ${SPACEDATDIR}/home/guest/Desktop
du -h ${SPACEDATDIR}/home/guest/Backups
echo
echo ls -slgh ${SPACEDATDIR}/home/guest/Backups/FireFox
ls -gh ${SPACEDATDIR}/home/guest/Backups/FireFox
echo
if [ -d "${SPACEDATDIR}/home/guest/.wine" ]; then
du -h ${SPACEDATDIR}/*|grep '[0-9][0-9][0-9]M'
else
du -h ${SPACEDATDIR}/*|grep '[0-9][0-9]M'
fi
if [ -a /mnt/live/memory/images/changes ]; then
echo
echo "For more info use:"
echo " du -h /mnt/live/memory/images/changes/home/guest*"
echo " du -h /mnt/live/memory/images/changes/home/*" and
echo " du -h /mnt/live/memory/images/changes/*|grep '[0-9][0-9]M'"
else
uloop
fi
read
If you don't like what you see, change the source of the change not the change itself.
Start-up lag on KDE
Posted: 18 Apr 2020, 17:06
by meet
Ed_P wrote: ↑17 Apr 2020, 18:19
Try this script, it should satisfy your curiosity.
Just to be clear:
1. I need to save this code somewhere, and then I need to run this from the terminal by calling the sh ./scriptfilename.sh function at the saved path. And the results will be populated for the total space of my save.dat file, the space utilized. Yes?
2. This script only shows the space and does no changes to any setting or any thing anywhere. Yes?
3. If my save file is say at location /mnt/sdb1/foldername/save.dat then where all I need to change in your code?
Ed_P wrote: ↑17 Apr 2020, 18:19
If you don't like what you see, change the source of the change not the change itself.
Sorry, I don't understand this. I think it is relating to the results of the script? Say the space is filled up and I want to remove the files, then I should remove the source of those files and not those files from the save.dat? Is that what you meant?
Start-up lag on KDE
Posted: 18 Apr 2020, 19:08
by Ed_P
meet wrote: ↑18 Apr 2020, 17:06
Just to be clear:
1. I need to save this code somewhere, and then I need to run this from the terminal by calling the sh ./scriptfilename.sh function at the saved path. And the results will be populated for the total space of my save.dat file, the space utilized. Yes?
Kinda.
I would suggest you save the files in your /home/guest/ folder and make them executable by running this in terminal: chmod +x *.sh
Then you can run the file either in terminal with ./scriptfilename.sh or in your file manager's GUI by double clicking on it and selecting Run in Terminal.
The space displayed will be the files that Porteus will write to your save.dat file.
2. This script only shows the space and does no changes to any setting or any thing anywhere. Yes?
Yes.
3. If my save file is say at location /mnt/sdb1/foldername/save.dat then where all I need to change in your code?
Unless your running the code on a different system than the one using the changes= cheatcode you shouldn't need to change the code.
meet wrote: ↑18 Apr 2020, 17:06
Ed_P wrote: ↑17 Apr 2020, 18:19
If you don't like what you see, change the source of the change not the change itself.
Sorry, I don't understand this. I think it is relating to the results of the script? Say the space is filled up and I want to remove the files, then I should remove the source of those files and not those files from the save.dat? Is that what you meant?
Yes, it is relating to the results of the script and yes that is what you should do. Say you download 1.5 GB movie to your /home/guest/Downloads folder. You run the script to check the changes to be written to the save.dat file and see it is too much. To correct the problem you delete the file in the /home/guest/Downoads folder or move it to a folder outside the Porteus system. There is also the option to change the browser's downloads setup to download files to a folder outside the Porteus system.
So, how full is your 1.5 GB porteussave.dat file at this point? Have you run either of the scripts?
Start-up lag on KDE
Posted: 18 Apr 2020, 19:56
by meet
Ed_P wrote: ↑18 Apr 2020, 19:08
So, how full is your 1.5 GB porteussave.dat file at this point? Have you run either of the scripts?
The spaceck.sh said 'changes/porteussave.dat file not found'
While the spaceused.sh had some error I couldn't understand.
Start-up lag on KDE
Posted: 18 Apr 2020, 20:40
by Ed_P
meet wrote: ↑18 Apr 2020, 19:56
The spaceck.sh said 'changes/porteussave.dat file not found'
While the spaceused.sh had some error I couldn't understand.
What system were you running spaceck.sh on? If you run it on the system that's using the changes= cheatcode it will find your changes.
Added in 4 hours 29 minutes 25 seconds:
On a USB drive that I have Porteus installed on my changes are in the /changes/porteussave.dat file.
guest@porteus:/mnt/sdb1$ ls -g
total 272
-rwxrwxrwx 1 root 2271 Mar 20 15:51 Dell2Dell.txt*
drwxrwxrwx 4 root 16384 Nov 21 2018 EFI/
drwxrwxrwx 2 root 16384 Nov 22 23:24 Modules/
drwxrwxrwx 2 root 16384 Nov 21 2018 Optional/
drwxrwxrwx 2 root 16384 Nov 21 2018 System\ Volume\ Information/
-rwxrwxrwx 1 root 1512 Apr 29 2018 USB_INSTALLATION.txt*
drwxrwxrwx 3 root 16384 Feb 2 07:59 Xfers/
drwxrwxrwx 5 root 16384 Nov 20 2018 boot/
drwxrwxrwx 2 root 16384 Nov 21 2018 changes/
drwxrwxrwx 6 root 16384 Apr 29 2018 porteus/
guest@porteus:/mnt/sdb1$
Start-up lag on KDE
Posted: 19 Apr 2020, 09:06
by meet
Ed_P wrote: ↑19 Apr 2020, 01:10
On a USB drive that I have Porteus installed on my changes are in the /changes/porteussave.dat file.
I do not have porteus installed on my USB. I had copied the files on a FAT32 USB and created the changes file and started using it like that only.
The changes file I have is at location /mnt/sdb1/"foldername"/save.dat
My file name is "save.dat" and not "porteussave.dat"
That's why I was asking probably some changes in your code were required for my case. In both the scripts.
Start-up lag on KDE
Posted: 19 Apr 2020, 09:13
by meet
Hey guys.
The core issue for which the thread was created is still not solved. If someone can help me with this. I still face lag on my KDE desktop as soon as it starts up. For about 45 seconds. I do not understand what background process is causing the lag.
I even tried installing porteus 4.0 cinnamon on a different drive. It worked perfectly for the initial two boots. But from the third boot, even that is having an initial lag as soon as the cinnamon desktop is loaded. The lag is smaller compared to KDE, but it is still there.
Earlier I had shared the KDE logs. Now attached are the cinnamon logs extracted from the /var/log/*
syslog Apr 18
Code: Select all
Apr 18 22:13:38 porteus NetworkManager[906]: <warn> [1587228218.3851] keyfile: 'hostname' option is deprecated and has no effect
Apr 18 22:13:39 porteus console-kit-daemon[981]: WARNING: Failed to open connection to cgmanager. Is the cgmanager daemon running?
Apr 18 22:13:43 porteus pulseaudio[1231]: [pulseaudio] pid.c: Stale PID file, overwriting.
Apr 18 22:13:43 porteus pulseaudio[1231]: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
Apr 18 22:13:43 porteus pulseaudio[1242]: [pulseaudio] pid.c: Daemon already running.
Apr 18 22:13:45 porteus NetworkManager[906]: <warn> [1587228225.0863] dhcp6 (wlan0): hostname is not a FQDN, it will be ignored
Apr 18 22:14:14 porteus kernel: [ 50.709936] acer_wmi: Unknown function number - 4 - 9
Apr 18 22:14:14 porteus kernel: [ 50.710335] acer_wmi: Unknown function number - 4 - 0
Apr 18 22:14:30 porteus NetworkManager[906]: <warn> [1587228270.6789] dhcp6 (wlan0): request timed out
syslog Apr 19 14:31
Code: Select all
Apr 19 14:31:41 porteus NetworkManager[906]: <warn> [1587286901.8261] keyfile: 'hostname' option is deprecated and has no effect
Apr 19 14:31:43 porteus console-kit-daemon[982]: WARNING: Failed to open connection to cgmanager. Is the cgmanager daemon running?
Apr 19 14:31:47 porteus pulseaudio[1232]: [pulseaudio] pid.c: Daemon already running.
Apr 19 14:31:47 porteus pulseaudio[1239]: [pulseaudio] pid.c: Stale PID file, overwriting.
Apr 19 14:31:47 porteus pulseaudio[1239]: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
Apr 19 14:31:47 porteus pulseaudio[1266]: [pulseaudio] pid.c: Daemon already running.
Apr 19 14:31:51 porteus NetworkManager[906]: <warn> [1587286911.2543] dhcp6 (wlan0): hostname is not a FQDN, it will be ignored
Apr 19 14:32:04 porteus kernel: [ 36.497353] acer_wmi: Unknown function number - 4 - 0
Apr 19 14:32:04 porteus kernel: [ 36.498047] acer_wmi: Unknown function number - 4 - 0
Apr 19 14:32:04 porteus kernel: [ 37.120734] acer_wmi: Unknown function number - 4 - 0
Apr 19 14:32:04 porteus kernel: [ 37.121216] acer_wmi: Unknown function number - 4 - 0
Apr 19 14:32:36 porteus NetworkManager[906]: <warn> [1587286956.8087] dhcp6 (wlan0): request timed out
Please help me solve this.
During the lag time, nothing functions. Mouse clicks or keyboard presses. Mouse hover. Nothing yields any result. And all commands given during the lag time (say by clicking on the start button or opening files) are all executed post the lag time. (~hang)
The logs under both KDE and Cinnamon showed some entries of pulseaudio (org.freedesktop) and network manager. I believe the issue is with either of these two, as the system starts working perfectly fine exactly from the time when the log completes.
And I do not face any log whatsoever, even when I use so many files and browser windows simultaneously. It's only the half minute post loading the KDE/CInnamon desktop.
Start-up lag on KDE
Posted: 19 Apr 2020, 15:20
by Ed_P
meet I don't understand the problem. The next time you run the scripts copy all the text displayed in the terminal window and post it.
meet wrote: ↑19 Apr 2020, 09:06
I do not have porteus installed on my USB.
Where are you booting Porteus from?
Start-up lag on KDE
Posted: 19 Apr 2020, 17:08
by meet
Ed_P wrote: ↑19 Apr 2020, 15:20
meet I don't understand the problem. The next time you run the scripts copy all the text displayed in the terminal window and post it.
For spaceused.sh
Code: Select all
mloop /mnt/sdb1/porteus4.0/changes/porteussave.dat
SPACEDATDIR = /mnt/loop < /mnt/sdb1/porteus4.0/changes/porteussave.dat
Error!!
dmesg | tail
[ 21.390266] wlan0: RX AssocResp from 50:d4:f7:e1:f5:78 (capab=0x411 status=0 aid=1)
[ 21.395543] wlan0: associated
[ 164.386890] acer_wmi: Unknown function number - 4 - 9
[ 164.387560] acer_wmi: Unknown function number - 4 - 0
[ 164.755548] acer_wmi: Unknown function number - 4 - 0
[ 164.756440] acer_wmi: Unknown function number - 4 - 0
[ 165.015738] acer_wmi: Unknown function number - 4 - 7
[ 165.016420] acer_wmi: Unknown function number - 4 - 0
[ 318.206758] acer_wmi: Unknown function number - 4 - 8
[ 318.207437] acer_wmi: Unknown function number - 4 - 0
nothing is mounted in /mnt/loop
For spaceck.sh
Code: Select all
sh ./spaceck.sh
No /mnt/sdb1/changes/porteussave.dat file.
Ed_P wrote: ↑19 Apr 2020, 15:20
Where are you booting Porteus from?
From the USB. I do not have Porteus "installed" on the USB. I have booted from the USB using porteus files (copying the files from the iso to the usb).
Start-up lag on KDE
Posted: 19 Apr 2020, 18:45
by Ed_P
If you're booting from it it's installed.
BTW I just booted my USB drive, renamed my save.dat file and can confirm your errors.
I'll get back to you.
-update-
With the changes= cheatcode in use the spaceused.sh script works. If the changes= cheatcode is not used the spaceused.sh script does not work with your names.
The same holds true for the spaceck.sh script.
When the changes= cheatcode is in use the scripts use the /mnt/live/memory/images/changes file.
Code: Select all
guest@porteus:~/Savedat$ ls -lght /mnt/sdb1/*changesX
total 320M
-rwxrwxrwx 1 root 320M Apr 19 10:57 porteussaveX.dat*
guest@porteus:~/Savedat$ ./spaceck.sh
guest@porteus:~/Savedat$ ./spaceused.sh
Enter root's password
Password:
SPACEDATDIR = /mnt/live/memory/images/changes
du -sh
88M /mnt/live/memory/images/changes
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/loop21 317M 106M 211M 34% /mnt/live/memory/images/changes
4.0K /mnt/live/memory/images/changes/opt
1.5M /mnt/live/memory/images/changes/root
364K /mnt/live/memory/images/changes/etc
6.3M /mnt/live/memory/images/changes/usr
24M /mnt/live/memory/images/changes/var
57M /mnt/live/memory/images/changes/home
Press Enter for more details, Ctrl+C to end.
The errors you are seeing is when you are not using your save.dat file with the changes= cheatcode. If that is too hard for you try right clicking on your save.dat file and choose to open it with P7ZIP.
Start-up lag on KDE
Posted: 20 Apr 2020, 02:40
by meet
Ed_P wrote: ↑19 Apr 2020, 18:45
The errors you are seeing is when you are not using your save.dat file with the changes= cheatcode.
My Porteus file:
Code: Select all
### This is the porteus config file.
### You may put cheatcodes here one per line.
### Cheatcodes must start at the beginning of the line (no space before).
### Any line with the "#" character at the start is ignored.
###
### For a list of cheatcodes check /usr/doc/porteus/cheatcodes.txt
### EXAMPLES
## This tells porteus whence to boot
# from=/mnt/sda2/porteus
## This tells porteus to boot into text mode
# 3
## Tell porteus to delay boot for 5 seconds
# delay=5
## Tell porteus where the changes folder is
# changes=/mnt/sda2/changes
## This tells porteus which timezone settings you prefer
# timezone=America/Sao_Paulo
## Set keybord to Brazilian Portuguese
# kmap=br
changes=EXIT:/mnt/sdb1/save/save.dat
As it shows, there's a changes= cheatcode present in the file. The cheatcode is also present in the porteus.cfg in boot folder. My changes are also being saved across boots. So I think you should revisit your conclusion about me not using the cheatcode. I wonder how else I would be saving the changes in save.dat file!
Ed_P wrote: ↑19 Apr 2020, 18:45
If you're booting from it it's installed.
That's not entirely true. Booting is by making the drive bootable, copying the ISO files to the USB. Installed OS means one has used the installer provided in the OS to install the system in a disk or drive. Porteus also has an installer application.
For porteus, it may be the same thing -- to copy the files may be installing itself due to its design. But the things are different nonetheless.
Any way, this terminology difference doesn't make a difference in the placement or use of the save.dat file I guess. So, we can proceed with making your code usable in all cases.
Start-up lag on KDE
Posted: 20 Apr 2020, 04:08
by Ed_P
I have NO idea what file you are looking at. This is part of the /boot/syslinux/porteus.cfg file of my Porteus Cinnamon system.
Code: Select all
LABEL GRAPHICAL
MENU LABEL Graphics mode
KERNEL /boot/syslinux/vmlinuz
INITRD /boot/syslinux/initrd.xz
APPEND changes=/porteus
TEXT HELP
Run Porteus the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT
LABEL fresh
MENU LABEL Always Fresh
KERNEL /boot/syslinux/vmlinuz
INITRD /boot/syslinux/initrd.xz
APPEND nomagic base_only norootcopy
TEXT HELP
Normally Porteus saves all changes
to the /porteus/changes/ directory
on the boot media (if writable)
and restores them next boot.
Use this option to start a fresh
system, changes are not read from
or written to any device
ENDTEXT
If you don't have a /mnt/live/memory/images/changes file and your changes are being saved your not using a Porteus system I'm familiar with.
-update-
Oh, your using the version 5.0 test system's porteus cfg file. I'm pretty sure it doesn't work with 4.0 systems.
-update-
Yup, you're right the spaceused.sh script don't work on the 5.0 test system I just booted. Something I will have to look into when I upgrade to 5.0. But spaceck.sh works when I use a changes= cheatcode in my boot parms.
meet wrote: ↑14 Apr 2020, 03:27
I am running Porteus 4 with KDE.
You might want to change you're initial posting.
-update-
spaceused.sh fails if you are using the changes= cheatcode and have not saved anything in your /home/ folders.
Start-up lag on KDE
Posted: 20 Apr 2020, 13:06
by meet
Ed_P wrote: ↑20 Apr 2020, 04:08
Woah!
I am lost as to which reply of yours to respond to.
I will try.
I had sent you the porteus-v4.0-x86_64.cfg file from the location: /mnt/sdb1/porteus/
Somewhere I had read that cheat codes that you want to use should be put in this file.
In both the files, I have the cheat code for changes= and the location for the save.dat file is mentioned. Due to which changes are saved.
As you earlier pointed out, my file is at /mnt/sdb1/save/save.dat location, while the changes done in one particular session are at /mnt/live/memory/images/changes location (used in your code).
Now pls tell me from scratch what to do with your code?
Start-up lag on KDE
Posted: 20 Apr 2020, 19:18
by Ed_P
You are right
meet there is a similar file in Porteus 4.0. I don't use it myself.
For your /save/save.dat file just use P7ZIP to see what's inside.
If there is no /home/ folder showing try saving something to your /home/guest/ folder when Porteus is booted with the changes= cheatcode in use and then reboot and check it.
Start-up lag on KDE
Posted: 21 Apr 2020, 04:19
by meet
Ed_P wrote: ↑20 Apr 2020, 19:18
You are right
meet there is a similar file in Porteus 4.0. I don't use it myself.
For your /save/save.dat file just use P7ZIP to see what's inside.
If there is no /home/ folder showing try saving something to your /home/guest/ folder when Porteus is booted with the changes= cheatcode in use and then reboot and check it.
Hey Ed. Yes. Thanks.
Okay. I opened the .dat file using p7zip. It had one file called "save".
Here are the properties of that file:
Code: Select all
Name: save
Size: 5 430
Packed Size: 1 897
Host OS: Unix
CRC: 00000000
----------------------------
Size: 5 430
Packed Size: 1 897
Folders: 0
Files: 1
CRC: 00000000
----------------------------
Path: /mnt/sdb1/save/save.dat
Type: gzip
Errors: FIXME-MyLoadStringW-
Offset: 966656
Physical Size: 1 897
Tail Size: 1 584 478 359
Headers Size: 10
Streams: 1
I guess the file is sized 5 MB? Out of 1.5 GB? Right?
I cannot unpack / unzip it. Shows this error.
I have files in my /guest/ location. In different folders like documents, pictures, etc. Amount to about 10 MB. That's it.