WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: laptop-mode  (Read 5362 times)

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
laptop-mode
« on: April 09, 2009, 04:18:57 PM »
in rcS (tc-config from v1.2) would be nice to have:

Code: [Select]
if [ -n "$LAPTOP" ]; then                                                      
   modprobe ac && modprobe battery
{       
   modprobe yenta_socket || modprobe i82365       
   /sbin/udevtrigger
   /etc/init.d/laptop-mode start
} >/dev/null 2>&1 &                                 
   echo " ${GREEN}Laptop options enabled (AC,Battery, & PCMCIA).${NORMAL}"
fi

instead of

Code: [Select]
if [ -n "$LAPTOP" ]; then                                                                           
   modprobe ac && modprobe battery                         
   modprobe yenta_socket >/dev/null 2>&1 || modprobe i82365 >/dev/null 2>&1
   /sbin/udevtrigger 2>/dev/null >/dev/null &                                                     
   echo " ${GREEN}Laptop options enabled (AC,Battery, & PCMCIA).${NORMAL}"                       
fi 
« Last Edit: April 10, 2009, 05:31:10 AM by robang »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: laptop-mode
« Reply #1 on: April 09, 2009, 04:46:36 PM »
There's no such file as /etc/init.d/laptop-mode? Also, not all laptop users want it as a default..
The only barriers that can stop you are the ones you create yourself.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: laptop-mode
« Reply #2 on: April 09, 2009, 06:00:39 PM »
There's no such file as /etc/init.d/laptop-mode? Also, not all laptop users want it as a default..

That file belong to cpufreq.tce/tcz. Those user which put option "laptop" into boot loader probably want something happens. If they do not want cpufreq/laptop-mode they should not install the related tce/tcz. As you can see the errors are redirected to dev null in such a way installing cpufreq is not necessary.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: laptop-mode
« Reply #3 on: April 09, 2009, 06:18:11 PM »
I am seeing many of your mods to system files that depend on extensions.
Yet you do not include a warning or statement of such.
Without this anyone who tries your mods will not have a good experience.
10+ Years Contributing to Linux Open Source Projects.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: laptop-mode
« Reply #4 on: April 09, 2009, 06:27:10 PM »
I am seeing many of your mods to system files that depend on extensions.
Yet you do not include a warning or statement of such.
Without this anyone who tries your mods will not have a good experience.

I will keep in mind your suggestion but in this case who install this mod and do not install cpufreq has the same experience of others who do not have installed any mods!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: laptop-mode
« Reply #5 on: April 10, 2009, 02:25:13 AM »
The errors should be directed away only from laptop-mode; if ac, battery, pcmcia fails, a laptop owner will want to know.

There's also the issue that extensions are loaded after that point, meaning an user couldn't get it to work without remastering.
The only barriers that can stop you are the ones you create yourself.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: laptop-mode
« Reply #6 on: April 10, 2009, 05:33:03 AM »
The errors should be directed away only from laptop-mode; if ac, battery, pcmcia fails, a laptop owner will want to know.

Thanks for the suggestion I modified my original post.

There's also the issue that extensions are loaded after that point, meaning an user couldn't get it to work without remastering.

Infact the post was directed to developers in order to suggest them to adopt this mod directly into initrd image. Is there a better place to post this kind of suggestion?

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: laptop-mode
« Reply #7 on: April 10, 2009, 04:05:46 PM »
This would probably more suited for bootlocal.sh (or maybe an extension startup script)