The officially official Devuan Forum!

You are not logged in.

#1276 Re: Desktop and Multimedia » Beowulf is broken » 2021-04-20 22:12:36

Hello:

fsmithred wrote:

... hate using 'su -'. Most of the time when I become root, I'm already in the directory where I want to do stuff, and I want to stay there.
I don't want to change to /root.

Ahh ...
And I thought I was the only one.  8^D

I'm trying hard to get use to su - and how it works.
Sometimes I fear that not being where I want to be (and in /root instead) will make/allow me to do something stupid.

fsmithred wrote:

... there's a way to restore the old behavior.

ALWAYS_SET_PATH yes

in /etc/default/su

But you still have to use su -, you just don't get sent to /root.
Right?

Best,

A.

#1277 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-20 21:19:30

Hello:

Altoid wrote:

I have not yet heard from ethtool's maintainer with respect to that.

I got a reply from him this afternoon.

I had asked:

What does being able to disable the EEE TX LPI timer in my 2566DM-2 Gbe controller actually depend on?
Is it hardwired?
If so, could it be solved with a different firmware?

Here's a transcription of the relevant part of his reply:

In this case, ethtool is almost certainly only a messenger.
A request like this is passed to kernel and it's the NIC driver to either implement it or report that it is not supported.
And in your case it's querying the current setting that fails so it looks like either the device does not support getting and setting EEE parameters or the support in its driver (e1000e) is missing.

As clear as Perrier ...

So it's quite definitely the e1000e driver that is blocking access to both the status and configuration of the EEE settings in the 82566DM-2 GbE controller.
No doubt about that because I have been able to disable it completely via the igb.EEE=0 bit added to the kernel command line.

What is really irritating is that Intel Ethernet Products support insisted from the start that the only way to get it done was either through ethtool or modprobe, something which I repetedly reported as being non-working solutions:

This is the last I heard from them back in 01/2019:

Intel Ethernet Products wrote:

