Tag Archives: ubuntu

While we are waiting for Beyond Trust…

If you are using Pbis-open to connect to the Windows AD and you have upgraded to Ubuntu 15.04 you will have noticed that Pbis-open >= 8.2.2.2993 will not start the service lwsmd.

The reason is the service environment on Ubuntu 15.04 have switched to systemd.

Systemd uses a completely different concept for handling services so the package is not compatible.

I was saved by the user kavirondo from Ask Ubuntu, he/she made this instruction:

You need to create a systemd unit file for this service, and then enable it. The following worked for me on Ubuntu 15.04 (upgraded from 14.04) with PBIS 8.2.2.

Create the file lwsmd.service in /lib/systemd/system like this:

nano /lib/systemd/system/lwsmd.service

Here are the contents (paste this in to the file you created above) (taken from a redhat one) so thanks to them:

[Unit]
Description=BeyondTrust PBIS Service Manager
After=network.target

[Service]
Type=forking
EnvironmentFile=/opt/pbis/libexec/init-base.sh
ExecStart=/opt/pbis/sbin/lwsmd --start-as-daemon
ExecReload=/opt/pbis/bin/lwsm refresh
ExecStop=/opt/pbis/bin/lwsm shutdown
# We want systemd to give lwsmd some time to finish gracefully, but still want
# it to kill lwsmd after TimeoutStopSec if something went wrong during the
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
# ExecStop, which would kill lwsmd. We are sending useless SIGCONT here to give
# lwsmd time to finish.
KillSignal=SIGCONT
PrivateTmp=true

[Install]
WantedBy=multi-user.target nss-lookup.target

Once this is done, make a symlink to this file in /etc/systemd/system:

cd /etc/systemd/system
ln -s /lib/systemd/system/lwsmd.service

At this point you should be able to type:

service lwsmd status

and see that the service exists and is enabled.

Then typing:

service lwsmd start

should start it up and have pbis working as expected.

Now to make it work at boot time. Enable the service with this command:

systemctl enable lwsmd.service

It should give some feedback about creating some symlinks.

Then reboot your comp and all should be working.

I hope it was clear enough, and please forgive any typos… Good luck!

Source:

Kodi, MCE Remote and Ubuntu

I have always had problems with wakeup of my media PC’s after a suspend or hibernation using my MCE (Microsoft media center) remote.

The problem was solved by enabling wakeup on the USB bus device. On some of my devices I also had to enable port on the ACPI (Advanced Configuration and Power Interface). The grub bootloader parameters might also need some changes.

The first thing to do is finding out which usb port Infrared reciever is connected.

lsusb will list your attached usb devices:

$ lsusb
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 005: ID 046d:c71f Logitech, Inc. diNovo Mini Wireless Keyboard
 Bus 003 Device 004: ID 046d:c71e Logitech, Inc.
 Bus 003 Device 003: ID 046d:0b07 Logitech, Inc.
 Bus 003 Device 002: ID 1784:0008 TopSeed Technology Corp. eHome Infrared Transceiver
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

The bold line of text is my usb ir receiver. Use the device id (0008 in my case) with the following command to find your device in /sys/bus/usb/devices

