Can't write data to applesmc error, after upgrade to Arch linux kernel 5.8.1 - linux

I'm using the current version of mbpfan (mbpfan-git-2.2.1.r4.g52d8973-1-x86_64) from Arch User Repository, running Arch linux on a MacBookPro 6,1 mid-2010 (on external usb, actually). Mbpfan is a small daemon designed to control mac fan speed and solve heat problems.
After a recent upgrade to 5.8.1 kernal, from 5.7.12, mbpfan does not work,
with error
Aug 20 17:19:56 ehost kernel: applesmc: send_byte(0x03, 0x0300) fail:
0x00 Aug 20 17:19:56 ehost kernel: applesmc: FS! : write data fail
and
ehost mbpfan[380]: Could not set fan speed: Input/output error Aug 20
17:21:56 ehost kernel: applesmc: send_byte(0x40, 0x0300) fail: 0x00
Aug 20 17:21:56 ehost kernel: applesmc: F0Tg: write data fail
FS! fail is saying, can't change fan to "manual," and F0Tg is the first fan where it
tries to write a new speed.
From looking in /sys/devices/platform/applesmc.768 one can see that even root can only write to fan1_manual, fan1_min, and
fan1_output, for example.
-r--r--r-- 1 root root 4096 Aug 18 21:00 fan1_input
-r--r--r-- 1 root root 4096 Aug 18 21:01 fan1_label
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_manual
-r--r--r-- 1 root root 4096 Aug 18 21:00 fan1_max
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_min
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_output
The above permissions have not changed from earlier kernels when mbpfan worked.
They are exactly the same on the installations where mbpfan works (different usb stick, same machine).
Permissions should not be an issue, as I understand that one writes to "fan1_output," which is rw, to set the desired fan speed (counterintuitively).
As a test, I upgraded another installation with a working mbpfan (kernel 5.7.9) to 5.8.1, and the same no write problem appears.
--It seems that something in the kernel that affects mbpfan has changed between
5.7.12 and 5.8.1.
Naturally, I have reported this at the developer's git hub area. I've been digging around in the code a bit, but it's tough going so far as I really know nothing about drivers. --I'd really appreciate any suggestions on what I might try to get this working...

Related

dpkg error trying to install packages- "unable to open files list file for package linux-headers-generic: No such device or address"

Trying to run routine updates using Mint-update (19.3 Tricia) and I'm running into an issue I haven't seen before.
When I try to install, I get the following:
dpkg: unrecoverable fatal error, aborting:
unable to open files list file for package 'linux-headers-generic': No such device or address
E: Sub-process /usr/bin/dpkg returned an error code (2)
After some Googling, I tried to manually repair by running
sudo apt-get install --reinstall linux-headers-$(uname -r)
But got the same error.
I suspect the problem is a broken link or reference, as I was dropped into initramfs on boot yesterday, which required some repairs to proceed. I have no idea what links or problems to look for since I've never poked around in that sort of thing for the OS, but I did see the following:
linux-headers-generic.list looks ok in /var/lib/dpkg/info:
b-w-rwx-wx 1 20033 root 243, 10 Jul 21 08:15 linux-headers-generic.list
-rw-r--r-- 1 root root 163 Jul 9 16:21 linux-headers-generic.md5sums
I also saw the following files for my current kernel if this helps:
-rw-r--r-- 1 root root 803877 Jul 21 08:15 linux-headers-4.15.0-151-generic.list
-rw-r--r-- 1 root root 820163 Jul 9 16:19 linux-headers-4.15.0-151-generic.md5sums
-rwxr-xr-x 1 root root 259 Jul 9 16:19 linux-headers-4.15.0-151-generic.postinst
-rw-r--r-- 1 root root 1179614 Jul 21 08:15 linux-headers-4.15.0-151.list
-rw-r--r-- 1 root root 1482865 Jul 9 16:19 linux-headers-4.15.0-151.md5sums
No idea if this problem is connected, but these are the first install errors I've seen in a LONG time.

