You are not logged in.
Hello:
It seems that there's a bug (race condiiton) in the kernel's CPUFreq code, only discovered from 4.20 due to some changes in the kernel.
I understand it is still an issue in the 5.0 kernel. (read it somewhere but now I just cannot find the link ...)
See:
https://bugzilla.kernel.org/show_bug.cgi?id=199349#c4
I happen to have a shutdown hang issue with my rig and was wondering if the fact that I have cpufrequtils installed makes things worse.
It is set at 'performance' with no min o max settings so that it does not kick in (I guess it does not).
But the issue is still there. =-/
Would uninstalling cpufrequtils and using linux-cpupower instead for setting performance help in any way?
Is all this (cpufreq and linux-cpupower) in any way related to cpuidle and how it works?
groucho@devuan:~$ sudo dmesg | grep -i cpuidle
[ 0.172005] cpuidle: using governor ladder
[ 0.188005] cpuidle: using governor menu
groucho@devuan:~$
Thanks in advance.
A.
Hello:
... lost our understanding of April fools jokes?
No ...
Providing April's Fool pranks are something you are sufficiently acquainted with to understand what they are about.
If not, just like you (apparently sufficiently acquainted), people who are not (a great many others) will also be fooled.
And therefore rightly alarmed.
Enough to send an Admin a mail, like I did.
... think it was pretty funny - gopher!
I would ask you to consider that sufficiently acquainted actually entails knowing where necessary limits lay.
ie: what can be considered an April's Fool joke and what ends up being a stupid prank reflecting in the worse possible manner on its author.
Becasue with respect to humour, a basic sense of oportunity, grasp of context and timing are what make the difference between being funny or an utter dick-head.
I certainly did not find it funny and am really very dissapointed to have seen this happen here.
Of course, YMMV.
A.
Hello:
... if I can bash out a modification.
It would seem that acpitool is just an application that writes to /proc/acpi/wakeup, just like you would do by using echo.
Found a helping hand at Stack Overflow and put this script to execute at boot (in rc.local)
#!/bin/sh
# set /proc/acpi/wakeup to disabled with acpitool
PATH=/sbin:/bin:/usr/sbin:/usr/bin:
for i in $(seq 1 9)
do
/usr/bin/acpitool -W $i
done
groucho@devuan:~$
This is the result, sleep to all input devices seen by acpitool set to disabled:
$ acpitool -w
Device S-state Status Sysfs node
---------------------------------------
1. USB0 S4 *disabled pci:0000:00:1d.0
2. USB1 S4 *disabled pci:0000:00:1d.1
3. USB2 S4 *disabled pci:0000:00:1d.2
4. USB5 S4 *disabled
5. EUSB S4 *disabled pci:0000:00:1d.7
6. USB3 S4 *disabled pci:0000:00:1a.0
7. USB4 S4 *disabled pci:0000:00:1a.1
8. USB6 S4 *disabled pci:0000:00:1a.2
9. USBE S4 *disabled pci:0000:00:1a.7
10. P0P1 S4 *disabled pci:0000:00:01.0
11. P0P2 S4 *disabled pci:0000:00:06.0
12. P0P3 S4 *disabled pci:0000:00:1c.0
13. BR11 S4 *disabled
14. BR12 S4 *disabled
15. BR13 S4 *disabled
16. P0P4 S4 *disabled pci:0000:00:1c.4
17. BR15 S4 *disabled
18. P0P5 S4 *disabled pci:0000:00:1e.0
19. GBE S4 *disabled pci:0000:00:19.0
20. SLPB S4 *disabled
$
Cheers,
A.
Hello:
Rather than use acpitool ...
Indeed ...
That's the first option I came across when I started with this but I was at odds with the posted script because (as I understand it) it activates when the machine is going into suspend, which my machine will not do as I have turned off all PM options.
It's a Sun Ultra 24 with a buggy BIOS (last version available) and ACPI issues so as part of the intended fix, I have deactivated all PM features.
When I found sysctl (which does not work with /proc/sys) and then acpitool, I went with the latter as it did work and seemed rather more straightforward, albeit with my very clumsy script.
I'll look into the posted script again and see if I can bash out a modification. (pun intended). =-)
Thanks a lot for your input.
Cheers,
A.
Hello:
I could be wrong here but ...
There's a post here https://unix.stackexchange.com/question … 417_417965 that may indicate that you are right ...
/proc/acpi/wakeup is not a child of /proc/sys, sysctl doesn't work here.
... but it's over my pay grade, no idea how that works. =-/
... script is the "correct" solution.
Yes, the script is a solution and the one I'm using works but it's awfull.
If I cannot find a way for the command acpitool -W to address multiple entries in /proc/acpi/wakeup at once, I need a more complex script ie: with a minimum of elegance to do it with.
Any idea where I can get a sample script to modify from?
Thanks in advance.
A.
Hello:
In an effort to weed out an acpi problem, I need to set all the /proc/acpi/wakeup variables to disabled.
Like this:
groucho@devuan:~$ acpitool -w
Device S-state Status Sysfs node
---------------------------------------
1. USB0 S4 *disabled pci:0000:00:1d.0
2. USB1 S4 *disabled pci:0000:00:1d.1
3. USB2 S4 *disabled pci:0000:00:1d.2
4. USB5 S4 *disabled
5. EUSB S4 *disabled pci:0000:00:1d.7
6. USB3 S4 *disabled pci:0000:00:1a.0
7. USB4 S4 *disabled pci:0000:00:1a.1
8. USB6 S4 *disabled pci:0000:00:1a.2
9. USBE S4 *disabled pci:0000:00:1a.7
10. P0P1 S4 *disabled pci:0000:00:01.0
11. P0P2 S4 *disabled pci:0000:00:06.0
12. P0P3 S4 *disabled pci:0000:00:1c.0
13. BR11 S4 *disabled
14. BR12 S4 *disabled
15. BR13 S4 *disabled
16. P0P4 S4 *disabled pci:0000:00:1c.4
17. BR15 S4 *disabled
18. P0P5 S4 *disabled pci:0000:00:1e.0
19. GBE S4 *disabled pci:0000:00:19.0
20. SLPB S4 *disabled
groucho@devuan:~$
As doing it via terminal lasts only till the next reboot, for the time being I'm doing it with a script in /etc/rc.local:
usr/bin/acpitool -W 1 && usr/bin/acpitool -W 2 && usr/bin/acpitool -W 3 && usr/bin/acpitool -W 5 && usr/bin/acpitool -W 6 &&
usr/bin/acpitool -W 7 && usr/bin/acpitool -W 8 && usr/bin/acpitool -W 9
Now this is really not an elegant way to do this (running the same instruction eight times with a different variable each time!) something which is clearly reflected as the output rolls off the screen although for some reason it is not getting logged anywhere.
The man file does not indicate how to set multiple devices at once.
I understand there's also the proper way to do this: with a *.conf file in the /etc/sysctl.d directory.
groucho@devuan:~$ cat /etc/sysctl.d/README.sysctl
Kernel system variables configuration files
Files found under the /etc/sysctl.d directory that end with .conf are parsed within sysctl(8) at boot time. If you want to set kernel variables you can either edit /etc/sysctl.conf or make a new file.
The filename isn't important, but don't make it a package name as it may clash with something the package builder needs later. It must end with .conf though.
My personal preference would be for local system settings to go into /etc/sysctl.d/local.conf but as long as you follow the rules for the names of the file, anything will work. See sysctl.conf(8) man page for details of the format.
groucho@devuan:~$
I cannot figure out the syntax and cannot find any examples on line.
Anyone know how to do this?
Thanks in advance.
A.
Edit 01/04/19
Dir name correction
Hello:
Thank you for your link ...
You're welcome.
... free software needs more humanpower.
One would tend to, at first sight, agree.
But I have come to think that, to quote George and Ira Gershwin in Porgy and Bess, "It ain't necessarily so."
I have the notion that what is needed is something else and manpower may not be the problem.
A bit OT, but just a few lines:
It seems that it's not possible (and probably won't ever be) to harness the creative work of the countless thousands of programmers, developers and contributors dedicated to this fantastic project started by Linus Torvalds in a way that that they just work together and come up with just 'one' 100% functional and scalable 'distro' instead of generating gadzillionz different flavours, forks of whatever is available out there.
One of the (few) negatives of open source and free licensing is that forking projects just for the sake of having their own project - "look Ma! I rolled my own distro!!!!" - has almost become the norm.
It is highly counter-productive and there is no logical reason for it.
I'll write the required Thunar feature myself.
If you do, I'll gradly do the testing.
Cheers,
A.
Hello:
... seems to me similar to the embedded terminal I use in Dolphin.
I think it has exactly the same functionality but it is directly built into Dolphin.
Very useful.
... we could write this feature in the "wish list" of Thunar.
Ahhh ...
Yes, we could.
But don't hold your breath, it would probably go nowhere, fast.
https://bugzilla.xfce.org/show_bug.cgi?id=11319
Only "open terminal here" is supported. There are other, more complicated file managers that provide what you want, but thunar does not.
It reads sort of like take it or leave it to me.
Cheers,
A.
Muito obrigado.
Mas eu já tenho tudo isso (custom actions) habilitado em Thunar.
O que o plug-in do nautilus-terminal faz no Nautilus aparentemente não é possível fazer em Thunar.
Thank you.
But I already have all that (custom actions) enabled in Thunar.
What the nautilus-terminal does in Nautilus apparently in not possible in Thunar.
AQ.
Hello:
One of the things (the only one, actually) that I miss from my days with Ubuntu is the drop down terminal you could have in Nautilus.
It's the Xfce drop down teminal (which is just like Tilda and others) but with the distinct advantage of being embedded into Nautilus' tabs/windows, following the navigation.
Much better than the open terminal here or open root terminal here custom actions.
Synaptic in ASCII has a long list of nautilus packages but nautilus-terminal is not one of them.
Any one know if there's something like this for Thunar?
Cheers,
A.
Hello:
... thinking that apparmor is stopping it ...
AppArmor is disabled in ASCII.
groucho@devuan:~$ sudo dmesg | grep -i apparmor
[ 0.010652] AppArmor: AppArmor disabled by boot time parameter
groucho@devuan:~$
I do not have a boot time parameter disabling apparmor (ie: not my doing), so it is probably disabled at a lower level in ASCII and it's not even in the repository.
I'm guessing that there may have been good motive for all that.
When I tried my hand at the newer post-ASCII kernel, AppArmor was installed along with it.
The newer kernel ended up complicating things in my rig so I gave up.
But on uninstalling it, AppArmor was left behind and on reboot threw a few errors in the logs.
AppArmor is a service and as such you could disable it to see what happens with haveged and eventually remove it if it gives you too much trouble.
On the other hand, I guess AppArmor could be configured not to mess with haveged.
I for one am rather weary of AppArmor (or SELinux for that matter) and it's eventual usefulness in a single user installation, where you make every possible effort to run a tight ship. I see it as being more an administrator's tool in a multi-user environment but then, what do I know?
I may well be mistaken and prove to be a god-send instead of a headache.
Cheers,
A.
Hello:
I'm running an up to date Devuan ASCII 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1.
After much searching, it would seem getting my Sun Microsystems Type 7 keyboard working properly requires an update to the keyboard-configuration package v1.164.
In saying this, I'm assuming (perhaps incorrectly) that the keyboard-configuration package (handling the system wide keyboard preferences) works with or is directly linked to whatever files xkeyboard-config has.
The latest available version of xkeyboard-config is v2.24 (10/2018) but it is not a package.
See: xkeyboard-config should be updated to 2.24.
This latest version includes the following patches and configuration files:
https://github.com/oracle/solaris-userl … 2b8882a06d
https://github.com/oracle/solaris-userl … ee7066a20c
https://github.com/oracle/solaris-userl … d7eb4fb0b5
https://github.com/oracle/solaris-userl … d4f16b8163
How can I update xkeyboard-config so that keyboard-configuration will have the proper configuration options?
Thanks in advance.
A.
Edit:
The installed xkeyboard-config in Devuan ASCII (apparently) is v2.19.
groucho@devuan:~$ cat /usr/share/pkgconfig/xkeyboard-config.pc
prefix=/usr
datarootdir=${prefix}/share
datadir=${datarootdir}
xkb_base=/usr/share/X11/xkb
Name: XKeyboardConfig
Description: X Keyboard configuration data
Version: 2.19
groucho@devuan:~$
Hello:
... appears to start but I cannot see it running ...
I installed it and have it running in my Devuan ASCII:
groucho@devuan:~$ /etc/init.d/haveged status
[ ok ] haveged is running.
groucho@devuan:~$
I cannot remember how I did it. =-/
But see here:
https://www.techrepublic.com/article/ho … -on-linux/
Set haveged up to start at boot with the command sudo update-rc.d haveged defaults.
Then you would get a script in /etc/init.d/haveged
#! /bin/sh
### BEGIN INIT INFO
# Provides: haveged
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Entropy daemon using the HAVEGE algorithm
# Description: haveged uses HAVEGE (HArdware Volatile Entropy Gathering
# and Expansion) to maintain a pool of random bytes used
# to fill /dev/random whenever necessary.
### END INIT INFO
Other than default options:
groucho@devuan:~$ sudo haveged --help
Usage: haveged [options]
Collect entropy and feed into random pool or write to file.
Options:
--buffer , -b [] Buffer size [KW], default: 128
--data , -d [] Data cache size [KB], with fallback to: 16
--inst , -i [] Instruction cache size [KB], with fallback to: 16
--file , -f [] Sample output file, default: 'sample', '-' for stdout
--Foreground, -F Run daemon in foreground
--run , -r [] 0=daemon, 1=config info, >1=<r>KB sample
--number , -n [] Output size in [k|m|g|t] bytes, 0 = unlimited to stdout
--onlinetest, -o [] [t<x>][c<x>] x=[a[n][w]][b[w]] 't'ot, 'c'ontinuous, default: ta8b
--pidfile , -p [] daemon pidfile, default: /var/run/haveged.pid
--verbose , -v [] Verbose mask 0=none,1=summary,2=retries,4=timing,8=loop,16=code,32=test
--write , -w [] Set write_wakeup_threshold [bits]
--help , -h This help
groucho@devuan:~$
Cheers,
A.
Hello:
Perhaps you're using an initrd and omitted/forgot you update ...
Hmmm ...
Don't think so.
I distinctly remember doing update-initramfs -u as root after using jed to write the .conf file to /etc/modprobe.d/.
When I saw it had not stuck, I decided to go for the /etc/rc.local solution.
Maybe it was the -k all part?
... following steps worked fine for me ...
And for me too ... =-)
See man update-initramfs for details about that command.
Had to find man update-initramfs.orig.initramfs-tools as man update-initramfs for some reason brings up Live-Tools (8) - Live Systems Project.
Note, I know it's a good/better habit to also add a comment into the black listing file ...
Indeed ...
But then I have to remember that I once actually wrote the file. 8-D !!!
Yes, it's a habit I have kept from my old MS days.
Weary after so many W95/98/2000/XP reinstalls, I decided to keep a log in which I would write each thing I did.
I'd start with the plain out of the box install and make an image, then install the basic stuff I needed/wanted and made another image and so on.
Each successive image had a log of what was done using the previous one.
Thanks a lot for your input.
Best,
A.
Hello:
zram is only available for beowolf and ceres:
https://pkginfo.devuan.org/stage/beowul … 8.1-4.html
https://pkginfo.devuan.org/stage/beowul … 2.1-1.html
https://pkginfo.devuan.org/stage/ceres/ … 8.2-1.html
https://pkginfo.devuan.org/stage/ceres/ … 2.1-1.html
See also https://wiki.debian.org/ZRam
Cheers,
A.
Hello:
I understand that the psmouse module is built into the kernel and as such cannot be blacklisted.
Short of a custom kernel without that module, is there any way to keep it from loading at boot?
The only way I've found is to script /sbin/rmmod psmouse in etc/rc.local, but what that is doing is unloading it after I log in.
I'm asking in case there another way to do it, like remming the lp, ppdev and parport_pc entries in /etc/modules-load.d/cups-filters.conf.
Thanks in advance.
A.
Hello:
... just need a newer kernel in Devuan ASCII ...
I really don't know if I need a newer one just yet.
To start, maybe a more compact one, tailored to the specific hardware I use.
There's (what seems to be) a hardware issue I'm troubleshooting and I may also find out more about what's going on with a kernel that has only what I need.
... use the corresponding debian source package for "linux", or compile it through kernel-package, or at least use `make bindeb-pkg`, so that you will get a .deb package that you can install and remove.
Yes, that's looks like what I'm needing.
Will have to find the corresponding how-to.
I recall that, when exploring the Mint distribution (a rolling release), I could install other kernels ie: older or newer and then remove them as required.
They were all in the rpm repository but that's not the case with Devuan which is why I'm attempting this.
Once again, thanks for your input.
You've been very helpful.
Best,
A.
Hello:
why do you need the git repo of the kernel at all?
Good question.
Even though I started in IT ~1996 (all MS stuff, no development/coding, just TS and HW maintenance), I'm relatively new to Linux and a total novice with respect to kernels and compilations.
So I looked around in the forum, found what seemed to be what I wanted to do and followed the instructions on the page.
To do so, I followed the instructions here:
https://dev1galaxy.org/viewtopic.php?id=564
These are correct but make no distinction between compiling a kernel and contributing to kernel development.
Something that is quite obviously way above my head and most probably, way above the head of most of those posting here to find Devuan related answers.
In my case, a way to compile or upgrade to the latest kernel.
In fact, the title of the post indicates that it is what I was wanting to do:
» HOWTO: upgrade Devuan (stable) to the latest Linux kernel
So I guess that's why ... =-)
... just want to compile the kernel yourself ...
Yes, that is exactly what I want to (try to) do.
... use one of the tarballs available at www.kernel.org
Right.
Thanks a lot for the heads up.
... get the git repo only if you want to contribute to kernel development.
I seriously doubt I can do that.
Make some suggestions, maybe.
... you should try a shallow clone, but that's not particularly easy in a repo as large as that...
Indeed ...
As I have found from what I have been reading on the web and the results of my countless efforts.
HTH
Indeed it has.
Maybe the admins/OP could consider adding a note to the post I've cited.
It's undoubtedly a commendable effort on behalf of the OP but a warning or caveat explaining that the instructions contained are not what is needed to *just* compile a kernel would be a plus.
Or maybe addiitonal instructions (given the complexity involved) on how to do it without a full git ie: with a tarball like you suggest
Thanks a lot for your input. (and to the OP, of course)
Cheers,
A.
Hello:
I getting set up to try my hand at customizing my kernel to something more specific to my rig's hardware.
I am not expecting to change/add anything hardware wise in the mid term (its basically ca. 2000 hardware) and doing so may (?) help me with some issues I have.
To do so, I followed the instructions here:
https://dev1galaxy.org/viewtopic.php?id=564
Everything (hopefully) went as expected.
Now, when I do git tag -l, I see that I have downloaded everything from v2.6.11 to v5.0-rc8 ...
All 3.6Gb worth of Linux branches ...
Now I understand what "Use git to clone the Linux branch (all of it to start)" really means. 8-)
I don't think I need to have anything before 4.8 so, expecting to find different folders for each branch (is this how it is named?) I see that it is not the case and cannot figure out what to prune (delete).
How can I go about getting rid of the code I don't intend to use/need without damaging the whole git clone?
Thanks in advance.
A.
Note:
I *think* there's a typo on the page that would need to be corrected.
"Use git to clone the Linux branch (all of it to start)"
git clone [url]https://github.com/torvalds/linux.git[/url]
should be: Use git to clone the Linux branch (all of it to start)
git clone https://github.com/torvalds/linux.git
Hello:
... exactly why the text editors are having trouble reading the log file.
I see ...
... x00 is whats called the string terminating character, it defines the end of a string of text.
Sort of like the CR that's important to have in sudoers.d filers, else visudo.c will complain?
... it encounters the x00 and stops displaying text.
Seems a better (more reasonable) behaviour than Pluma.
Another good text editor as well as very useful all around tool is mc.
Midnight Commander?
Memories of the trusty NC under DOS come to mind. =-)
Thanks for the heads-up, I'll give it a try - didn't know it was available for Linux .
There's quite a bit of text editors for Linux out there but I find that, if you're not a programmer (my case), they (as well as hex editors) tend to be a bit too much.
... x00 being in the log file was definitely caused by the ungraceful shutdown ...
Indeed ...
To try, I added a second s to the script to test.
#!/bin/sh
# Shutdown system without the use of shutdownhelper
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin:
for i in s u s o; do echo $i | sudo tee /proc/sysrq-trigger; sleep 2; done # halt
The first time I tried it, I got the freeze+fans act for the first time using this script.
Obviously, right before/coincidentally with the shutdown ie: o:
s
u
sudo: unable to open log file: /var/log/sudo.log: read only file system
s
sudo: unable to open log file: /var/log/sudo.log: read only file system
... and the fan at full blast.
Sorry, I cant help much ...
It's all right, you have been very helpful. =-)
... since it seems to be ethernet, did you try disabling wake on lan?
I used to think it was all ethernet (the problematic on board e1000e) related.
But no.
Once I managed to get WoL disabled, the reboot after shutdown was solved (it was part one of a two part shutdown problem).
WoL is disabled, gave me a hard time to get that done as there's no BIOS option for the in the Ultra 24 and the DOS utility Intel says you MUST use to disable WoL does not disable it permanently as ethtool can enable it again from within Linux, so I added a script to /etc/networks/interfaces to try to keep it disabled.
post-up /sbin/ethtool -s eth0 wol d
post-down /sbin/ethtool -s eth0 wol d
So why the MUST use the DOS utility if it does not disable WoL in the BIOS or the controller EEPROM? Go figure ...
In any case, Intel tech support for the e1000e was absolutely useless.
The thing is that with WoL and EEE=0 disabled the problem is still there. 8-/
Thank you very much for your help.
Best,
A.
Hello:
... caused by ascii "non-text" codes being in the text log file.
... text terminating x00 null byte.
I see ...
Leafpad is very susceptible to this.
Pluma even more so, as it does not show me anything and then complains when I attempt to open the file. =-)
On the other hand, Leafpad just refuses to show me the offending "non text".
I'm glad this is not a Leafpad issue as I like it better than Pluma, can't say why.
... install a hex editor such as hexedit ...
... view exactly the base ascii codes and thus whats causing the problem.
I installed GHex 3.18.3 and found that between this string:
Mar 4 15:42:46 devuan kernel: [ 576.219397] EXT4-fs (sdb1): re-mounted. Opts: (null)
... and this string:
Mar 4 15:45:07 devuan liblogging-stdlog: [origin software="rsyslogd" swVersion="8.24.0" x-pid="1977" x-info="http://www.rsyslog.com"] start
... there is a long string of .................. which for some reason the editor would not copy into the clipboard.
On the hexadecimal view pane, these .................. are represented as sets of zeroes sepatated by a space just like the rest of the hex strings.
ie: 0000 0000 0000 0000
These strings are identified as hexadecimal 00, octal 000, binary 00000000.
... the #### stuff is at (prior to) a reboot?
Yes.
Mar 4 15:42:40 devuan kernel: [ 570.124482] sysrq: SysRq : Emergency Sync
Mar 4 15:42:40 devuan kernel: [ 570.155699] Emergency Sync complete
Mar 4 15:42:46 devuan kernel: [ 576.133524] sysrq: SysRq : Emergency Remount R/O
Mar 4 15:42:46 devuan kernel: [ 576.219397] EXT4-fs (sdb1): re-mounted. Opts: (null)
... system halt ungracefully prior to a reboot?
Apparently so, I thought it would not happen because the script includes a previous disk sync and unmount/remount as RO.
Evidently I'm mistaken and yet another sync maybe needed after the u.
Some background to this:
At present I'm attempting to solve a shutdown issue I have with my Ultra 24 WS.
The issue is basically this:
---
On shutdown, the rig will do one of two things:
1. shut down properly
2. freeze during the shutdown at this point ...
e1000e: EEE Tx LPI Timer
Preparing to enter sleep state S5
Reboot: Power Down
... with the fans blowing at full speed.
---
This shutdown problem ocurrs in a totally unpredictable manner, I have not been able to reproduce it or been able to link it to anything in particular.
Unfortunately, unloading the e1000e driver module before shutdown (a well known issue) or inserting a variety of reboot= stanzas in the kernel command line have not worked, even when using reboot=force.
Eventually, it would happen again.
To try to see what was going on, I decided to try shutting down the rig using a script that would (hopefully) isolate each of the stages of the shut down process and give me some feedback, much like I did in my old MS-DOS days by running config.sys and autoexec.bat in steps to weed out start-up issues:
#!/bin/sh
# Shutdown system without the use of shutdownhelper
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin:
for i in s u o; do echo $i | sudo tee /proc/sysrq-trigger; sleep 2; done # halt
I think that what we are seeing is the same shutdown problem which does not manifest itself in the same manner as when a normal shutdown command is issued.
This because of the o in the script directly powers off the system. ie: does not give it a chance to freeze and start blowing fans.
... then something else has caused problems; there should not be non-text ascii in the log files.
I'll try adding a second sync and see what happens.
In the meanwhile, do you know a better way to see what is going on during the shutdown process?
The unmount/mount RO and the sync in the script I cobbled up seem to go ahead without any issues.
It would seem that it's just the shutdown part that is acting up.
Thanks in advance,
A.
Hello:
I seem to have an issue with some of the log files in /var/log.
The affected files are: syslog, messages, kern.log, slim.log and sudo.log.
On a previous oportunity, slim.log was not affected.
My usual way of looking at logfiles is on the terminal with cat ot tail, but every so often I will want to look at them with a text editor such as Pluma or Leafpad.
The problem at hand is that Pluma will not open them and show a popup with an error.
With Leafpad I could open them and see them up to a point.
ie:
While I could see the whole contents of the file in terminal, Leafpad would only show me the part up to where whatever error happened.
This is the error I get in Pluma:
---
Could not open the file /var/log/slim.log.
pluma has not been able to detect the character encoding.
Please check that you are not trying to open a binary file.
Select a character encoding from the menu and try again.
---
The available encoding options are:
Automatically Detected
Unicode (UTF-8)
Current Locale (ANSI_X3.4-1968)
Western ISO-8859-15
The same problem occurs with any of the options.
With Leafpad I could open the log files and see them up to a a certain point/line ie: the moment in time where whatever error happened.
From then on, nothing was recorded on the file and the only way to see the entire content was via the terminal.
Pluma will not open a *.txt file created via cat on the terminal either but LibreOffice Writer will open it.
groucho@devuan:~$ cat /var/log/syslog > syslog.txt
I can browse through the whole file.
The only strange thing I found when I opened it with Writer was this ...
---
Mar 4 15:42:40 devuan kernel: [ 570.124482] sysrq: SysRq : Emergency Sync
Mar 4 15:42:40 devuan kernel: [ 570.155699] Emergency Sync complete
Mar 4 15:42:46 devuan kernel: [ 576.133524] sysrq: SysRq : Emergency Remount R/O
Mar 4 15:42:46 devuan kernel: [ 576.219397] EXT4-fs (sdb1): re-mounted. Opts: (null)
#######################################################################################Mar 4 15:45:07 devuan liblogging-stdlog: [origin software="rsyslogd" swVersion="8.24.0" x-pid="1977" x-info="http://www.rsyslog.com"] start
Mar 4 15:45:07 devuan kernel: [ 0.000000] Linux version 4.9.0-8-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.144-3.1 (2019-02-19)
---
... which on the terminal is seen in this manner:
Mar 4 15:42:40 devuan kernel: [ 570.124482] sysrq: SysRq : Emergency Sync
Mar 4 15:42:40 devuan kernel: [ 570.155699] Emergency Sync complete
Mar 4 15:42:46 devuan kernel: [ 576.133524] sysrq: SysRq : Emergency Remount R/O
Mar 4 15:42:46 devuan kernel: [ 576.219397] EXT4-fs (sdb1): re-mounted. Opts: (null)
Mar 4 15:45:07 devuan liblogging-stdlog: [origin software="rsyslogd" swVersion="8.24.0" x-pid="1977" x-info="http://www.rsyslog.com"] start
Mar 4 15:45:07 devuan kernel: [ 0.000000] Linux version 4.9.0-8-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.144-3.1 (2019-02-19)
Seems the difference is the string of ###.
This string was the point up to which Leafpad would show the file's content, something Pluma won't do.
It would seem that the system is writing something to the log files that for some reason a text editor cannot read and (Leafpad at least) probably cannot save, which is why it stops showing anything from that point on.
Any idea as to what the system could be writing?
Thanks in advance.
A.
Hello:
... that won't work. This is the path valid in your home only.
I understand (from my old DOS days) the importance and need for setting the PATH variable in a script.
But my *.bat days are long gone and I have no bash skills worth mentioning.
Starting a shell requires setting path in the shell script or to use the full path to any command.
Undoubtedly, it is best practise to do so.
But this script works and has the same result whether I add the line you suggested to it or not.
I expect it is so because it (the needed PATH) is already set elsewhere:
groucho@devuan:~$ printenv | grep -i path
GLADE_CATALOG_PATH=:
GLADE_MODULE_PATH=:
GLADE_PIXMAP_PATH=:
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
groucho@devuan:~$
In any case, I will start adding the PATH to every script I attempt to write.
Thanks for your input.
A.
Hello:
Observation: you haven't set a path ...
No, that's not it.
It seems the path is set in the environment variables.
groucho@devuan:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
groucho@devuan:~$
I can run the script directly from the prompt with or without sudo.
With sudo it executes directly (because sudoers) without, it asks me for the PW twice.
... trying to write a log during shutdown might not work.
Seems that's it. =-)
From https://it.toolbox.com/question/file-sy … ode-061114
The filesystem will usually go into read-only while the system is running if ...
... an emergency read-only remount is requested via Alt+SysRq+U.
So it is normal that sudo cannot write to it's log file after U is called.
Thanks for your input.
Best,
A.
Hello:
In order to overcome (ie: eventually diagnose and maybe solve) a shutdown problem I have with my Sun Ultra 24 rig, I am currently shutting down with a script instead of the Xfce shutdown button (which calls the shutdown helper executable):
groucho@devuan:~$ cat /usr/bin/magicdown.sh
#!/bin/sh
# Shutdown system without the use of shutdownhelper
#
for i in s u o; do echo $i | sudo tee /proc/sysrq-trigger; sleep 6; done # halt
groucho@devuan:~$
In order to make it as easy to use as possible and also see what's going on, I launch it in terminal via a *.desktop file:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=shutdown
Comment=Shuts down system bypassing shutdown helper
Exec=xfce4-terminal -x sudo /usr/bin/magicdown.sh
Icon=/usr/share/icons/gnome/32x32/actions/gnome-shutdown.png
Terminal=false
Path=
StartupNotify=false
GenericName=Shutdown
What I get on the terminal screen goes by too fast but with a video taken with a cell phone I could get a glimpse:
s
u
sudo: unable to open log file: /var/log/sudo.log: read only file system
o
I have a properly configured sudoers.d file that allows me to use the executable script:
[root@devuan groucho]# visudo -c
/etc/sudoers: parsed OK
/etc/sudoers.d/README: parsed OK
/etc/sudoers.d/user_dmesg: parsed OK
/etc/sudoers.d/user_linssid: parsed OK
/etc/sudoers.d/user_modprobe: parsed OK
/etc/sudoers.d/user_rescan: parsed OK
/etc/sudoers.d/user_shutdown: parsed OK
/etc/sudoers.d/user_updatedb: parsed OK
[root@devuan groucho]#
[root@devuan groucho]# cat /etc/sudoers.d/user_shutdown
groucho ALL= NOPASSWD: /sbin/halt, /sbin/shutdown, /sbin/reboot, /usr/bin/magicdown.sh
[root@devuan groucho]#
What I don't understand is not being able to open sudo.log as root.
Is there something wrong with the script?
Thanks in advance.
A.