You are Here:
Install Updates Gimp Error - see Security & Bug Fixes Section Sticky



How to maintain custom tweaks after reboot/sleep

Author (Read 630 times)

0 Members and 1 Guest are viewing this topic.

How to maintain custom tweaks after reboot/sleep
« on: February 06, 2019, 05:19:23 PM »
 

MS

  • Forum Regular
  • ***
  • 217
    Posts
  • Country: 00
  • Reputation: 9

  • Linux Lite: 4.6 64bit

  • CPU: Intel i7-7500U DualCore @ 2.7~3.5GHz

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD Graphics 620 / AMD Radeon R7 M445
Hello,

I have applied certain custom settings, regarding the swappiness value, as well as the overclock of an amdgpu associated device. The swappiness value stays after system waking from the sleep mode, but resets after each reboot. When it comes to the amdgpu overclock parameters, they reset already after system waking from the sleep mode. I would like to have these maintained. I believe a script could do. Where do I put respective scripts, what extra instructions should they include to be maintained by the system?

These are the regular commands that I use to introduce changes - inserted values are theoretical:

Code: [Select]
sudo echo "10" > /proc/sys/vm/swappiness
Code: [Select]
sudo bash -c 'echo "20" > /sys/class/drm/card1/device/pp_sclk_od && echo "20" > /sys/class/drm/card1/device/pp_mclk_od'
 


Re: How to maintain custom tweaks after reboot/sleep
« Reply #1 on: February 06, 2019, 06:12:51 PM »
 

firenice03

  • Rockin' the FREE World
  • Global Moderator
  • Platinum Level Poster
  • *****
  • 1150
    Posts
  • Country: us
  • Reputation: 223
  • Linux Lite Member

  • Linux Lite: 4.6 64bit

  • CPU: AMD E2//Atom X5//AMD Phenom II X2

  • MEMORY: 4Gb

  • VIDEO CARD: AMD Mullin Radeon R2//Intel//AMD/ATI RS880
@MS
 To keep swappiness..


you can vi/nano as root
Code: [Select]
/etc/sysctl.conf
Then change/add the line -
Code: [Select]
vm.swappiness = 10You'll need to reboot to take effect..



Can do while running with
Code: [Select]
sysctl vm.swappiness=10


As for the Overclocking, I would suggest similarly editing the files (vi/nano - most likely as root) directly vs. echoing the desired input..
*Added - on a second thought - you could go to 'session and startup' the 'application autostart' tab to add the script... Remember to make the script executable.



Also instead of vi/nano, one can open the folder(s) as administrator(rt click) and edit the files with leadpad...
Last Edit: February 06, 2019, 06:34:46 PM by firenice03
LL 4.6 UEFI 64 bit ASUS E402W - AMD E2 (Quad) 1.5Ghz  - 4GB - AMD Mullins Radeon R2
LL 4.6 64 bit HP 6005- AMD Phenom II X2 - 8GB - AMD/ATI RS880 (HD4200)
LL 4.4 UEFI 64 bit Test UEFI Kangaroo (Mobile Desktop) - Atom X5-Z8500 1.44Ghz - 2GB - Intel HD Graphics
LL 3.8 32 bit Dell Inspiron Mini - Atom N270 1.6Ghz - 1GB - Intel Mobile 945GSE Express
RETIRED LL 2.8 64 bit Dell Optiplex 160 (Thin) - Atom 230 1.6Ghz - 4GB-SiS 771/671 PCIE VGA
Running Linux Lite since LL2.2
 

Re: How to maintain custom tweaks after reboot/sleep
« Reply #2 on: February 06, 2019, 06:43:04 PM »
 

MS

  • Forum Regular
  • ***
  • 217
    Posts
  • Country: 00
  • Reputation: 9

  • Linux Lite: 4.6 64bit

  • CPU: Intel i7-7500U DualCore @ 2.7~3.5GHz

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD Graphics 620 / AMD Radeon R7 M445
As for the Overclocking, I would suggest similarly editing the files (vi/nano - most likely as root) directly vs. echoing the desired input..
*Added - on a second thought - you could go to 'session and startup' the 'application autostart' tab to add the script... Remember to make the script executable.

Also instead of vi/nano, one can open the folder(s) as administrator(rt click) and edit the files with leadpad...
I did edit the amdgpu target files couple of times but similarly as with echoing, the values get nullified on every occasion. For adding the scripts to autostart, I imagine it will apply only per boot, but what about waking from the sleep mode? Will need to test it out.
 