start mariadb server problem on external HD

I'm trying to start a local mariadb server on my raspberry pi. I've changed the datadir to point to an external harddrive, and i've gotten that working previously (with other pi's).
however, now when i use this particular pi and type in
sudo service mariadb start
I get
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
When i check journalctl -xe i get
-- The unit mariadb.service has entered the 'failed' state with result 'exit-cod
Oct 07 09:08:25 BLUE systemd[1]: Failed to start MariaDB 10.3.15 database server
-- Subject: A start job for unit mariadb.service has failed
Pokiing around further I find that my ib_buffer_pool in the directory I've specified for this server seems maybe corrupted?
Typing in ls-l for this particlar datadir I get
ls: cannot access 'ib_buffer_pool': Bad message
total 110628
-rwxrwxrwx 1 pi pi 16384 Oct 7 08:34 aria_log.00000001
-rwxrwxrwx 1 pi pi 52 Oct 7 08:34 aria_log_control
-rwxrwxrwx 1 pi pi 0 Jul 1 06:34 debian-10.3.flag
-????????? ? ? ? ? ? ib_buffer_pool
-rwxrwxrwx 1 pi pi 12582912 Jul 9 13:38 ibdata1
-rwxrwxrwx 1 pi pi 50331648 Jul 9 13:38 ib_logfile0
-rwxrwxrwx 1 pi pi 50331648 Jul 1 06:34 ib_logfile1
-rwxrwxrwx 1 pi pi 0 Jul 1 06:34 multi-master.info
drwxrwxrwx 2 pi pi 4096 Jul 2 10:13 mysql
-rwxrwxrwx 1 pi pi 16 Jul 1 06:34 mysql_upgrade_info
drwxrwxrwx 2 pi pi 4096 Jul 2 10:13 performance_schema
drwxrwxrwx 2 pi pi 4096 Jul 2 12:49 test_db
THose question marks freak me out...tried deleting the ib_buffer_pool and just get this "Bad Message" thing over and over.
To get this setup working on my other pi's I had to change permissions with sudo chmod -R a+rwX directory/ and i did that for THIS pi also, thought maybe this was a permissions issue but I checked and the containing folders are all rwxrwxrwx also...
does anyone know what might be going on and how to resolve this so I can start a local mariadb server on this pi?
N.B. I do have a mariadb server successfully running on ANOTHER pi which THIS f-ed up pi is connected to via ethernet and I can connect to that OTHER pi's mariadb server with THIS f-ed up pi to manipulate data and so on, no problems. BUT I wanted to run a local mariadb server on THIS f-ed up pi ALSO (so it could manage a database which would be located on ITS respective harddrive)...is this kind of goal not possible and/or the cause of why my ib_buffer_pool has ??? ???? ???? and I'm getting exit-code when i try to start this local mariadb server? FYI
Much appreciated
okay just in case anyone else stumbles across this...
didn't fix it properly, BUT
it was the ib_buffer_pool file being corrupted that was the problem.
To make it work (but i don't think it's a good long term fix)
I just renamed the directory the ib_buffer_pool file was in to "directorynameCORRUPTED"
then created a new directory called "directoryname"
and copied all of the files from "directorynameCORRUPTED" other than ib_buffer_pool into this "directoryname" directory
And it worked. So it's a workaround...but still wanna know what to do about those ????? corrupted files why did it show up? troubling....

How to solve initialization error 1 (read_params_file: parameter not found: II*) when using --tessdata-dir parameter?