We typically turn off EEE using ethtool. Another method to do this is through modprobe as described in the readme for e1000e (https://downloadmirror.intel.com/15817/eng/readme.txt). It is not normal that EEE cannot be turned off with the previous methods, so it may be a change on the OEM end, and we are not aware of the modifications made by Sun. We strongly recommend to check with them on the root cause of your issue. Best regards ...

Draw your own conclusions.

Best,

A.

#1278 Re: Off-topic » ${THEY} continue crippling browsers... » 2021-04-20 16:39:13

Hello:

yeti wrote:

... upcoming deprecation of FTP in Firefox

Hmm ...
Many (many) years ago, I was a huge fan of FTP and used a very good FTP application under W95/98.
Like many other things from that age, I cannot remember the name but it was great and a free download for the likes of me.

Edit: it was WS_FTP LE 16-bit from ipswitch

It was back when there was a real/working FTP search engine permanently indexing the web (from Norway?), much better at finding files than any search site today.
I think it was bought out and shut down by Netscape. (')

I really would not going going back to using a separate FTP application, maybe one less thing for Google to spy into.

Just my $0.02

A.

#1279 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-20 11:42:53

geki wrote:

... above-mentioned link says something different AFAIUI.

I'll have another look.

Maybe I missed something.
Thanks for the heads up.

geki wrote:

... use the latest kernel with its newest e1000e driver ...

From what I have seen, the e1000e driver has always been very problematic, its link to the Intel ME and how it works probably having much to do with that being so.
ie: up to now, an Intel network controller has been essential for IME to work.

The fact that I cannot disable my GbE controller (WTF?) or access all of its settings in Linux via the tool used to that effect (ethtool) speaks volumes.
I have not yet heard from ethtool's maintainer with respect to that.

Problems with this driver are known to exist as far back as 2012 (!) and it seems that, almost 10 years later, things have not changed much.
From where I sit, I don't see any need for the EEE feature in a desktop, workstation or server.
To me it is just another layer of complication, so I want it turned off.

I posted the solution I found to the Intel e1000e support forum.
But haven't heard from them yet and it's quite possible I won't.

In my view, this EEE thing it is only useful (and only to a limited extent) in a portable, battery operated device or one in which the network component tends to run hot.
eg: some SoCs

And the same goes for any other energy saving features they come up with.

If disabling the controller's EEE does effectively do away with the bad shutdown problem I have, that will be it for the time being.
I'll upgrade my kernels conservatively, as I have always done.
Which is why I ultimately chose Debian as my distribution.
And when the developers/maintainers turned into DebHoles, moved to Devuan.

geki wrote:

... and hope for the best.

Hope is in very short supply in this day and age.
I'd rather use the little there is for other, more important things.  8^D!

Thanks a lot for you input, your post steered me in the right direction.

Best,

A.

#1280 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-19 22:50:50

Hello:

geki wrote:

... this kernel (early) log piped to serial line feature.
... works for shutdown, too?

I suppose it would.

But the last information you would get would be the tty1 output, up to where the screen reads reboot: Power down but doesn't power down and stays there.
Like you pointed out, waiting for a signal that it will never receive.

There's nothing more after that because at that stage, the OS is in a frozen and totally unresponsive state.
The only way out of that is a hard shutdown.

Thanks for your input.

Best,

A.

#1281 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-19 19:58:21

Hello:

geki wrote:

... see kernel log of the shutdown.
... needs to be configured to generate them.
... check /var/log/kern.log* ...

Yes, that would be /var/log/kern.log.

But at that stage, (preparing to enter S5), all system files are read only.
ie: all drives have been synced and stopped, the last one being the one with the /boot partition.

I have never found any useful data with respect to this bad shutdown problem in the log files.
It happens when no one is looking and save for the useless and volatile tty1 printout, leaves no trace behind. 8^7

According to /var/log/auth.log, I added the igb.EEE=0 instruction to the kernel command line @08:27.
I then shutdown and got another bad shutdown instance.

But the kernel line addition was not active yet, so that bad shutdown only means that everything done to that point had had no effect.
Nothing new ...

These are the kernel log entries from that time forward, the last one at shutdown and the first one at boot:

groucho@devuan:/var/log$ tail -6000 kern.log
--- snip ---
Apr 19 08:29:27 devuan kernel: [ 3556.858961] e1000e: eth0 NIC Link is Down                                           <--- | fix not active |
Apr 19 08:31:30 devuan kernel: [    0.000000] microcode: microcode updated early to revision 0xa0b, date = 2010-09-28 <--- | fix active |
--- snip ---
Apr 19 08:45:16 devuan kernel: [  858.318960] e1000e: eth0 NIC Link is Down
Apr 19 08:47:43 devuan kernel: [    0.000000] microcode: microcode updated early to revision 0xa0b, date = 2010-09-28
--- snip ---
Apr 19 08:48:06 devuan kernel: [   58.328174] e1000e: eth0 NIC Link is Down
Apr 19 08:50:08 devuan kernel: [    0.000000] microcode: microcode updated early to revision 0xa0b, date = 2010-09-28
--- snip ---
Apr 19 11:42:27 devuan kernel: [10373.487079] e1000e: eth0 NIC Link is Down
Apr 19 12:51:32 devuan kernel: [    0.000000] microcode: microcode updated early to revision 0xa0b, date = 2010-09-28
--- snip ---
Apr 19 16:08:27 devuan kernel: [ 2166.724262] e1000e: eth0 NIC Link is Down
Apr 19 16:10:32 devuan kernel: [    0.000000] microcode: microcode updated early to revision 0xa0b, date = 2010-09-28
--- snip ---
groucho@devuan:/var/log$

Nothing in the log after the NIC is down.
The fact that the tty1 print out has no entries indicating the status of the NIC link or EEE (always present before) would seem to imply that we may be on the right track.

Now I just have to wait 15 days and see if stanza added to the kernel command line actually fixed the problem.
A 'bad shutdown' quarantine if you'll willing to pardon the pun.

Thanks a lot for your input.

Best,

A.

#1282 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-19 12:34:07

Hello:

geki wrote:

Just the symptoms from the far.

I have found a way to disable this Energy-Efficient Ethernet thing in my Intel e1000e on-board controller.

Where the ethool utility has no access, the kernel does: adding igb.EEE=0 to the kernel cmdline disables EEE during boot.

https://www.toradex.com/community/quest … ernet.html

This EEE issue seems to be something that has been around for a long time:
https://thatbytes.co.uk/posts/fun-with- … ontroller/   <---  05/2012!

EDIT:
Doing all this again helped me remember that at one time (back in 2019) I tried solving this problem by adding the stanza e1000e.EEE=0 to the kernel command line.
It did not work: the e1000e: EEE TX LPI TIMER: 00000000 bit was also present in the tty1 output in case of a normal shutdown and the bad shutdowns kept happening.

See https://www.linuxquestions.org/question … ost5954899

Basically in order for EEE to kick in both devices need negotiate ...
... but the switch didn’t support this ...

Maybe my ISP provided cheapo router does not (most probably) support EEE.
But I was already having this problem when I was on a shared WiFi connection.

But not everything is good news.
After setting this parameter and rebooting to see the results, I got a bad shudown, albeit without the presence of the e1000e: EEE TX LPI TIMER: 00000000 bit:

Devuan GNU/Linux 3 devuan tty1
devuan login: [   864.785061] EXT4-fs (sda1): re-mounted. Opts: (null)
[   864.824466] kvm: exiting hardware virtualization
[   864.910856] sd 7:0:3:0: [sde] Syncronizing SCSI cache
[   864.911235] sd 7:0:2:0: [sdd] Syncronizing SCSI cache
[   864.911634] sd 5:0:0:0: [sda] Syncronizing SCSI cache
[   864.913092] sd 5:0:0:0: [sda] Stopping disk
[   865.013903] ACPI: Preparing to enter sleep state S5
[   865.014444] reboot: Power down

Note that there are no lines referring to the status of the NIC link or EEE:
ie:
e1000e: eth0 NIC Link is Down or e1000e: EEE TX LPI TIMER: 00000000.

Maybe (?) the bad shutdown was a consequence of having disabled EEE on the controller.
Won't know till at least 15 days go by without another bad shutdown.

Meanwhile, I'll enjoy my having found this tidbit of information.

[rant]
Information I asked for but the DHs at Intel e1000e support were unable to give me.
I'll assume that they did not know what I was talking about.
[/rant]

Best,

A.

#1283 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-18 23:11:23

Hello:

geki wrote:

That is the nature of "My 2 cents: Delayed work is quite dangerous indeed. "

Ahh ...
Now I (sort of) understand.

geki wrote:

They delay the work item of the watchdog timer ...
... device is unloaded.
... watchdog tries to process the work item and instead of crashing or invalidating, it hangs waiting for the device ...
... no longer there and therefore cannot answer, to answer.

I get where you are going.

But ...
Maybe I did not explain myself correctly.

Without any intervention on my behalf ie: explicitly unloading the module before shutdown (see script posted previously), when I get a bad shutdown instance, the output on the screen is the same.

ie:

Devuan GNU/Linux ascii devuan tty1
devuan login: [483.367459] EXT-fs (sdc1): re-mounted. Opts: (null)
[485.772216] e1000e: eth0 NIC Link is Down
[485.776885] kvm: exiting hardware virtualization
[485.777756] sd 9:0:3:0: [sdf] Synchronizing SCSI cache
[485.778154] sd 9:0:2:0: [sdf] Synchronizing SCSI cache
[485.781519] e1000e: EEE TX LPI TIMER: 00000000
[485.785219] ACPI: Preparing to enter sleep state S5
[485.868007] reboot: Power down    <---- screen freezes at this point

Now, if I understand what you are saying, then I was right from the very start when I went looking for how to disable the #$&@ timer.

When a bad shutdown comes along, the e1000e: EEE TX LPI TIMER: 00000000 bit shows up and the box freezes as previously described.
But when the shudown is normal, the e1000e: EEE TX LPI TIMER: 00000000 bit is also there but the box shuts down properly.

So ...
It is a question of timing, maybe a +/- 0.5s somewhere may be the 'trigger' for the bad shutdown which has proven impossible for me to replicate.
Absolutely unpredictable, I have had more than a fortnight of uneventful shutdowns and as many as three in just a couple of days.
Then, out of nowhere ...   8^7

geki wrote:

Just the symptoms from the far.

Thanks for the heads up.

geki wrote:

... this is what they reverted, not to push delayed work items but process directly or otherwise "simpler".

So it is a kernel problem?
Of course, Intel is doing nobody a favour by making it impossible to disable the EEE Timer.
That would be a very quick fix.

---

geki wrote:

... aided someone else with e1000e issues a decade ago ...
... actually worked then with the e1000e linux developer back then.
... developer of the e1000e actually did not own the hardware, IIRC.

Not too easy to test then ...
Maybe that's why the driver is such a POS?

geki wrote:

... best to avoid that chipset ...

Indeed ...

Unfortunately, it is what came onboard with the U24 which is, even by today's standards, a great piece of kit.
Keep in mind that it was brought  to market almost 15 years ago, in mid 2007.

It was a great buy for me, practically brand new.
And all my slots are filled, so I'll have to make do till this glitch finally gets fixed or I can do something kernel-wise.

Because I hope to be using this HW for a few years more, maybe with a faster SAS controller and SSDs.

Thanks a lot for you input.
Finally I have had some light shed on this rather annoying problem.

Best,

A.

#1284 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-18 22:50:12

Hello:

Please bear with me, I think our posts may have crossed.

geki wrote:

That c19 refers to patch from c11.

Yes.

I was making a note wrt the fact that ime and ime_me were being put into play, for whatever reason.
Like I said, Intel ME and the e1000e controller go hand in hand.
Nasty crap ...

geki wrote:

... important patch is referenced in c33 and c55, which went in upstream kernel 5.5.
... seems to undo a major regression wrt the watchog timer handling.

I see.

geki wrote:

... if you can, you should test kernel 5.5 or newer from beowulf-backports.

I'm usually weary of new kernels, have a tendency to screw up things which have been working perfectly well from a long time back.
I'd feel much more comfortable if there was a patch or a point release eg: Devuan Beowulf 3.2 or whatever.

geki wrote:

... you tested that kernel versions already...

No.
I have tried booting live distros using newer kernels to see what dmesg had to say as compared to what it says on Beowulf. 
But that's about it, no long term testing.

In my experience with this problem, I can go as much as 15/18 days without a bad shutdown and maybe as many as three in two days.
My average boot/shutdown cycle count is roughly 5 to 7 a day, ocassionally a couple more.

geki wrote:

See: https://pkginfo.devuan.org/cgi-bin/poli … mage-5.10*

example wrote:

linux-image-5.10.0-0.bpo.4-amd64 5.10.19-1~bpo10+1
http://deb.devuan.org/merged beowulf-backports/main amd64

Thanks for the info.
I'll check it out.

Best,

A.

#1285 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-18 17:59:50

Hello:

geki wrote:

... guess you know ...
... open linux kernel bug[0] for the e1000e watchdog timer.

No.

Had no idea but I am not at all surprised that the bug exists.
Nor am I surprised that it is unsolved almost two years later.

What I do know (own experience, web-wide rants) is that the e1000e, besides being is a real piece of work, is intrinsically linked* to the Intel Management Engine.

In my Ultra 24's BIOS, the GbE entry is greyed out, you cannot disable it.

ie: the box's owner, OS administrator cannot disable the on-board GbE controller or access the settings the entry presumably allows you to change.
I have not been able to find any instructions anywhere on how to do it. Owner's manual, Field manual, etc. have no mention of it.
WTF?

I run Beowulf which uses the 3.2.6-k version, the problems reported seem to be with the version with the upstream kernels.
And the shutdown problem I have is present from when I first installed Linux on this box, around late 2015.

Upgrading to the last BIOS available (1.56) did not solve the problem.

* : see this post from your link to the bug: https://bugzilla.kernel.org/show_bug.cgi?id=205047#c19

Vitaly Lifshits 2019-10-17 10:47:38 UTC

Please try:

1. rmmod mei && rmmod mei_me         <----------------------------- | x |
2. removing the if in the patch and moving the call e1000_phy_hw_reset(&adapter->hw) outside of the while loop:

if (!(pcim_state & E1000_STATUS_PCIM_STATE))
     e1000_phy_hw_reset(&adapter->hw);

Understand what I am referring to?

My installation has both modules (mei and mei_me) blacklisted in /etc/modprobe.d.
And yes, the problem I have was there before I blacklisted the modules.

geki wrote:

Did you test that Kernel already?

No, not planning to do it.

geki wrote:

... 4.19 still seems to need a reworked patch.

Lockdown has still some time to go, so I may look into trying the DKMS version of the driver.
But I've never done such a thing it and would have to study a bit to see how it is done.

But what really I want to do is to disable the EEE timer.
It was the first thing I thought of doing and have come back to it after trying all sorts of ACPI magic, kernel command entries and DSDT mods, to no avail.

Maybe the email I wrote to the e1000e driver ethtool utility maintainer will get me something.

I fail to understand why e1000e: EEE TX LPI TIMER: 00000000 is still there at shutdown if the module had been previously removed.

Thanks for your input.

Best,

A.

Edited: mail was actually sent to maintainer of ethtool utility - on if it is at all possible to disable EEE Timer / how to do it.
-

#1286 Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-18 13:40:38

Altoid
Replies: 22

Hello:

While (still) trying to track down the origin of the shutdown problem that occasionally affects my U24 box, I have come back to the matter of the infamous Intel e1000e GbE controller.

Randomly, on shutdown the rig will freeze with all fans going at full blast with this output on the TTY1 screen:

Devuan GNU/Linux ascii devuan tty1
devuan login: [483.367459] EXT-fs (sdc1): re-mounted. Opts: (null)
[485.772216] e1000e: eth0 NIC Link is Down
[485.776885] kvm: exiting hardware virtualization
[485.777756] sd 9:0:3:0: [sdf] Synchronizing SCSI cache
[485.778154] sd 9:0:2:0: [sdf] Synchronizing SCSI cache
[485.781519] e1000e: EEE TX LPI TIMER: 00000000
[485.785219] ACPI: Preparing to enter sleep state S5
[485.868007] reboot: Power down    <---- screen freezes at this point

From [485.868007] onwards, the only way out is a hard shutdown.

One idea I picked up during my searches on the web was to disable the EEE TX LPI timer.
Made sense, that was the last thing active, maybe it was not working properly.

But the onboard controller will have none of it:

[root@devuan ~]# ethtool --set-eee eth0 tx-lpi off
Cannot get EEE settings: Operation not supported
[root@devuan ~]# 

Nor would it inform me of the actual state of the timer:

[root@devuan]# ethtool --show-eee eth0
Cannot get EEE settings: Operation not supported
[root@devuan]# 

This is rather strange as the MSWindows driver allows me to change these parameters:

ie:
---
settings > control panel -> system -> hardware -> device manager -> network adapters
Intel PRO/1000 MT Desktop Adapter

Advanced -> Wait for Link=Off | Wake on Link Settings=Disabled | Wake on Settings=Disabled
Power Management -> Allow the computer to turn off this device to save power -> unchecked
---

These settings survive both the reboot of the VM and a reboot on the host.

The first question would be why this would be so.
Why can't ethtool do the same thing? (v.4.19)

Then I reasoned that the next best thing would be to unload the e1000e module before the shutdown command, so I put together a script which took the place of the absurd xfsm-shutdown-helper bundled along with Xfce:

#!/bin/sh
# shutdown system directly (no shutdownhelper) 
# disable onboard eth wol
# remove e1000e module

PATH=/sbin:/bin:/usr/sbin:/usr/bin:
# sync && sudo ethtool -s eth0 wol d && sudo shutdown -h now
sync && sudo rmmod -s -v e1000e && sudo shutdown -h now

Thinking that with the e1000e module removed, it would be the end of the EEE timer on shutdown, I made a video grab of the shutdown process.
But to my surprise, the damned thing was still there ie: the shutdown screen still included a line for the EEE timer.

Devuan GNU/Linux 3 devuan tty1
devuan login: [   286.719428] e1000e: eth0 NIC Link is Down
--- snip ---
[287.219230] e1000e: EEE TX LPI TIMER: 00000000              <-------------- | x |
[287.223022] ACPI: Preparing to enter sleep state S5
[287.223551] reboot: Power down

Now, if the module was unloaded, why is the EEE timer still around after the fact? 
I can confirm the module gets unloaded as the LAN link goes down down immediately, both with rmmod and with modprobe -r.

I once tried to get something useful from the Intel chaps, they really don't have the slightest clue.
ie: a waste of time

I wrote the maintainer of ethtool a couple of days ago but have not had a reply yet.

Any insight on this would be appreciated.

Thanks in advance,

Best,

A.

#1287 Re: Installation » [SOLVED] Help with script » 2021-04-14 19:25:36

Hello:

Head_on_a_Stick wrote:

... you must have missed them when you copied it.

Painted short, probably?
Have to be more careful.

Head_on_a_Stick wrote:

... script used bash but didn't contain anything that actually needed bash.

I see.

Head_on_a_Stick wrote:

... prefer /bin/sh over /bin/bash because it's faster, lighter and less buggy.
The Debian developers also prefer /bin/sh for the same reasons and went to quite some effort replacing all of the bash system scripts with /bin/sh versions.

Kudos to them.
Thanks for taking the time to explain.

Best,

A.

#1288 Re: Installation » [SOLVED] Help with script » 2021-04-14 18:47:08

Hello:

Head_on_a_Stick wrote:

Use https://www.shellcheck.net/ to test scripts.

Thanks for the heads up.
Will bookmark that one for the next time.

Being a script from github, I assumed an error of some sort at my end.
As it seemed harmess enough, I just copied it, made it executable and tried it.
Never thought it would have a problem.

Head_on_a_Stick wrote:

Better version:

#!/bin/sh
 
if [ $# -gt 1 ] || [ "$1" != enable ] && [ "$1" != disable ]; then
         echo "Usage: $0 <enable|disable>"
         exit 1
fi

if [ "$1" = enable ]; then
        TOGGLE=$(grep '\*disabled' /proc/acpi/wakeup | cut -d ' ' -f1)

else

        TOGGLE=$(grep '\*enabled' /proc/acpi/wakeup | cut -d ' ' -f1)

fi

for DEV in $TOGGLE ; do
        echo "$DEV" 
        echo "$DEV" > /proc/acpi/wakeup

done

Right.

Head_on_a_Stick wrote:

POSIX sh ftw!

Don't quite follow you, but I'll take your word for it.  8^)

Head_on_a_Stick wrote:

... simplified further if all you want to do is disable everything:

Yes, that would be much better.
These /proc/acpi/wakeup settings are from S4, which my box doesn't ever/won't ever go into.
And seeing how flaky ACPI tables can be, it's better to keep this disabled.

Head_on_a_Stick wrote:
#!/bin/sh

dev=$(awk '/*enabled/{print $1}' /proc/acpi/wakeup)

for i in $dev ; do
   echo "$i" > /proc/acpi/wakeup
done

Works a charm!  8^D

groucho@devuan:~$ sudo ./acpi_wakeups.sh
[sudo] password for groucho: 
groucho@devuan:~$ 
groucho@devuan:~$ cat /proc/acpi/wakeup
Device	S-state	  Status   Sysfs node
USB0	  S4	*disabled  pci:0000:00:1d.0
USB1	  S4	*disabled  pci:0000:00:1d.1
USB2	  S4	*disabled  pci:0000:00:1d.2
USB5	  S4	*disabled
EUSB	  S4	*disabled  pci:0000:00:1d.7
USB3	  S4	*disabled  pci:0000:00:1a.0
USB4	  S4	*disabled  pci:0000:00:1a.1
USB6	  S4	*disabled  pci:0000:00:1a.2
USBE	  S4	*disabled  pci:0000:00:1a.7
P0P1	  S4	*disabled  pci:0000:00:01.0
P0P2	  S4	*disabled  pci:0000:00:06.0
P0P3	  S4	*disabled  pci:0000:00:1c.0
BR11	  S4	*disabled
BR12	  S4	*disabled
BR13	  S4	*disabled
P0P4	  S4	*disabled  pci:0000:00:1c.4
BR15	  S4	*disabled
P0P5	  S4	*disabled  pci:0000:00:1e.0
GBE	  S4	*disabled  pci:0000:00:19.0
SLPB	  S4	*disabled
groucho@devuan:~$ 

Thank you very much for your input.

Best,

A.

#1289 Re: Installation » [SOLVED] Help with script » 2021-04-14 18:25:09

Hello:

chris2be8 wrote:

... use $(...) instead, it's easier to read if you don't get muddled about what sort of brackets to use.

I am not the author of the script.
Unfortunately, I don't have a clue as to how this all works.

Thanks for your input.

Best,

A.

#1290 Re: Installation » [SOLVED] Help with script » 2021-04-14 15:47:54

Hello:

dice wrote:

... need to be run as the root user?

Yes, of course.

groucho@devuan:~$ sudo ./acpi_wakeups.sh enable
./acpi_wakeups.sh: line 10: \*disabled: command not found
groucho@devuan:~$ 
groucho@devuan:~$ sudo ./acpi_wakeups.sh disable
./acpi_wakeups.sh: line 14: \*enabled: command not found
groucho@devuan:~$ 

Just in case ...

[root@devuan ~]# /home/groucho/acpi_wakeups.sh enable
/home/groucho/acpi_wakeups.sh: line 10: \*disabled: command not found
[root@devuan ~]# 
[root@devuan ~]# /home/groucho/acpi_wakeups.sh disable
/home/groucho/acpi_wakeups.sh: line 14: \*enabled: command not found
[root@devuan ~]# 

Thanks for your input.

Best,

A.

#1291 Installation » [SOLVED] Help with script » 2021-04-14 15:00:18

Altoid
Replies: 8

Hello:

My /proc/acpi/wakeup file reads thus:

groucho@devuan:/proc/acpi$ cat wakeup
Device	S-state	  Status   Sysfs node
USB0	  S4	*enabled   pci:0000:00:1d.0
USB1	  S4	*enabled   pci:0000:00:1d.1
USB2	  S4	*enabled   pci:0000:00:1d.2
USB5	  S4	*disabled
EUSB	  S4	*enabled   pci:0000:00:1d.7
USB3	  S4	*enabled   pci:0000:00:1a.0
USB4	  S4	*enabled   pci:0000:00:1a.1
USB6	  S4	*enabled   pci:0000:00:1a.2
USBE	  S4	*enabled   pci:0000:00:1a.7
P0P1	  S4	*disabled  pci:0000:00:01.0
P0P2	  S4	*disabled  pci:0000:00:06.0
P0P3	  S4	*disabled  pci:0000:00:1c.0
BR11	  S4	*disabled
BR12	  S4	*disabled
BR13	  S4	*disabled
P0P4	  S4	*disabled  pci:0000:00:1c.4
BR15	  S4	*disabled
P0P5	  S4	*disabled  pci:0000:00:1e.0
GBE	  S4	*enabled   pci:0000:00:19.0
SLPB	  S4	*disabled
groucho@devuan:/proc/acpi$ 

I have no use for anything being enabled there and found a script to set everything to 'disabled':

See: https://gist.github.com/npcardoso/47d8f … wakeups-sh

#!/bin/bash
 
if [[ $# > 1 || ($1 != "enable" && $1 != "disable") ]]; then
         echo "Usage: $0 <enable|disable>"
         exit 1
fi

if [[ $1 == "enable" ]]; then
        TOGGLE=grep '\*disabled' /proc/acpi/wakeup | cut -d ' ' -f1

else

        TOGGLE=grep '\*enabled' /proc/acpi/wakeup | cut -d ' ' -f1

fi

for DEV in $TOGGLE; do
        echo $DEV 
        echo $DEV > /proc/acpi/wakeup

done

For some reason it is not running properly.

groucho@devuan:~$ ./acpi_wakeups.sh disable
./acpi_wakeups.sh: line 14: \*enabled: command not found
groucho@devuan:~$ 
groucho@devuan:~$ ./acpi_wakeups.sh enable
./acpi_wakeups.sh: line 10: \*disabled: command not found
groucho@devuan:~$ 

Any help would be appreciated.

Thanks in advance,

A.

#1292 Re: Desktop and Multimedia » [SOLVED] Cursor oddity under backported kernel » 2021-04-11 13:13:28

Head_on_a_Stick wrote:

... off-topic for this thread ...

Quite so.
Thanks for pointing it out. 8^)

Best,

A.

#1293 Re: Desktop and Multimedia » [SOLVED] Cursor oddity under backported kernel » 2021-04-11 12:41:05

Hello:

Head_on_a_Stick wrote:

... but X is now abandonware ...

Hmm ...
Maybe it's too soon to sign the certificate?
There's still much to be said.

Many years ago (unfortunately much later than I should have) one day I realised that I could always solve any apparent confusion or contradiction by stepping back and having a close look at what was going on with the purpose of getting a grasp of who was where and why.

While the why part of the exercise many times remained (as it usually does) unknown, the who and where have always proved to be quite revealing.
The end result being that whatever confusion or contradiction I may have had cleared up very quickly.

To wit:
I realised I was definitely a Democrat by the age of 13 not because of my reading of the opinion pieces of the two newspapers I delivered every afternoon but by listening to what Mr. Davis, my next door neighbour and certified dyed in the wool Republican had to say about things in general.
I'll always be grateful to the old chap for that.

With respect to the matter of X, if Red Hat, IBM et al are attempting to sink it, don't count me in.
I have faith in the resilience of the Linux ecosystem albeit not in its constituents.

Just my 0.02.

A.

#1294 Re: Installation » [SOLVED] Heads up: haveged denied starting by apparmor in Beowulf » 2021-04-10 21:04:04

Hello:

dice wrote:

uninstalling apparmor ...

Indeed.
Got rid of it.
Saw no use for it and people who know more than i do about all this have uninstalled it.

https://dev1galaxy.org/viewtopic.php?pid=28640#p28640

And that was the end of it.

Cheers,

A.

#1295 Re: Installation » [SOLVED] crontab permission problem » 2021-04-10 11:16:48

Hello:

Head_on_a_Stick wrote:

Yes ...

Right.
Further thinking about it, I see it makes sense.

Head_on_a_Stick wrote:

But I would just use the size option described in logrotate(8) to control how big the files get before being rotated.

I recall (?) thinking about that but did not see the need for the rotated files.
I'll look into that, thanks for the heads up.

Head_on_a_Stick wrote:

... would delete ~/.xsession-errors at the start of every X session ...
... doesn't seem much point keeping error logs from old sessions.

Yes, I have seen that done.
And taking into account how unintelligible they are ...

But I have found that they have been a sort of reference for comparison purposes between boots.
Not that I actually solved anything.  8^7

Thanks a lot for your input.

Best,

A.

#1296 Re: Installation » [SOLVED] crontab permission problem » 2021-04-10 10:39:41

Hello:

Head_on_a_Stick wrote:

... indicate that root can read or write to the files but members of the adm group can only read them.

I see.
Crontab runs as the user that added the scripts so my only options are:

1. to put the lines needing root credentials in /etc/cron.d.
2. add them to via sudo crontab-e to root's crontab.

Is this so?

Thanks in advance,

A.

#1297 Installation » [SOLVED] crontab permission problem » 2021-04-09 21:48:13

Altoid
Replies: 4

Hello:

Now that my cron issues were taken care of, I now see the errors that crop up when it actually runs as intended.  8^7

My crontab has these three entries with the purpose of keeping log files to a manageable size till the time they get rotated:

# 1. For /home/groucho/.xsession-errors
# ---
0 */23 * * *  [ $(du -k .xsession-errors | awk '{ print $1 }') -gt 5000 ] && tail -200 /home/$(whoami)/.xsession-errors > /home/$(whoami$
# ---
#
# 2. For /var/log/boot (bootlogd)
# ---
0 */23 * * *  [ $(du -k /var/log/boot | awk '{ print $1 }') -gt 5000 ] && tail -200 /var/log/boot > /var/log/boot
# ---

# 3. For /var/log/cron.log
# ---
0 */23 * * *  [ $(du -k /var/log/cron.log | awk '{ print $1 }') -gt 5000 ] && tail -200 /var/log/cron.log > /var/log/cron.log
# ---

The first one has no issues, it is for the prolific .xsession-errors living at /home.

But the other two need admin rights:

groucho@devuan:~$ tail -200 /var/log/boot > /var/log/boot
bash: /var/log/boot: Permission denied
groucho@devuan:~$ 
groucho@devuan:~$ tail -200 /var/log/cron.log > /var/log/cron.log
bash: /var/log/cron.log: Permission denied
groucho@devuan:~$ 

My user belongs to a miriad of groups:

groucho@devuan:~$ groups
groucho adm lp mail dialout fax cdrom floppy tape sudo audio dip www-data backup video plugdev staff users crontab netdev lpadmin scanner saned fuse powerdev debian-exim
groucho@devuan:~$ 

As you can see, adm is one of them.
But doesn't adm have rights over /var/log/boot and /var/log/cron.log?

groucho@devuan:~$ 
groucho@devuan:~$ ls -l /var/log | grep adm |grep boot
-rw-r----- 1 root        adm    6639408 Apr  9 17:20 boot
groucho@devuan:~$ 
groucho@devuan:~$ 
groucho@devuan:~$ ls -l /var/log | grep adm |grep cron.log
-rw-r----- 1 root        adm     105594 Apr  9 18:35 cron.log
-rw-r----- 1 root        adm   14428210 Apr  4 06:50 cron.log.1
groucho@devuan:~$ 

What am I missing?

Thanks in advance,

A.

#1298 Re: Installation » [SOLVED] Updatedb and locate in non-system drives » 2021-04-08 10:58:05

Hello:

Head_on_a_Stick wrote:

... does that help?

Indeed ...
I think I had seen that thread (?) but somehow did not register this post:  https://unix.stackexchange.com/users/11318/daisy:

daisy wrote:

The config file is here: /etc/updatedb.conf, so if you didn't add anything, just mount your HDD, and do updatedb, then you would be able to search for files on external HDD partitions.

Maybe because it only had seven five while first three answers had seven? 8^7

The thing is that there it was and at some time (cannot recall having done it) I had edited /etc/updatedb.conf.
I now know because I commented it: # removed /media 20191224, a very useful thing to do.

Must have done it to keep updatedb from indexing pluggable USBs, not realising that I was keeping out my file storage.
Once again, thanks for your input.

Best,

A.

#1299 Re: Installation » [SOLVED] Updatedb and locate in non-system drives » 2021-04-07 16:26:32

Hello:

Head_on_a_Stick wrote:

... use mlocate instead, it's better.
... plocate from beowulf-backports, which is better and faster.
... brings up https://unix.stackexchange.com/question … ternal-hdd
... does that help?

Yes, I'll have a look at the alternatives to *locate + the link and see what I can get.
Thanks a lot for your input.  8^)

Best,

A.

#1300 Re: Installation » [SOLVED] Updatedb and locate in non-system drives » 2021-04-07 00:20:38

Hello:

GlennW wrote:

... use it everywhere.
Especially /home/glenn/local/... 7 partitions in there

Yes.
I do too.
But ...

Altoid wrote:

Is there a way to be able to use this tool in other drives?

ie: main drive is /dev/sda but I want to use it on /dev/sde1 which is another disk drive.

Thanks for your input.

Cheers,

A.

Board footer

Forum Software