Author Topic: LCD off  (Read 5328 times)

ValdikSS (OP)

  • *
  • Posts: 57
LCD off
« on: August 09, 2010, 09:08:06 pm »
Hello!
That's not a release, lol, that's just a script which powers off LCD and set cpu speed to 250mhz(is it safe to set 200mhz? My old pocket pc worked about a half a year at 100mhz where the default frequency is 201mhz and it begins to whistle)
I did it because I want to charge my dingoo from the PC and I don't want LCD to be powered on.

lcdoff.dge. Put it and the cpu executable(http://www.mediafire.com/?nnklm315y2y) to local/gmenu2x/scripts on your minisd.
Code: [Select]
#!/bin/sh
echo "0" > /proc/jz/lcd_backlight
/boot/local/gmenu2x/scripts/cpu 250
read -sn1
echo `cat gmenu2x.conf | grep backlight | cut -b 11-13` > /proc/jz/lcd_backlight
/boot/local/gmenu2x/scripts/cpu 336
To power on LCD again press any button on dingoo.

Skyline969

  • *
  • Posts: 279
Re: LCD off
« Reply #1 on: August 09, 2010, 09:44:28 pm »
Amazing! I've been looking for something like this for a long time. This should improve charging times by a landslide! +Karma to you!

EDIT: However, shouldn't it be a .sh file instead of .dge? Or does that matter? I could be wrong as I know next to nothing about Dingux yet.

EDIT(2): Okay, I have an issue with this. I run the script, but it instantly boots be back to GMenu2x. I read the output by repeatedly launching the script, and I got that it said something along the lines of
Code: [Select]
/bin/sh: /boot/local/gmenu2x/scripts/lcdoff.dge: not found
However, both lcdoff.dge and cpu are in /local/gmenu2x/scripts/. lcdoff.dge contains nothing but the code in the first post of this thread. What am I doing wrong?
« Last Edit: August 10, 2010, 12:01:21 am by Skyline969 »

ValdikSS (OP)

  • *
  • Posts: 57
Re: LCD off
« Reply #2 on: August 10, 2010, 03:20:21 am »
Hmm, that's strange. What I have in the /local/gmenu2x/sections/setting/lcdoff:
title=Lcdoff
icon=skin:icons/exit.png
exec=/boot/local/gmenu2x/scripts/lcdoff.dge
clock=336
gamma=100
backlight=100

I just inderstood that the script can consist only with read -sn1, because gmenu can set clock and backlight.

ValdikSS (OP)

  • *
  • Posts: 57
Re: LCD off
« Reply #3 on: August 10, 2010, 03:38:14 am »
You can make the script shorter:
Code: [Select]
#!/bin/sh
echo "0" > /proc/jz/lcd_backlight
read -sn1
echo `cat gmenu2x.conf | grep backlight | cut -b 11-13` > /proc/jz/lcd_backlight
and use gmenu's cpu scaling.

Skyline969

  • *
  • Posts: 279
Re: LCD off
« Reply #4 on: August 10, 2010, 06:10:16 am »
You can make the script shorter:
Code: [Select]
#!/bin/sh
echo "0" > /proc/jz/lcd_backlight
read -sn1
echo `cat gmenu2x.conf | grep backlight | cut -b 11-13` > /proc/jz/lcd_backlight
and use gmenu's cpu scaling.
I'm still getting
Code: [Select]
/bin/sh: /boot/local/gmenu2x/scripts/lcdoff.dge: not foundand I'm only using exactly what you have in that code snippet. Is it because it's saved as .dge? I tried as .sh but got the same results.

What the hell could be going on?
« Last Edit: August 10, 2010, 06:14:13 am by Skyline969 »

darfgarf

  • Guest
Re: LCD off
« Reply #5 on: August 10, 2010, 06:40:39 am »
Did you write the file in Windows, it won't like that because of the end of line chars

Skyline969

  • *
  • Posts: 279
Re: LCD off
« Reply #6 on: August 10, 2010, 06:56:42 am »
Did you write the file in Windows, it won't like that because of the end of line chars
I wrote it in Windows using Notepad++. Should I go into Ubuntu and use gedit to create it?

darfgarf

  • Guest
Re: LCD off
« Reply #7 on: August 10, 2010, 07:02:26 am »
Worth a shot, its why most people fail editing dingux configs and the like, though pad++ does let you select the right line endings...strange.

Skyline969

  • *
  • Posts: 279
Re: LCD off
« Reply #8 on: August 10, 2010, 07:04:57 am »
Worth a shot, its why most people fail editing dingux configs and the like, though pad++ does let you select the right line endings...strange.
I assume you're using Linux. Do you think you could make the script file for me? I'm only going to use this one:
Code: [Select]
#!/bin/sh
echo "0" > /proc/jz/lcd_backlight
read -sn1
echo `cat gmenu2x.conf | grep backlight | cut -b 11-13` > /proc/jz/lcd_backlight

If you could, I'd appreciate it. I'm kind of busy at the moment, and unable to switch to Ubuntu in my dual-boot.

EDIT: Aha, not necessary. In Notepad++ there was an option called Convert to UNIX Format. I did that, saved, and voila! It now works. A little tweaking with the launcher to underclock the CPU to 250 MHz and I'm all done. Thanks for the help.

For the record, you can grab the script here: http://www.mediafire.com/?4wqsga29ymq622b
« Last Edit: August 10, 2010, 07:11:54 am by Skyline969 »

ValdikSS (OP)

  • *
  • Posts: 57
Re: LCD off
« Reply #9 on: August 10, 2010, 07:51:23 am »
I'm on linux, but I wrote this script telnetted to dingoo with vi.

Skyline969

  • *
  • Posts: 279
Re: LCD off
« Reply #10 on: August 10, 2010, 08:07:13 am »
By the way, I helped get the word out for you. You made an awesome script, and I think a lot of people deserve to know about it.

Check it out.

darfgarf

  • Guest
Re: LCD off
« Reply #11 on: August 10, 2010, 08:46:05 am »
Skyline: I wouldve, but the nearest thing to my linux pc ive used in a while is my phone, and I really cant be asked to get nano working on it

Skyline969

  • *
  • Posts: 279
Re: LCD off
« Reply #12 on: August 10, 2010, 08:53:06 am »
No worries darfgarf, as I said in a previous post I got it in Windows by converting it to UNIX in Notepad++.

madhatter

  • Guest
Re: LCD off
« Reply #13 on: August 10, 2010, 07:18:18 pm »
this sounds great. when putting it into gmenu2x/scripts it that all there is to it? or is there editing that needs to be done in something or another?

rmkbow

  • *
  • Posts: 28
Re: LCD off
« Reply #14 on: August 11, 2010, 01:00:30 am »
this sounds great. when putting it into gmenu2x/scripts it that all there is to it? or is there editing that needs to be done in something or another?

I had to add it manually in gmenu2x (pressed select, then add)

This is great. It got rid of the annoying gmenu2x sound buzz while it is charging

LTStone

  • *
  • Posts: 96
Re: LCD off
« Reply #15 on: August 11, 2010, 04:36:53 am »
Hey darf, maybe you can add this lcd off to your pdf viewer :)

 

Post a new topic