Environment & Setup
Operating System: Suse Linux Enterprise Server 12 SP 1
$ uname –a
Linux 3.12.62-60.64.8-default #1 SMP Tue Oct 18 12:21:38 UTC 2016 (42e0a66) x86_64 x86_64 x86_64 GNU/Linux
Since this environment is managed, I can not update any system libraries like glibc etc.
So the newest and only official supported version for "Suse 12 SP1 x86_64" of teaaseract I found is 3.02.
Installed Packages:
libgif4-4.1.6-34.1.1.x86_64.rpm
liblept3-1.69-16.1.x86_64.rpm
libtesseract3-3.02.02-3.2.1.x86_64.rpm
libwebp4-0.3.1-34.1.x86_64.rpm
tesseract-3.02.02-59.1.x86_64.rpm
tesseract version
$ tesseract –v
tesseract 3.02.02
leptonica-1.69
libgif 4.1.6 : libjpeg 8d : libpng 1.5.22 : libtiff 4.0.6 : zlib 1.2.8
Release details
$ zypper info tesseract
Information for package tesseract:
----------------------------------
Repository: #System
Name: tesseract
Version: 3.02.02-59.1
Arch: x86_64
Vendor: obs://build.opensuse.org/home:koprok
Support Level: unknown
Installed: Yes
Status: up-to-date
Installed Size: 3.8 MiB
Summary: Open Source OCR Engine
Description: […]
Traindata & Languages
Traindata has been manually downloaded from:
https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.eng.tar.gz/download
https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.deu.tar.gz/download
And files have been extracted to /usr/share/tessdata/
$ ls -la /usr/share/tessdata/
drwxr-xr-x 1 root root 230 Dec 31 16:37 configs/
-rw-r--r-- 1 root root 2438081 Dec 30 15:31 deu.traineddata
-rw-r--r-- 1 root root 171918 Dec 30 20:16 eng.cube.bigrams
-rw-r--r-- 1 root root 38 Dec 30 20:16 eng.cube.fold
-rw-r--r-- 1 root root 181 Dec 30 20:16 eng.cube.lm
-rw-r--r-- 1 root root 857304 Dec 30 20:16 eng.cube.nn
-rw-r--r-- 1 root root 254 Dec 30 20:16 eng.cube.params
-rw-r--r-- 1 root root 13020078 Dec 30 20:16 eng.cube.size
-rw-r--r-- 1 root root 2444187 Dec 30 20:16 eng.cube.word-freq
-rw-r--r-- 1 root root 996 Dec 30 20:16 eng.tesseract_cube.nn
-rw-r--r-- 1 root root 21876572 Dec 30 20:16 eng.traineddata
drwxr-xr-x 1 root root 88 Dec 31 16:37 tessconfigs/
tesseract detects 'deu' and 'eng' as available languages
$ tesseract --list-langs
List of available languages (2):
deu
eng
Application & Problem
The software application is build based on Spring Boot framework. The code executing the tesseract command looks sth. like:
Runtime.getRuntime().exec(new String[] {
"tesseract",
"--tessdata-dir", "/usr/share/tessdata",
"-l", lang.getISO3Language(),
inputTiff.toAbsolutePath().toString(), extractedcntPath });
The appication logfile says
2016-12-30 20:30:02,320 [https-jsse-nio-8443-exec-7] WARN PDFContentExtractor - read_params_file: parameter not found: II*
Executing tesseract with tessdata dir fails
$ tesseract --tessdata-dir /usr/share/tessdata -l deu inputPdf6632237754781472255.tiff out4
read_params_file: parameter not found: II*
When executing tesseract with no tessdata dir works well
$ tesseract -l deu input.tiff out5
Tesseract Open Source OCR Engine v3.02.02 with Leptonica
Questions & Ideas
Why does tesseract work well and detect the available languages without the --tessdata-dir parameter set?
Why does teasseract crash during initialization when using the --tessdata-dir parameter set?
Is there any difference between running tesseract with/without the --tessdata-dir parameter set?
What can I do to fix this problem?
Install a newer version of tesseract?
Compile a version from sources?
Use other traindata/tessdata?
Run tesseract without the --tessdata-dir param?
If anybody can help me getting this issue solved in the upcomming week, it would not only make me happy, but rather our whole team.
Thank you very much in advance!
-Rüdiger
That command switch is not available until 3.04 version. Executing tesseract command will reveal what command options are supported for the current version.
https://github.com/tesseract-ocr/tesseract/wiki/Command-Line-Usage