Re: How to maintain custom tweaks after reboot/sleep
« Reply #3 on: February 06, 2019, 07:07:26 PM »
 

MS

  • Forum Regular
  • ***
  • 217
    Posts
  • Country: 00
  • Reputation: 9

  • Linux Lite: 4.6 64bit

  • CPU: Intel i7-7500U DualCore @ 2.7~3.5GHz

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD Graphics 620 / AMD Radeon R7 M445
I have read something somewhere about putting the scripts to /etc/init.d/ location, is that any way to go?

Attempted to issue the commands without prior root prefixes at the "session and startup", but understandably, it did not go. I am uncertain how this "session and startup" works, I mean, are these programs initiated after the first logging in - which would mean, too late - or does the first logging in already unlock the root access needed to start the applications requiring it? If so, it would make sense to issue the commands with root prefixes.
Last Edit: February 06, 2019, 07:11:17 PM by MS
 

Re: How to maintain custom tweaks after reboot/sleep
« Reply #4 on: February 07, 2019, 10:22:38 AM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1005
    Posts
  • Country: us
  • Reputation: 178
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 4.4 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: How to maintain custom tweaks after reboot/sleep
« Reply #5 on: February 08, 2019, 03:26:24 AM »
 

MS

  • Forum Regular
  • ***
  • 217
    Posts
  • Country: 00
  • Reputation: 9

  • Linux Lite: 4.6 64bit

  • CPU: Intel i7-7500U DualCore @ 2.7~3.5GHz

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD Graphics 620 / AMD Radeon R7 M445
Perhaps this explains.

https://unix.stackexchange.com/questions/404780/cant-overclock-gpu-using-amdgpu-driver-on-archlinux

TC
I am uncertain whether we are on the same frequency here, as I was asking for how to imprint these changes as to make them system default, per each boot and per each session, awakening from suspend or other. But maybe I have missed out on something. If so, please quote.
 

Re: How to maintain custom tweaks after reboot/sleep
« Reply #6 on: February 08, 2019, 08:25:22 AM »
 

firenice03

  • Rockin' the FREE World
  • Global Moderator
  • Platinum Level Poster
  • *****
  • 1150
    Posts
  • Country: us
  • Reputation: 223
  • Linux Lite Member

  • Linux Lite: 4.6 64bit

  • CPU: AMD E2//Atom X5//AMD Phenom II X2

  • MEMORY: 4Gb

  • VIDEO CARD: AMD Mullin Radeon R2//Intel//AMD/ATI RS880
This may give some insight to running a script at resume.... Not sure about the overclocking... But for a script...
https://askubuntu.com/questions/92218/how-to-execute-a-command-after-resume-from-suspend


Script should be executable and not just an .sh extension (if globally needed) - same as a startup
Code: [Select]
chmod uga +x NameOfFile


LL 4.6 UEFI 64 bit ASUS E402W - AMD E2 (Quad) 1.5Ghz  - 4GB - AMD Mullins Radeon R2
LL 4.6 64 bit HP 6005- AMD Phenom II X2 - 8GB - AMD/ATI RS880 (HD4200)
LL 4.4 UEFI 64 bit Test UEFI Kangaroo (Mobile Desktop) - Atom X5-Z8500 1.44Ghz - 2GB - Intel HD Graphics
LL 3.8 32 bit Dell Inspiron Mini - Atom N270 1.6Ghz - 1GB - Intel Mobile 945GSE Express
RETIRED LL 2.8 64 bit Dell Optiplex 160 (Thin) - Atom 230 1.6Ghz - 4GB-SiS 771/671 PCIE VGA
Running Linux Lite since LL2.2
 

Re: How to maintain custom tweaks after reboot/sleep
« Reply #7 on: February 09, 2019, 12:29:45 AM »
 

MS

  • Forum Regular
  • ***
  • 217
    Posts
  • Country: 00
  • Reputation: 9

  • Linux Lite: 4.6 64bit

  • CPU: Intel i7-7500U DualCore @ 2.7~3.5GHz

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD Graphics 620 / AMD Radeon R7 M445
Thanks @firenice03, but having looked up the answers you have linked and the proposed conditions required to make a competent looking script for the system resume from suspend, I thought that I would not know what am I doing with it, so I guess that I will just pass on this.
Last Edit: February 09, 2019, 12:32:50 AM by MS
 


Tags:
 


Install Updates Gimp Error - see Security & Bug Fixes Section Sticky