Sunday, November 27, 2016

bug reporting - How do I report a bug?


I found a problem with an application on Ubuntu.


Questions :



  • How do I best report the issue?

  • What sort of information should I provide?



The Ubuntu Wiki has a very thorough guide that is well illustrated and covers many possible scenarios.


The essence of that page is that you first need a Launchpad account, then press Alt+F2 and enter ubuntu-bug packagename. In 11.04 and later you can enter ubuntu-bug -w and click on the affected window.


There are also methods described on that wiki page telling you how to:


There is a quick tutorial video that explains better.


And some more information on this site about how to gather information for a bug report:


Unable toboot with Nvidia GTX 750 ti, even with latest beta drivers

Yesterday I got a Nvidia GTX 750ti for my htpc (ubuntu headless 12.04) but the computer wont boot with it installed.
I've tried booting with nomodeset parameter and installing the latest beta driver from nvidia but I get black screen on boot. The machine does not seem to boot as I cannot ssh into it or invoke ctrl-alt-f*

nvidia - How do I Install CUDA on Ubuntu 18.04?



Is there any tutorial to install CUDA on Ubuntu 18.04?



The instructions on the Nvidia website for 17.04 and 16.04 do not work for 18.04.



I get a message telling me to reboot then re-run the installer. However when I do this I get that same message again.




I have installed CUDA 9.1 on Ubuntu 18.04, and runs very well.



However, I should modify default gcc, g++, and use .run files instead of .deb files.




  1. install gcc-6, g++-6 (CUDA requires gcc-6 !)

  2. In /usr/bin as root, rm gcc, gcc-ar, gcc-nm, gcc-ranlib g++,
    then ln -s gcc-6 gcc; ln -s gcc-ar-6 gcc-ar; ln -s gcc-nm-6 gcc-nm; ln -s gcc-ranlib-6 gcc-ranlib;
    and ln -s g++-6 g++


  3. install CUDA using .run files. You may not istall driver. Instead, install
    the latest driver(if required, download NVIDIA-Linux-xxxxxxx.run from Nvidia) would be better.



That's all.



I've tried to install using .deb files, but it causes package conflict so that I've changed the way.



Enjoy it!!


package management - Why is the "Software" application not showing the same results as "Software Updates" or even apt?

I open the "Software" application, go to "Updates" and click the refresh button. The GUI shows this:



Software GUI



I open "Software Updater", let it refresh, and it shows:



Software Updates



On the command line:




~ • apt list --upgradable 
Listing... Done
fsearch-trunk/artful 0.1+355+9~ubuntu17.10.1 amd64 [upgradable from: 0.1+354+9~ubuntu17.10.1]
google-chrome-stable/stable 65.0.3325.162-1 amd64 [upgradable from: 65.0.3325.146-1]


So... there are updates available. Searching for "FSearch" in the Software application shows no option to update:



enter image description here




The Software app also seems to be unable to find newer versions of repository software in PPAs or internal repositories. For example, even with the Virtualbox repository in my sources.list.d/, searching for "virtualbox" in Software only returns the package in the official repository, whereas:



~ • apt list virtualbox*
Listing... Done
virtualbox/artful 5.1.30-dfsg-1 amd64
virtualbox-5.1/unknown 5.1.34-121010~Ubuntu~zesty amd64
virtualbox-5.2/unknown 5.2.8-121009~Ubuntu~zesty amd64
virtualbox-dkms/artful,artful 5.1.30-dfsg-1 all
virtualbox-ext-pack/artful,artful 5.1.30-2 all

virtualbox-guest-additions-iso/artful,artful 5.1.30-1 all
virtualbox-guest-dkms/artful,artful 5.1.30-dfsg-1 all
virtualbox-guest-source/artful,artful 5.1.30-dfsg-1 all
virtualbox-guest-utils/artful 5.1.30-dfsg-1 amd64
virtualbox-guest-x11/artful 5.1.30-dfsg-1 amd64
virtualbox-qt/artful 5.1.30-dfsg-1 amd64
virtualbox-source/artful,artful 5.1.30-dfsg-1 all


Why? What is this app meant to do?

live usb - 8GB usb become 1GB after installing ubuntu?


I've just installed and booted to Ubuntu from my bootable USB, which is originally 8 GB USB.


Now when I'm looking at the USB size I can only find 1.1 GB partition?


Is Ubuntu really taking up 7 GB from my USB or am I missing something?