IDE crashes daily - is it Ubuntu , is it Android-studio or something else?

--EDIT-- following #siva advice, i switched over to Oracle JDK from OpenJDK.
also updated a bunch of recently added stuff in the SDK 'manager'...
--END EDIT --
At random, UI event in the IDE like ( open edit on android proj file ) results in very long UI freeze then app crash.
Env:
Android studio 1.0 Prod
Ubuntu 12.04 - 3.8.13-03081328-generic
Random crashes ( daily in Android-studio IDE ) that produce large , 'apport' crash dump in :
-rw-r----- 1 rob whoopsie 177030197 Dec 9 20:14 _usr_lib_jvm_java-7-openjdk-amd64_jre_bin_java.1000.crash
NOTE - im still using the 'openJDK' with AS despite the warning in AS about issues with JVM's other than oracle. Maybe , after all this time on ubuntu/OpenjavaJSK , i need to switch JVM's
.
Ubuntu reports a crash dialog error in a pop-up box similar to this one
Pretty sure the abend is within a shared lib in folder:
/home/user/.AndroidStudio/system/tmp/native-platform-nnn-dir/libnative-platform.so
Where to report this?
ubuntu apport crash dump
OR
Android-studio forums
IMO - its within a shared lib installed by the app ( AS ) but i dont see anything in the Android-studio forum space mentioning this type of crash??
PS - what are all these Shared libs under /home/user/.Androidstudio/system/tmp
drwxrwxr-x 2 rob rob 4096 Nov 28 06:56 native-platform2953326984648443135dir
drwxrwxr-x 2 rob rob 4096 Dec 8 18:03 native-platform5404575141685110828dir
drwxrwxr-x 2 rob rob 4096 Dec 5 13:28 native-platform5488604906885341235dir
drwxrwxr-x 2 rob rob 4096 Dec 9 09:29 native-platform5969166866748048826dir
drwxrwxr-x 2 rob rob 4096 Dec 9 20:25 native-platform6032919435567587484dir
drwxrwxr-x 2 rob rob 4096 Dec 2 07:16 native-platform800088999941561401dir
If you are using OpenJDK, switch to Oracle JRE. Put it somewhere and set STUDIO_JDK to point to it.

CentOS and fontconfig: Cannot load default config file

I'm getting following error when using imagick:
Fontconfig error: Cannot load default config file
My script is working but i would like to fix this (is filling up log file).
OS is:
# cat /etc/redhat-release
CentOS release 5.10 (Final)
I was looking trough internet little bit and this is causing problem:
access("/etc/fonts/fonts.conf", R_OK) = -1 ENOENT (No such file or directory)
Folder exists:
# ls /etc/fonts/ -all
total 64
drwxr-xr-x 4 root root 4096 Jul 9 2010 ./
drwxr-xr-x 86 root root 12288 Jan 13 00:48 ../
drwxr-xr-x 2 root root 4096 Jan 3 2012 conf.avail/
drwxr-xr-x 2 root root 4096 Apr 14 2013 conf.d/
-rw-r--r-- 1 root root 5239 Jan 12 2008 fonts.conf
-rw-r--r-- 1 root root 6907 Jan 12 2008 fonts.dtd
But i see only this folder via root account, other account under with script is run doesn't see this folder. Permissions looks fine for me, but not so experienced with linux.
Account under with script is run is created with WHM.
Please help :)
I manage to solve my problem. chroot was making trouble.
I need to:
log with root account
find jailed environment of account on with i run script (in my case /home/virtfs/[username])
to create folder where i will mount real stuff mkdir /home/virtfs/[username]/etc/fonts
to mount /etc/fonts to this folder: mount --bind /etc/fonts /home/virtfs/[username]/etc/fonts
Posting an answer for CentOS 7 in 2021:
yum install fontconfig
More info here:
https://centos.pkgs.org/7/centos-x86_64/fontconfig-2.13.0-4.3.el7.x86_64.rpm.html

Resources