[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: unexpected script output



I have seen various wifi drivers not be happy across a
suspend/hibernate resume.  I have needed to unload them on the way
down and reload them on the way up.  Or unload and reload them after
the resume.

Generally speaking, my computer have some troubles to automatically change used networks, so I often use the couple ifup/ifdown. Except that I must be root to do that, it does not hurt me, so I did not investigate further. I just always have terminals on a workspace or another... On my computers, they replace both menu and file explorer. Well, sometimes, I'm using dmenu, but I think I'll search an alternative for it, it lacks auto-completion for arguments, unlike bash :)

Hardware/kernel/driver things are still mysterious for me.
I also have some troubles because of mechanical/electrical problems
inside of my computer, which also makes safer for my data to
shutdown.

Have you tried suspend to ram?  I pretty much only ever suspend to
ram.  Because my Thinkpad will stay suspended to ram for about seven
days without charging and I never leave it unused for that long. So I
never use hibernate to disk these days.
My hardware is in a very poor state, an example being the HD connection unstable after moves. Power on, at least, will just avoid booting "hey, there's no HD there!" and so, just power off, hitting a known of me side of the computer and power on makes it working anew. I can look into it, but, well, time needed :D I think pm-hibernate would be fine too... but suspend is quite risky for datas: it happens that I just close the screen, move from train to home, reopen it, try to summon some software, and "... not found". Ok, just reboot, I know that know :)

All this discussion makes me thinking about another feature I like, which is to start the computer (for my desktop one) at a time in day. It's nice to wake-up to have mpd starting automatically with the computer... For hibernation, it is obviously possible, since the computer is really shut down, but for suspends?

The other thing is that I have a fully encrypted disk. [...] That is much longer.
I guess so.
I've no real use for encrypted datas on my computer, there are no very important datas, so security is quite low. Simply some source codes, which are available on a web repo of mine in LGPL... stole it if you want :D Also some free musics, downloaded and backed up... no photo, no love letters (in fact, no mails at all) or such kind of personal data.

I do usually run X11 with either fvwm or awesome for my window
manager.  But that is as far as it goes.)

Of course, as I do not use TTY very often too... well, it happens, when I simply need to read a single file or two, and X11 is quite slow to start (Near 7s at startup. Hopefully wayland will change that...). But usually, I login in the TTY1 which starts X11+i3 at login. I guess you know the trick. The problem with my "harder" is that there is only poweron/poweroff button on 1015 pem. That computer is really minimalistic... And I like that, because thanks to that, I've no need to move my hands (except for few F7/8 keys and touchpad, but I rarely use them).

I would need to dig to see what is actually doing it but I did not
install any daemon in particular (I am running tpb think pad buttons)
...
I do have acpid installed and it is probably involved.  I
don't consider that too heavy of a daemon process.

I was referring to installing dbus, policykit, and alike.
Of course, I have dbus installed, because gstreamer0.10-plugins-"good" (needed by opera) depends on it, but I mostly see it as a parasite. I just need to take some time to make uzbl as usable as opera in my systems, and I'll probably remove opera, and so, the last thing using dbus in the process.

acpid is installed too here, but I *think* it is useful, so I have nothing against it's presence. I've nothing against useful stuff, but my requirements to say something is useful are not simply that another tool depends on it. This criteria is one of them which make me say: that tool is not good, it does things I did not asked him to do, where other softwares of my system already do them.

But you could always write a shell script to trigger sleep by echo'ing
into /proc/acpi/sleep and then wiring it to whatever you wished.
I do not know that trick... sounds interesting!
But I have no "sleep" file in /proc/acpi? And, of course, can not create one, since /proc is not a real file system, AFAIK...

Suggestion: Add yourself to the sudo group and then simply use 'sudo
whatever' to sleep. For sleeping I would add the NOPASSWD to sudo for
that command.  It is your machine in your physical possession.
Did not thought about the sudo... I guess I could do that, and with an alias that would be fine. Of course, I still do not really understand the "root access needed on your physical computer" but using light workarounds is ok for me... for now. I know, maybe I'm excessive on my research for the lighter system possible... but having a minimal system have more than one interests:
_ better use of resources
_ more important, easier to configure
_ often, configuration happens through text files, and text files can be versionned. Versionning allows to send only the part you need to another computer.

Those are the reasons why I am trying to have the lightest system possible. To tinker, and for light systems.

I just hit the sleep button
...
There is also a hibernate to disk button
I do not have them on my netbook :)