The partition on the USB drive is only as big as the Ubuntu image you burned to the drive. (I'm guessing the size is inconsistent because some things show it in megabytes and others in mebibytes.) The rest of the space would need to be partitioned before it's accessible; you could use GParted to do that.


Ultimately, where you want to set up a portable OS, you should refer to one of these questions, depending on your needs:


apt - How can PPAs be removed?


I've added many PPAs using the add-apt-repository command. Is there a simple way to remove these PPAs? I've checked in /etc/apt/sources.list for the appropriate deb lines but they aren't there.


This is on a server system so a command line solution would be great!



Use the --remove flag, similar to how the PPA was added:


sudo add-apt-repository --remove ppa:whatever/ppa

As a safer alternative, you can install ppa-purge:


sudo apt-get install ppa-purge

And then remove the PPA, downgrading gracefully packages it provided to packages provided by official repositories:


sudo ppa-purge ppa:whatever/ppa

Note that this will uninstall packages provided by the PPA, but not those provided by the official repositories. If you want to remove them, you should tell it to apt:


sudo apt-get purge package_name

You can also remove PPAs by deleting the .list files from /etc/apt/sources.list.d directory.


Last but not least, you can also disable or remove PPAs from the "Software Sources" section in Ubuntu Settings with a few clicks of your mouse (no terminal needed).


Saturday, November 26, 2016

apt - Installing and testing CUDA in Ubuntu 14.04



I am uncertain about how to install CUDA in my system.
looking around there are many tutorials about cuda on 12.04 LTS and a few on 13.04 and 13.10, but they all talk about acquiring a deb package from the NVidia CUDA developer zone.



Well NVidia does not offer a Debian package for 14.04 as of yet.



However, there is a promising package in apt repository: nvidia-cuda-toolkit.




The problem is that I didn't find any example with it. At least not the examples that are referred to in cuda6 online documentation section 4.11.



I should mention that the toolkit installed is v5.5, not v6 but I haven't found documentation for cuda v5.5 on the NVidia website.



So I can verify that nvcc is there, but nothing further than that. How can I get some examples to run to verify the CUDA is installed properly?



I got Cuda6 working on Lubuntu 14.04. This already had build-essentials installed, so if you're using a fresh install, you should probably install it:



apt-get install build-essential



Download the cuda6 run package (6.0.37 at the current time of writing) to ~/Downloads:



Open up a terminal and extract the separate installers via:



mkdir ~/Downloads/nvidia_installers;
cd ~/Downloads
./cuda_6.0.37_linux_64.run -extract=~/Downloads/nvidia_installers;



(I tried running the .run file directly, but it kept screwing up my Xorg install and would never let X run. I believe it is a config issue between driver versions: those installed by apt-get nvidia-331-updates and the cuda*.run driver.)



Completely uninstall anything in the Ubuntu repositories with nvidia-*. I used synaptic and did a purge, AKA completely uninstall programs and configuration.



sudo apt-get --purge remove "nvidia-*"


Have these instructions handy as we need to kill X install the driver.
Press CTL + ALT + F1 to drop to the physical terminal and log in.




cd ~/Downloads/nvidia_installers;
sudo service lightdm stop
sudo killall Xorg
sudo ./NVIDIA-Linux-x86_64-331.62.run


Accept the EULA and install the driver. I would recommend letting it update Xorg config files.



After that installer finishes, turn on the nvidia module and install CUDA.




sudo modprobe nvidia
sudo ./cuda-linux64-rel-6.0.37-18176142.run
sudo ./cuda-samples-linux-6.0.37-18176142.run


test if the drivers are working by going to your sample directory



cd /usr/local/cuda/samples
sudo chown -R : .
cd 1_Utilities/deviceQuery

make .
./deviceQuery


Worked for me at this point.
Now restart X



sudo service lightdm start



You should be able to do



lsmod | grep nv


and see a line with nvidia listed.
Don't forget to log back out of your physical terminal if it all worked.



APPENDIX




In my case it was necessary to add the folder that contains the executable to your $PATH.



One way of doing it is to edit the ~/.bashrc file in your Home folder.
Add a line to your .bashrc (modify the location if you changed the default CUDA installation folder)




export PATH=/usr/local/cuda-6.0/bin:$PATH




Save the file and then source your .bashrc by typing




source .bashrc


when in your home folder.


11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...