Posts Tagged ‘Linux’

Hardware monitoring in Linux

I have had this motherboard for a few months, currently on BIOS version 1.40. Although fan speed control is available though the BIOS, I wanted to have access through the OS or at least to be able to read temperature, voltage and fan RPM data from within linux like I could on my previous motherboard, an Asrock Z68 Pro3-M.

I found a while back that

# sensors-detect

is able to identify the embedded controller on the Z370M Pro4:

Trying family `VIA/Winbond/Nuvoton/Fintek'... Yes
Found `Nuvoton NCT6683D eSIO'
 (address 0xa10, but not activated)

but is not able to access it.

I spent some time on this today and here are my findings:

From cold boot,  I saw this in dmesg:
[    4.754471] nct6683: EC is disabled
not looking promising, but I tried to load the driver anyway.  Per the README, the nct6683 hwmon driver must be force loaded on non-Intel boards
# modprobe nct6683 force=1
and it fails with the following error:
# modprobe: ERROR: could not insert 'nct6683': No such device
However, if I suspend the system, then resume and try to load the driver again…success!
[ 4464.599527] nct6683: Found NCT6683D or compatible chip at 0x2e:0xa20

[ 4464.600616] nct6683 nct6683.2592: NCT6683D EC firmware version 1.0 build 07/18/16
# sensors
seems to give valid data:
Adapter: ISA adapter
Package id 0: +35.0°C (high = +82.0°C, crit = +100.0°C)
Core 0: +34.0°C (high = +82.0°C, crit = +100.0°C)
Core 1: +33.0°C (high = +82.0°C, crit = +100.0°C)
Core 2: +35.0°C (high = +82.0°C, crit = +100.0°C)
Core 3: +37.0°C (high = +82.0°C, crit = +100.0°C)
Core 4: +35.0°C (high = +82.0°C, crit = +100.0°C)
Core 5: +33.0°C (high = +82.0°C, crit = +100.0°C)

Adapter: ISA adapter
VIN0: +0.34 V (min = +0.00 V, max = +0.00 V)
VIN1: +1.02 V (min = +0.00 V, max = +0.00 V)
VIN2: +1.01 V (min = +0.00 V, max = +0.00 V)
VIN3: +1.06 V (min = +0.00 V, max = +0.00 V)
VIN7: +1.34 V (min = +0.00 V, max = +0.00 V)
VIN16: +1.07 V (min = +0.00 V, max = +0.00 V)
VIN12: +0.00 V (min = +0.00 V, max = +0.00 V)
VIN13: +1.02 V (min = +0.00 V, max = +0.00 V)
VCC: +3.30 V (min = +0.00 V, max = +0.00 V)
VSB: +3.42 V (min = +0.00 V, max = +0.00 V)
AVSB: +3.42 V (min = +0.00 V, max = +0.00 V)
VTT: +1.06 V (min = +0.00 V, max = +0.00 V)
VBAT: +3.04 V (min = +0.00 V, max = +0.00 V)
fan1: 0 RPM (min = 0 RPM)
fan2: 2474 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
fan4: 781 RPM (min = 0 RPM)
Thermistor 14: +34.0°C (low = +0.0°C)
 (high = +0.0°C, hyst = +0.0°C)
 (crit = +0.0°C) sensor = thermistor
Thermistor 15: +33.5°C (low = +0.0°C)
 (high = +0.0°C, hyst = +0.0°C)
 (crit = +0.0°C) sensor = thermistor
PECI 0.0: +35.0°C (low = +0.0°C)
 (high = +0.0°C, hyst = +0.0°C)
 (crit = +0.0°C) sensor = Intel PECI
intrusion0: OK
beep_enable: disabled

For the record, adding


with or without


on the kernel command line does not change anything.  Furthermore, fan speed control is still not available due to a limitation of the nct6683 driver.

 I am not sure if my findings are specific to my hardware or represent a bug in lm_sensors, the nct6683 driver, or the Asrock Z370M Pro4 BIOS. Asrock does not support linux so I have not bothered contacting them. I did contact the lm_sensors maintainer, Guenter Roeck and hopefully he will reply.  In the meantime, I would be interested in hearing from anyone running linux on an Asrock Z370 motherboard running into similar issues.


Thanks to Guenter for his suggestion to try the nct6683 driver from his GitHub repository  – and for his work on lm_sensors.  I built and installed the out of tree driver and now have access to the sensor data from my Asrock 370M Pro4 motherboard from within linux, without the need for the odd workaround.  Please note, the  driver still must be force loaded as explained above.


After all these years, my Acer 5740 laptop is still running linuxghost-mouse-25992, specifically Xubuntu, the xfce based Ubuntu derivative.  For the most part it remains serviceable, but some annoying bugs have come to light from time to time. I suspect these are at least in part due to the old hardware combined with a new(ish) kernel and drivers.

Case in point: log into Xubuntu 16.04 after the screen has been locked (by suspend or logout) and the mouse pointer becomes invisible. The mouse still works though, and if you manage to position the invisible pointer just right you  can point and click as usual. This bug seems to be related to the combination of lightdm, light-locker  and the xorg-video-intel driver configured to use sna acceleration.  The sad fact is that this bug has been around for a long time (at least since 15.04, probably longer). It seems I am not alone with this bug on my old hardware: reports suggest it affects more recent hardware as well.