I suggest trying acpid and seeing what it gives you without
customization.  You might be pleasantly surprised.  Works for me
without doing any customization.
I'm not. I'm already using it and it does not solve all my problems. Also, I've always dirty stuff coming on my TTYs. Not very important since I rarely use them, but annoying anyway, because sometimes I uses them. And I do not think that spawning stupid messages ("acpid: client ... had disconnected" is an example, and happens each time I move from X11 to TTYs...) is really useful for anyone. This is why learning how acpi works is in my (full) todolist. I would have a second life to do everything I would on my computer :D

It is about 30 seconds for me on an Atom machine like your Eee Pc Atom.
I've just made a try to measures (I found that: http://www.chronometre-en-ligne.com/ well, it's in french, but there is not so many words... but still human error) and I've got 29.368 to reach the login, and 39.391 to reach fully loaded X11 environment, considering I've validated the kernel selection on default choice, write my login and the password (but this one is not secure, only one char... I would like to completely remove it, but ssh sounds to need one...)
I'm not really jealous about your performances, you see :)

But, well, I've 20.312 with hibernation and 04.495 with suspend... I must admit that it's faster :)
BIOS is taking something like 10s on that netbook.

I don't think it would be easier for me.  Press TAB at the grub boot
screen and then edit
And what about writing a script automatically started at startup, which will select the runlevel you want if you hit the key in time, or loads a default one?
And as you said (later in the mail): sudo telinit X ;)

the much more complex grub2 config.
That's why I do not use grub any longer. Lilo is so simple, that adding entries can be made by a newbie in less than 5 minutes. In my opinion, most computers have only one OS, which changes very rarely. Then there is the kernel updates problems, which is usually perfectly managed by the OS itself. And for computers with many OSes, people probably rarely add or remove one. Fun is also to notice that now, multi-OS are often virtual OSes. So, I can really not see the point to have a very hard to configure boot loader, so I just eradicate grub from my computers.

It's "automated stuff" makes me laugh, too, since I've tried to use 2 linux distros on same computer with it: never find how to distinguish them correctly. Well, did not investigate for a really long time, but I think next time I'll do it, lilo will not be hard.

My current lilo.conf, without comments:
==========
lba32
boot = /dev/disk/by-id/ata-ST3250318AS_9VY73TNB
map = /boot/map
install = menu
menu-scheme = Wb:Yr:Wb:Wb
prompt
timeout = 100
vga = normal
image = /boot/vmlinuz-3.2.0-4-amd64
	label = "Linux"
root = "UUID="my-unreadable-uuid, by luck there is a comment to say me which partition it is!"
	read-only
	initrd = /boot/initrd.img-3.2.0-4-amd64
==========
adding an image sounds straightforward and does not inspire fear in my heart, unlike grub.

Well, of course, you can not edit stuff at boot time... but you does not have to protect it with passwords to forbid root access without password, too, and that feature is not really used on a daily basis. And it's worth for people using hibernation like you ;)

But it doesn't hurt to let it run

Of course. But ssh, which was an example, then vsftpd, then alsa (sometimes I want calm), then a webserver, then... ends-up by taking more than one second. Sometimes, there are also games which starts servers at boot-time (!). I will not security as an excuse for me, because my password is very lightweight and I do not use encryption, but the more things you have running, the more risks you have to have problems, so, for normal users, enabling ssh daemon only when needed is not stupid.

Before moving from gcc to clang, I was also thinking: "I plan to boost my computer to 2Gb for compilation, but while it's not done, I take care to my memory as best as I can...". Not needed longer, since compilation is slightly lighter and faster since my move.

At work and in train, I do not need the wifi,

Do you have a hardware switch? I simply switch it off to save battery
power of having the radio off.
Yes, I have, and of course I use it. But I've in mind (might be entirely stupidly wrong and/or negligible) that the less networks interface on you are, the less stuff is loaded. Of course, I know that most people are happy with everything enabled every-time. But any way, even when configuring networks in my /etc/network/interfaces as auto, I've noticed that softwares are not always able to find which one is really on, so, every-time I do not use the wifi, I prefer to use ifdown, and same for eth0. I think I have introduced some problem here or there, but for now, I do not have enough linux understanding to fix it.

I personally would prefer the scripted approach with suspend-to-ram over the runlevel
approach.
This is an idea too. So I wonder if someone still have uses for runlevels? Is there is a real difference between runlevels and scripts?

It has always been easier to
develop on a more strict system and then port to the more slack one
than the other way around.
Agree.

I hope you read it in the spirit it is intended and enjoy it too.

Of course, and thanks for returns, it is always interesting to have measured facts instead of simple rumors or theoretical data. So, it sounds bash and dash are as fast... Maybe the difference is only important for embedded systems, since there are 850K of difference in binaries. And as debian wants to be universal... idk.


Reply to: