Linux Lite Forums
Development => Linux Lite Software Development => Topic started by: Jerry on June 11, 2017, 06:15:11 AM
-
I'm thinking of introducing a new feature to Lite Tweaks called Super Lite Mode.
What this effectively does is kill all but the necessary process on Linux Lite, including:
- All open windows and applications
- All unnecessary processes
- Copy & paste functions
What stays running:
- The desktop
- Sound services
- Graphics services
- Firewall (if enabled)
- Menu, Taskbar etc
This will be useful especially for older computers and gamers who want as few processes interfering with game performance as possible.
Before starting, please note how much ram is currently being used via Menu, System, Resource Usage, and please report back with the information next to 'Mem' eg. 259/1.95G
If you'd like to test this, please do the following:
Open a terminal, do:
sudo apt-get install wmctrl
touch superlitemode
leafpad superlitemode
Copy the following into the file and save it:
#!/bin/bash
# Linux Lite - Super Lite Mode Script
# Developer - Jerry Bezencon
# Website - http://www.linuxliteos.com
ps aux | grep -ie VBox | awk '{print $2}' | xargs kill -9
ps aux | grep -ie Thunar | awk '{print $2}' | xargs kill -9
ps aux | grep -ie blueman | awk '{print $2}' | xargs kill -9
ps aux | grep -ie applet.py | awk '{print $2}' | xargs kill -9
ps aux | grep -ie tumblerd | awk '{print $2}' | xargs kill -9
ps aux | grep -ie light-locker | awk '{print $2}' | xargs kill -9
ps aux | grep -ie xfce4-power-manager | awk '{print $2}' | xargs kill -9
ps aux | grep -ie obexd | awk '{print $2}' | xargs kill -9
# Close all open windows gracefully without closing the Desktop environment
# Credit - Guido van Steen: https://unix.stackexchange.com/questions/145752/how-to-kill-all-open-windows
WIN_IDs=$(wmctrl -l | grep -vwE "Desktop$|xfce4-panel$" | cut -f1 -d' ')
for i in $WIN_IDs; do wmctrl -ic "$i"; done
# Keep checking and waiting until all windows are closed (you probably don't need this section)
while test $WIN_IDs; do
sleep 0.1;
WIN_IDs=$(wmctrl -l | grep -vwE "Desktop$|xfce4-panel$" | cut -f1 -d' ')
done
chmod +x superlitemode
To run it in LL 3.4, just double click on the superlitemode file.
Then please ONLY open Menu, System, Resource Usage, and please report back with the information next to 'Mem' eg. 259/1.95G
WARNING: This will close all open windows including your web browser.
So, a typical reply to this thread would include:
Before superlitemode: 345/1.95G
After superlitemode: 259/1.95G (+ windows that remained open, if any)
Looking forward to all your feedback.
Many thanks :)
-
I tried this on my HP desktop LL64 bit v3.4. 4GB RAM double channel.
Before installing, on fresh boot, 987 mb used ( green + red) of 3856mb
After installing and double clicking superlitemode file - browser shuts down as does home folder as expected etc - just desktop viewed.. Resource relatively unchanged 979 used ( green+red) of 3850.
However I am running Sophos AV in the background so this might explain things??
Will try on Fuji3405 32bit LL3.4
-
Yes Sophos will be running in the background using a lot of memory. It wouldn't be smart of me to shut down any security services on people's machines :)
Sent from my Mobile phone using Tapatalk
-
Can I put in a temporary line into the file to "neutralise" sophos fo them period of the test?
BTW, what is the significance of the green and red parts of the RAM use display in resource report??
-
Temp. line, yes, if you know what the service is. I wouldn't know sorry. Green - used memory, Red - cache.
Sent from my Mobile phone using Tapatalk
-
working my way through Sophos linux manual as a wide eyed newbie :) Trying to find a way to disable on boot up, then will check resource clear mem ( Lite Tweaks) , check resource again, then trigger "superlitemode". Will report back when I have tested etc.. Unfortunately (for this test) all our family pcs laptops are Sophos live protected.
For the record the idea of superlitemode option ( preferably default on start up) for older cpus/models I think would be ideal and then user can initiate what is needed at the time; ideal to run off a usb say for internet banking etc. with "lightweight" browser for example ( Min http://www.omgubuntu.co.uk/2016/05/minimal-web-browser-linux (http://www.omgubuntu.co.uk/2016/05/minimal-web-browser-linux) )
-
Hi Jerry
May i suggest the following changes:
1. Open Menu, System, Resource Usage and note down the values next to 'Mem' eg. 259/1.95G
2. Navigate to "location of superlitemode file", ( found mine after awhile at /home/USERNAME )
3. WARNING: This will close all open windows including your web browser. To run it in LL 3.4, just double click on the superlitemode file.
Then please ONLY open Menu, System, Resource Usage, and note down again the values next to 'Mem' eg. 259/1.95G
So, a typical reply to this thread would include:
Before superlitemode: 345/1.95G
After superlitemode: 259/1.95G (+ windows that remained open, if any)
________________________________________________
My results:
Before superlitemode: 876m/5.72G
After superlitemode: 335m/5.72G (no windows remained open)
Will try again later immediately after restart and let you know.
-
Thank you :)
Sent from my Mobile phone using Tapatalk
-
These results are impressive.
-
Thanks @torreydale. Hoping to get many more people to participate in the test.
Sent from my Mobile phone using Tapatalk
-
Beta 32 bit 3.6 Fuji V3405 Full clean install - no background antivirus. No apps open - wifi running
On start up before activating superlite 310MB/1.96GB No swap
After activating superlite 265MB/1.96GB
Opening Firefox to post this 465MB/1.96
-
Excellent :)
-
On my Gateway computer:
Before- 299m/3.86
After- 268m/3.86
Firefox- 562m/3.86 (Opening firefox, coming to the forum & reporting the usage)
-
32bit?
Sent from my Mobile phone using Tapatalk
-
LL 3.4 on my Gateway is 64 bit. I'm using a 32bit system as I type this as I'm reinstalling LL on my netbook to get ready for the release at the end of the month. But the figures I posted for the Gateway were for 64bit.
-
Thank you.
Sent from my Mobile phone using Tapatalk
-
@Jerry, if you are still testing, here are my results after a reboot
(64-bit)
Before superlitemode: 234M
Windows open: none
Wi-fi: down
After superlitemode: 225M
Windows open: none
Wi-fi: down