The good news is that there are several potential  workarounds. The best one, found here involves  switching to a new VT and then back by pressing  ctrl-alt-F1 immediately followed by ctrl-alt-F7 or by placing commands to do the same in a bash script and assigning it a keyboard shortcut. But how do we automate this so that no keypresses are needed?

First, create the script VTswitch with these contents:

/bin/chvt 1
/bin/chvt 7
sleep 1

Save it in the location of your choice and make it executable.

Next, if it doesn’t already exist, create the file 50-myconfig.conf  in the directory /etc/lightdm/lightdm.conf.d with these contents:


Finally, restart lightdm:

sudo systemctl restart lightdm

That’s it!  Next time you unlock the screen, your mouse cursor will be visible with no extra keystrokes.  Please let me know if you see any weird side effects or  if you come across a patch that resolves this bug.

UPDATE: Even better than the workaround above, at least with my hardware, you can just avoid the bug entirely by removing the xorg-video-intel driver and using the modesetting driver built into Xorg instead:

sudo apt-get remove xserver-xorg-video-intel

If you were using the workaround, remove the file 50-myconfig.conf in  /etc/lightdm/lightdm.conf.d

Finally, reboot!

So now that I replaced one of our desktops with a laptop and it happened to be the one that the shared printer was connected to, I had to figure out what to do with the printer.  Since there is no guarantee the laptop will be near the printer at any given time, I didn’t want to use it as the print server.  There is no room for it at my desk so the printer stays where it is.

After a Google search for print servers that work with Linux, I picked up a nicely priced Netgear PS121 USB 2.0 Mini Print Server from eBay.  The consensus was that it’s not perfect and the documentation regarding use with Linux is just about nonexistent, but it works.  And I found that to be the case in combination with my Canon Pixma ip4300 printer.

The trick to get this to work (at least with my printer and Arch Linux setup):

Your device URI needs to look like this:


(replace the x’s with your device’s actual IP address and device name).

Note the “_P1” at the end of the device name.  It represents the port number.  It’s not mentioned in the user manual but without it, you won’t be printing anything.

N.B. –  These tips apply only to version 2 of the  PS121.  From what I have read,  version 1  is actually a completely different piece of hardware.  If you have a v1 you might want to take a look here.

With a couple of tweaks, the Acer Aspire 5740 series looks like a winner for Linux users. Two issues I have run into both have workarounds. The other one should be an easy fix as well.

Brightness Control

As I mentioned before, I am running Arch Linux on this computer. Out of the box you can’t adjust the backlight brightness. I confirmed the same with Ubuntu 10.04. This can be fixed by adding the following to your GRUB kernel parameters:


A kernel patch has been proposed here to prevent the need for this; maybe it will make it into the next release.

UPDATE – There is a new and better fix for the brightness issue.  See my comment here and if you are running Ubuntu, check Kamal Mostafa’s PPA.

Wired Networking

Because of an issue with the tg3 driver in the kernel, the Broadcom wired NIC is not detected properly at startup. A temporary fix is to remove the tg3 module, load the Broadcom module then reinsert the tg3 module. A better solution is to download the current driver from Broadcom, compile it yourself and install it.

N.B. – Make sure you have your kernel headers installed before you try to compile the module.

UPDATE – It seems that the tg3 driver is fixed in the 2.6.35 kernel so the above procedure is no longer necessary (after you upgrade).


There also seems to be an issue with audio coming from the built-in speakers when the headphone jack is in use. I will get to that one soon.

Everything else just works!  If I come across any other issues I will update this post.

Forget about the OS

Posted: March 27, 2010 in Linux, Opinion
Tags: , ,

What is an OS?  Ask your friends, family coworkers.  I bet most of them couldn’t tell you.  And in reality, most computer users could care less.  As long as they can get on Facebook, they are all set.   But if computers are your business, your hobby (like me),  or if you just enjoy learning how things work, then your choice of operating system might matter to you.

Why Linux?  I am not a Linux fan-boy.  I won’t sit here and tell you it is any better than any other OS.  I’m sure that if I had more time on my hands I could get close to  the same level of customization I have achieved with my Linux machines on a Mac or Windows PC.  But the key for me is that I want my computer to look and work just the way I want it to.  It doesn’t have to be super easy to use or perfect right out of the box.  Ultimately with Linux it becomes that way, but getting there for me is half  (or more) of the fun.

Which distro to use?  I use Ubuntu.  I’ve tried all the major ones over the years but I have settled with Ubuntu because of the sheer number of people using it.  Problem solving is just easier in this setting.   Hardware support is good too.  But in the end, it doesn’t matter which distro you choose – all the big ones are good.  Just pick one with a strong community and stick with it.

So even though the OS might not matter to the masses,  I choose Linux.  Unrestricted,  fully customizable and sometimes challenging it allows  me to turn my computers into finely tuned instruments and provides endless hours of entertainment along the way.