$ grep 0008 /sys/bus/usb/devices/*/idProduct
 /sys/bus/usb/devices/3-1/idProduct:0008

Now use that location to check if wakeup from the device is enabled with:

$ cat /sys/bus/usb/devices/3-1/power/wakeup
 disabled

The following command will change this setting to enabled:

$ sudo sh -c 'echo "enabled" > /sys/bus/usb/devices/3-1/power/wakeup'

This setting will be reset on boot so to enable it on every boot you have to add the line to your /etc/rc.local file. You must be root to update the rc.local file.

$ sudo nano /etc/rc.local

and add the below below line before exit(0):

echo enabled > /sys/bus/usb/devices/3-1/power/wakeup

Save with <Ctrl>o and exit with <Ctrl x>.

Make sure /etc/rc.local is executable with the command

$ sudo chmod +x /etc/rc.local

The next is the ACPI needs to up updated as well. First inspect the ACPI wakeup configuration:

$ cat /proc/acpi/wakeup 
Device  S-state   Status   Sysfs node
PCI0      S5    *disabled  no-bus:pci0000:00
PEX0      S5    *disabled  pci:0000:00:1c.0
PEX1      S5    *disabled
PEX2      S5    *disabled
PEX3      S5    *disabled  pci:0000:00:1c.3
PEX4      S5    *disabled  pci:0000:00:1c.4
PEX5      S5    *disabled
HUB0      S5    *disabled  pci:0000:00:1e.0
USB0      S3    *disabled   pci:0000:00:1d.0
USB1      S3    *enabled   pci:0000:00:1d.1
USB2      S3    *disabled   pci:0000:00:1d.2
USB3      S3    *enabled   pci:0000:00:1a.0
USB4      S3    *enabled   pci:0000:00:1a.1
USB5      S3    *enabled   pci:0000:00:1a.2
USBE      S3    *enabled   pci:0000:00:1d.7
USE2      S3    *disabled   pci:0000:00:1a.7
AZAL      S5    *disabled

As you can see is USB0,USB2 and USE3 not enabled. For you is might be different.
I added the below lines  as root to rc.local before exit(0):

$ sudo nano /etc/rc.local

The lines add is different to what others recommend. This is because you cat switch enable and disable by executing the echo  “USB0” >   /proc/acpi/wakeup twice.

status=`cat /proc/acpi/wakeup | grep "USB0" | awk {'print $3}'`
if [ "$status" = "disabled" -o "$status" = "*disabled" ]; then
      echo "USB0" > /proc/acpi/wakeup
fi
status=`cat /proc/acpi/wakeup | grep "USB2" | awk {'print $3}'`
if [ "$status" = "disabled" -o "$status" = "*disabled" ]; then
      echo "USB2" > /proc/acpi/wakeup
fi
status=`cat /proc/acpi/wakeup | grep "USE2" | awk {'print $3}'`
if [ "$status" = "disabled" -o "$status" = "*disabled" ]; then
      echo "USE2" > /proc/acpi/wakeup
fi

The last thing was changing the grub startup paramerters.

$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
acpi_enforce_resources=lax"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

You will have to change the GRUB_CMDLINE_LINUX_DEFAULT (marked bold).

$ sudo nano /etc/default/grub

and change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1 acpi_enforce_resources=lax"

At last you will have to update grub:

$ sudo update-grub

Reboot and test.

Enjoy (some of) your suspend problems is over.

 

Sources:

It works!!!

For some time have I had problems running Kububtu and 3 monitors at the same time on a Nvidia card.

I solved by having each monitor running on each own xserver. That worked fine but certain things where not optimal.

I could only change display configuration by using Nvidia setting and I couldn’t disable the screen saver. Not a big problem but when I was watching TV suddenly I would miss a coal because of the screen saver.

I also have a Wacom tablet. It isn’t very often I use it but the other day there were a question at Ask Ububtu about pressure sensibility and I wanted to the answer question.
I just wanted to test if everything was working fine and to my surprise it was not.

Again I did the BIG investigation and hours went by. I could not the get pressure sensibility to work.

Even Krita wouldn’t work at all with the tablet.

So in the end I tried to remove (rename) the /etc/X11/xorg.conf file and reboot.

As the computer was rebooting I was getting grumpy because I suspected the X configuration was the problem and I could not get the 3 monitors to work at the same time.

But Kubuntu booted up, X started and everything looked normal, YES! It works now.
I Just had to goto the Diaplay and Monitor settings and configure the display order to my needs.

Was I one happy little boy and the grumpiness was gone 🙂

I suspect the problem is solved in KDE ver. 4.13.2

To install on Kubuntu add to the repository search:

ppa:kubuntu-ppa/backports

Or, from a command line:

sudo add-apt-repository ppa:kubuntu-ppa/backports

Then

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

Hope you will enjoy!

Thunderbird and LDAP problems

If you have Thunderbird installed and is using LDAP to authorize user on Linux/Ubuntu you might get the same problem as I used to have.

The symptom could be Thunderbird crash after a minute or two.
You might see this is your /var/log/auth.log:

Jun  1 10:26:50 <host> thunderbird: nss_ldap: failed to bind to LDAP
server ldap://192.168.0.4: Can't connect to the LDAP server
Jun  1 10:26:50 <host> thunderbird: nss_ldap: could not search LDAP 
server - DSA is unavailable

I solved the problem by installeing LDAP connection daemon – nslcd

sudo apt-get install nslcd

Configure nlscd to connect to your LDAP server.

You still have to configure Thunderbird if you want to use LDAP to lookup users.

A little surprise from a Windows machine

I upgraded Kubuntu to 14.04 LTE and everything went smooth.
But after a day or so the Internet access was getting slower and slower.

I blamed everything and regretting upgrading Kubuntu.

DNS/DHCP server had no problems and the Internet provider had no problems either.
A Internet speed test had problems pinging and connecting but the speed was normal.
Checked my router everything looked normal until I got to the UPnp section.

I found 2 unauthorized port (50.000 something) opened by an IP I didn’t knew of.

The DNS server told me it was my virtual windows machine I use to update my Harmony remote.

I disable UPnp and rebooted the router and after a while everything started to be normal.

I had enabled Upnp so it was easy for me to update the port forwarding to my Synology box.

So the lesson learned is never be lacy when it comes to network safety.
From now on everything will be configured manually.

And NO, I don’t regretting upgrade Kubuntu even I can’t see the big difference 🙂
The little Windows machine will have to undergo some torture so I can find the little bugger 😈

Problem with Nvidia 331.20 (64-bit) and Ubuntu updates start 2014

After the latest updates from Ubuntu my system would not start the X server when booting up. I found a answer at askubuntu by the user darent (http://askubuntu.com/questions/399153/after-apt-get-upgrade-system-always-boot-to-low-graphics-mode):

I had this same problem just a few hours ago, the latest 331 is broken. Downgrading to the previous driver or any other, included the open-source nouveau won’t work, the only solution is uninstall all nvidia packages and install the driver from the .run you can download from the nvidia website.

http://www.nvidia.com/Download/index.aspx?lang=en-us

There, select your graphic card, architecture, etc, and download the installer. When it’s done, you’ll need to install it from the command line without X running. Pres Ctrl+Alt+F1 and after login:

sudo service lightdm stop
# (change this line to match the drivers you have installed
# or simply sudo apt-get purge nvidia*).
sudo apt-get remove nvidia-319 nvidia-331 

Now, assuming your driver has been downloaded to the “Downloads” folder:

cd Downloads
chmod +x NVIDIA*
sudo ./NVIDIA*.run

I’ve used the asterisk here because I can’t know if the driver you downloaded is the exact same name as mine, since it depends on your GPU. You could use autocompletion with the tab key to use the exact .run name.

Follow the on screen instructions. When you finish, reboot:

sudo shutdown -r now

If after rebooting you see the same problem, log again in a TTY and try:

sudo nvidia-xconfig

This should regenerate a new /etc/X11/xorg.conf

Just a quick update for anyone who used my solution: Today a new update of some gl libraries has broken my system again. I’ve had to re-install the NVIDIA run package, it complained about some of its libraries being altered and restored them to its working state. There seems to be a compatibility problem between libraries from the official repositories and the ones packaged in the driver. This is the reason I don’t like to install things from outside packagers… To reinstall the driver, kill the X with

sudo service lightdm stop

and reinstall the .run with

sudo ./NVIDIA....run 

NVidia drivers on Ubuntu…

The installation of new NVIDIA drivers can be a problem sometimes, especially if you are not accustomed to the way things usually work on a Linux operating system.

There are just a couple of ways of installing the NVIDIA driver on an Ubuntu system: the easy way and the hard way. The easy way is also the most straightforward, but it requires a working Internet connection. This method will also introduce you to the beautiful world of PPAs.

Ubuntu 13.10, just like its predecessors, benefits from a large repository, but Canonical developers don’t upload the most recent version of the driver for several considerations. The most important is that it they don’t risk uploading a piece of software that has yet to be proven stable.

Fortunately, there is a PPA that makes available the latest versions of the drivers, a day or two after the launch. Just enter the following command in a terminal (you will need root access):

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-331

If you already have an older version of the driver you will need to replace the last command with:

 sudo apt-get dist-upgrade

After the process is finished, restart the computer and you’re set. The next time NVIDIA releases a new driver, you will only have to update the system, without adding the PPA.

The second method is a little more complicated, but you don’t need an Internet connection (you will need to download the driver at some point, but you don’t need the connection during the installation). We will be using the 64-bit driver as an example. I did not have a big success with this method

You will have to enter the virtual console with Ctrl + Alt + F1 and login into the system with the user name and password. There, you need to navigate to the location of your driver (for example Downloads) and enter the following commands

sudo service lightdm stop
sudo chmod a+x NVIDIA-Linux-x86_64-331.20.run
sudo ./NVIDIA-Linux-x86_64-331.20.run
sudo reboot

This is it. Whatever method you choose, enjoy the latest NVIDIA drivers.