Notices


Reply
Thread Tools
dr_frost_dk's Avatar
Posts: 1,503 | Thanked: 2,688 times | Joined on Oct 2010 @ Denmark
#21
Originally Posted by JonWW View Post
Try a dbus-monitor command, it will save you battery as you will not be running a point less loop all the time doing something that hardly ever needs to be done.
Code:
#!/bin/sh

dbus-monitor --system type='signal',interface='com.nokia.mce.signal',member='display_status_ind' | while grep -q "display_status_ind"
do
  echo 160 >/sys/class/backlight/acx565akm/brightness
done
This code will only ever activate when the brightness changes (hopefully), I have not been playing around with /etc/mce/mce.ini so cannot say how well it will work for you.
Can you tell me how to make your nice script run on boot.
 
dr_frost_dk's Avatar
Posts: 1,503 | Thanked: 2,688 times | Joined on Oct 2010 @ Denmark
#22
as i said i'm not the most hardcore programmer, so if anybody can tell me how to get JonWW's script to start up on boot that would be nice.
 
dr_frost_dk's Avatar
Posts: 1,503 | Thanked: 2,688 times | Joined on Oct 2010 @ Denmark
#23
been trying various things....
still can't figure out how to make this run on startup.....
 
Posts: 284 | Thanked: 320 times | Joined on May 2010 @ Peterborough, UK
#24
You could try with fcron, but tread carefully:

http://wiki.maemo.org/Fcron#Configuration
 
JonWW's Avatar
Posts: 623 | Thanked: 289 times | Joined on Jan 2010 @ UK
#25
Look in
Code:
/etc/event.d
the start up scripts for many programs are in there, look at them and adapt one to suit your needs.
 
dr_frost_dk's Avatar
Posts: 1,503 | Thanked: 2,688 times | Joined on Oct 2010 @ Denmark
#26
allmost got it working now just need help with one last thing:
It now starts the scrips on boot (started hildon-desktop) but it does not keep running, and brightness is back to normal after keyock or "fadeout"

my /etc/event.d/frost_custom_settings
--------------------------------------------------
start on started hildon-desktop
stop on starting shutdown

script
echo 4 >/sys/class/i2c-adapter/i2c-2/2-0063/region
cat /home/user/bright_setting >/sys/class/backlight/acx565akm/brightness
dbus-monitor --system type='signal',interface='com.nokia.mce.signal',mem ber='display_status_in' | while grep -q "display_status_ind"
do
cat /home/user/bright_setting >/sys/class/backlight/acx565akm/brightness
done
end script
-----------------------------------------

what am i doing wrong???
 
JonWW's Avatar
Posts: 623 | Thanked: 289 times | Joined on Jan 2010 @ UK
#27
Run an boot setup should go here
/etc/event.d/frost_custom_settings:
Code:
start on started hildon-desktop
stop on starting shutdown
exec /etc/init.d/frost_custom_settings
Appartently scripts to then be run should go in /etc/init.d so
/etc/init.d/frost_custom_settings:
Code:
echo 4 >/sys/class/i2c-adapter/i2c-2/2-0063/region
cat /home/user/bright_setting >/sys/class/backlight/acx565akm/brightness
dbus-monitor --system type='signal',interface='com.nokia.mce.signal',member='display_status_in' | while grep -q "display_status_ind"
do
  cat /home/user/bright_setting >/sys/class/backlight/acx565akm/brightness
done
 

The Following User Says Thank You to JonWW For This Useful Post:
dr_frost_dk's Avatar
Posts: 1,503 | Thanked: 2,688 times | Joined on Oct 2010 @ Denmark
#28
still no cigar.....
it still only runs on startup, but doesn't keep going....


scratch that, there was a typo in the code in my script.....
member='display_status_in' should had been member='display_status_ind'

Last edited by dr_frost_dk; 2010-10-21 at 12:50.
 
dr_frost_dk's Avatar
Posts: 1,503 | Thanked: 2,688 times | Joined on Oct 2010 @ Denmark
#29
now i just have to make a widget or something that does

----------------
"get value" from widget (brightness)
echo (brightness) >/sys/class/backlight/acx565akm/brightness
write/echo (brightness) >/home/user/bright_setting

than it should change brightness and use the value from /home/user/bright_setting

the widget can be made with 2 - xx memory settings for the settings you like to use.

MANY thanks to JonWW for all the help in finally making this work.
No more stupid ALS and a custom brightness thats suits the user

I have made a complete guide to this at the first post now.

This so far only gives you 1 brightness setting but a homemade widget can be made to give you more settings.
This does not change the stock 5 settings, witch after the removal of ALS will be 5 very low steps.
If anybody finds out how to change the 5 stock steps to 5 custom steps please post it here or let me know .

Last edited by dr_frost_dk; 2010-10-21 at 13:16.
 
JonWW's Avatar
Posts: 623 | Thanked: 289 times | Joined on Jan 2010 @ UK
#30
Try experimenting with 'Simple Brightness Applet' in your do loop to see what value it set the screen brightness to, then if those value appear when you 'cat /sys/class/backlight/acx565akm/brightness' substitute you own values to suit you.

Run you script in XTerm to see whats going on first.

Keep us updated.
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:01.