Zum Inhalt

Kategorie: TechTalk

Nerdzeug, Computer, Technik, Rocket Science

Fix IcedTea „cannot grant permissions to unsigned JARs“ error

In case you are a Linux user unsuccessfully trying to connect to your IPMI/LOM Console using IcedTea / OpenJDK 8 or newer, you will likely run into this error.

You know, because if you’re a major hardware vendor selling expensive enterprise class servers, you don’t care about your IPMI hardware once you sold it.

Here’s how to fix the issue on the client side:

Find the java.security file. In my case it is located in /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security

Then find the row

jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024

Comment it out, copy it, delete the word „MD5“.

jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024

Leave a Comment

Fix errors when compiling Linux Kernel 4.12 with GCC 8

Error:

In file included from arch/mips/kernel/syscall.c:17:
./include/linux/syscalls.h:196:18: Fehler: »sys_mips_mmap« Alias zwischen unverträglichen Funktionstypen »long int(long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, off_t)« {alias »long int(long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long int)«} und »long int(long int, long int, long int, long int, long int, long int)« [-Werror=attribute-alias]

Solution:

echo „KBUILD_CFLAGS += -Wno-error=attribute-alias“ >> Makefile

Leave a Comment

Installing Brother DCP Scanner Drivers in Ubuntu

Start a Terminal using CTRL+ALT+T. Install some depencencies and frontend scanner tools using

sudo apt-get install xsane sane-utils simple-scan lib32stdc++6

Now download the drivers. In case brother loses them, I mirrored them here. Alternatively use the wget commands down below.

wget http://download.brother.com/welcome/dlf006646/brscan4-0.4.4-4.i386.deb -O brscan4-0.4.4-4.i386.deb
wget http://download.brother.com/welcome/dlf006651/brscan-skey-0.2.4-1.i386.deb -O brscan-skey-0.2.4-1.i386.deb
wget http://download.brother.com/welcome/dlf006654/brother-udev-rule-type1-1.0.2-0.all.deb -O brother-udev-rule-type1-1.0.2-0.all.deb

Now install the drivers you just downloaded:

sudo dpkg -i –force-architecture brscan.deb brother-udev-rule.deb

And restart your udev service:

sudo systemctl restart udev.service

All i had to do was unplug and plug in my DCP, and i could immediately scan using simple-scan in Gnome.

Leave a Comment

Asus ZenBook 13 (UX331UN) with Ubuntu: Battery drain while in suspend

When i got my shiny new ZenBook 13 UX331UN in July, i immediately wiped it and installed Ubuntu 18.04 (Bionic Beaver).

But I soon realized something was wrong with suspend: The laptop would go to sleep and over night the battery would either almost (10-ish percent) or completely drain, leaving the laptop completely powered off.

On other laptops the suspend state would eat about 5% charge per day, leaving you able to suspend around 3 weeks in theory, but something was using the battery in suspend here.

Here’s the problem analysis:

Suspend your laptop. Wake it up again. Now check the output of

sudo journalctl | grep „PM: suspend“ | tail -2

May 13 18:41:00 mex kernel: PM: suspend entry (s2idle)
May 13 20:52:36 mex kernel: PM: suspend exit

If you end up with 

Your laptop is only entering „s2idle“ sleep (which is basicallynot saving much more than with blanking out screen and disabling the network). What we really want instead is the „deep“ sleep.

You can also check

cat /sys/power/mem_sleep

which yields

[ s2idle] deep

meaning the s2idle state is active in standby, because it’s written in brackets.

The permanent fix:

Edit your grub bootloader config to add a parameter to your Linux kernel when it boots. Type

sudo gedit /etc/default/grub

and replace the line GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash“ with

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash mem_sleep_default=deep“

Save the file and exit. Now run

sudo update-grub && sudo reboot

To apply the changes and reboot. Test. Done.

IMPORTANT: If you now have troble waking your laptop up, DO NOT USE THE NVIDIA DRIVERS. They suck. Use noveau.

EDIT: The above works and is tested, but i now have the problem that the laptop won’t resume when on battery. When it’s on power supply it can resume. Any ideas!?

EDIT: You’re  not alone: https://bugzilla.kernel.org/show_bug.cgi?id=201307 and https://askubuntu.com/questions/1071855/ubuntu-18-04-does-not-wake-up-from-suspend-on-asus-zenbook

4 Comments

Proxmox: “ perl: warning: Setting locale failed.“

If you run Proxmox and run into

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = „en_US.utf8“
are supported and installed on your system.
perl: warning: Falling back to the standard locale („C“).

here’s your solution:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales -u

Leave a Comment

my PS1

export PS1=“\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]“

 

and it looks like this:

Leave a Comment

Spacewalk Client for Ubuntu 18.04 / bionic

You have to roll your own:

for shizzle in \
bionic/apt-spacewalk \
bionic/python-ethtool \
bionic/rhn-client-tools \
bionic/rhnlib \
bionic/rhnsd \
; do
cd $shizzle && debuild -uc -us ; \
cd ../../
done

I uploaded some binary packages (.deb) which work for me ™:

spacewalk-client-bionic.zip

(This was originally uploaded for https://www.redhat.com/archives/spacewalk-list/2018-May/msg00009.html )

EDIT: If you are missing dependencies, use packages from artful

https://launchpad.net/ubuntu/artful/amd64/apt-transport-spacewalk

https://launchpad.net/ubuntu/artful/amd64/python-gudev

2 Comments