Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, February 17, 2019

Touchpad fix for Ubuntu 18.04 & Acer Nitro 5

I have an Acer Nitro 5 AN515-52 with the Intel i7 and GTX1050ti. For the first few months I just used it as a Windows machine and only relied on the Ubuntu terminal add-on for some remote linux legwork. But after a few months I tempted fate to dual-boot with Ubuntu as I hoped some basic issues would already pass and work out-of-the-distro, which fortunately didn't.

As a backgrounder, I used an Ubuntu 18.04 64bit Desktop ISO sometime Dec 2018. Most of the basic stuff worked except the touchpad. I also read that there might be some issues with Nvidia and the audio output of the HDMI port but wasn't planning to use it just yet.  The touchpad however was a big deal especially I don't usually have a mouse at hand. This once again led me to journey the vast forum pages in the internet to find and eventually compiled the answer in this post.

You may have landed to some answers where you need to install "i2c-tools" package as it was hinted in the BIOS settings for touchpad that you needed i2c drivers, but since you landed here means that didn't work. Changing the BIOS setting from "Advanced" to "Basic" wasn't an option for your either because of the touchpad functions when you go back to Windows.

The next thing I did was to install the Nvidia proprietary driver package, since touchpad input is usually associated with the graphics card... which also did nothing.

Another one would be to install the "xserver-xorg-input-synaptics" package as the default libinput package wasn't enough for our machine... and once again it didn't do anything.

I was about to give up but saw a suggestion in another forum page to sort-of force synaptics to be used for detection of touchpad input. It required you to modify the synaptics xorg config file and made sure to have the following:

Section "InputClass" 
             Identifier "touchpad catchall" 
             Driver "synaptics" 
             MatchIsTouchpad "on" 
             Option "TapButton1" "1" 
             Option "VertEdgeScroll" "1" 
End Section 

Now most of the stuff was already (uncommented) in the config file except the last 2 "Option" lines. I just added those, restarted, and then my touchpad finally worked!

To summarize all what happened or what I did, here's a recap along with some of the commands used (to help those linux beginners):

1) Install "i2c-tools"
sudo apt-get install i2c-tools 

2) [I think this can be optional] Install the Nvidia Proprietary Graphics drivers. You can do this graphically by going to the "Software & Updates" -> Additional Drivers -> enable the Nvidia proprietary drivers.

3) Install the xserver synaptics package and do a restart

sudo apt-get install xserver-xorg-input-synaptics 

4) Modify the config file located at /usr/share/X11/xorg.conf.d/70-synaptics.conf (or the XX-synaptics.conf) and append the necessary stuff I mentioned earlier. You can use your preferred text editor. Do a restart once you have saved the settings.

5) End

Here's an output of my "xinput --list" when my touchpad worked. The ELAN touchpad finally showed up after the stuff I did.

⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ ELAN0504:01 04F3:3091 Touchpad              id=12    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
    ↳ Power Button                                id=6    [slave  keyboard (3)]
    ↳ Video Bus                                   id=7    [slave  keyboard (3)]
    ↳ Video Bus                                   id=8    [slave  keyboard (3)]
    ↳ Power Button                                id=9    [slave  keyboard (3)]
    ↳ Sleep Button                                id=10    [slave  keyboard (3)]
    ↳ HD WebCam: HD WebCam                        id=11    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=13    [slave  keyboard (3)]
    ↳ Acer WMI hotkeys                            id=14    [slave  keyboard (3)]



Credits to the participants/contributors in the UNIX stackexchange I read. 

Thursday, July 24, 2014

Linux Driver for Canon ImageClass MF3110/3112

I recently stumbled upon a treasure trove while looking for ways to make my old Canon ImageClass MF3112 all-in-one laser printer work with the latest OS around.

Background of the situation

If you're looking for drivers of this printer at the Canon official website, it only provides drivers to support 32-bit Windows XP, Vista and 7... none for Linux nor MacOS. This is pretty much a bummer especially if you have up-to-date workstations that "need" 64-bit OS (the > 4GB RAM thing). In my case, all my workstations and laptops run a Windows 8.1 and an Ubuntu Gnome 14.04, both 64-bit.

Canon actually published a package to install printer drivers for Linux-based OS, called the "UFR II". However, this is only for their not-so-late models, and apparently the one I need is the one they developed prior to this. The older models seem to be an implementation based on a raster-like format that I have no particular clue how it differs.

After a day of two of digging around the Internet, and exploring the vast "Page 2 and 3" Google search results, I found a guy who made a custom linux driver to support this "rastertocups" print driver thing that Canon has done and left to rot. He has a GitHub repo page which sort of discussed what the driver is and what other canon printer models are supported.

Since there's no HowTo wiki entry to use his codes, I opted to share what I did in order to use and install it (credits to ondrej-zary for the source code).

Pre-work Requirements
  • sudo rights (or root)
  • gcc and compiler (e.g. make, build-essential) is installed
  • cups, libcups2-dev, and libcupsimage2-dev is installed
  • even though it doesn't have the required drivers, I installed the UFR II Canon Linux Drivers because it seems that it is needed for the custom drivers to work
The Steps
  1. Download ondrej-zary's carps-cups source code (there's a zip file download link present)
  2. Extract it on the desired work-area folder (temporary use; mine was inside my home folder)
  3. Using the terminal, go to the location of the unzipped folder and run "make" 
    $ cd ~/carps-cups-master 
    $ make 

  4. If there are errors of missing dependencies, you can try to use "apt-file search " to check which packages you need install before trying to make it.
  5. If things look fine and there's no error, proceed with "sudo make install" (or make install for root users);
$ sudo make install
The Result

I've done this and made my printer work with Ubuntu Gnome 14.04 64-bit (cups 1.7.2) and Debian 7 Wheezy 32-bit (cups 1.5.3). I added printer and selected the compiled driver via the cups web interface (usually running at your linux machine "localhost:631").



Hope this helps somebody out there... and again a huge thanks to ondrej-zary!