20 December, 2019

FC31 Nvidia settings for Lenovo Legion Y540-15IRH / GTX 1660 TI

I'm writing this out of elation after I finally could make my graphic card work on FC31. It's been frustrating months on-and-off trying to configure my Nvidia card with the official proprietary drivers.

So, first of all, although it didn't work for me, I highly recommend to try the packaged solution that comes with rpmfusion repos. Only if that doesn't work, then switch to the manual installation. Below you will find a summary of both methods with a link to the two resources that I found more helpful to understand how this can be setup.

Method 1: rpmfusion

You need to enable the rpmfusion repos in FC31, update the kernel and packages and only then install the drivers.

With a root shell (or prepend with sudo every command):

# dnf update 
# dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm 
# dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# dnf install akmod-nvidia
# reboot


so you say yes to everything and will install all the software. If all goes well, you'll simply start with the Nvidia drivers already working and you don't need to do anything else.

For further details on this method, you can check this blog entry:
https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-fedora-31

Method 2: manual installation

This method, although covered in the link provided above, it just didn't work as it's explained there for me. To me, the resource below is more clear and simply by executing the instructions it worked for me, with just one workaround that I had to do.

https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/

The summary is:

1. Disable secure boot in BIOS (F2 at boot) or either you will have to sign the kernel module and
   install the PK in the kernel.
 
2. Download the software and pre-reqs:
# lspci |grep -E VGA
01:00.0 VGA compatible controller: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] (rev a1)
==> Download the software compatible with your card at https://www.nvidia.com/Download/Find.aspx?lang=en-us
# dnf update
# dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig 
# reboot 
 
3. With root, install:
# echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
# vi /etc/default/grub 
    <>
GRUB_CMDLINE_LINUX="your-grub-options nomodeset rd.driver.blacklist=nouveau "
# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
# dnf remove xorg-x11-drv-nouveau 
# systemctl set-default multi-user.target
# reboot
   <>
# cd /path/to/NVIDIA_INSTALLER 
# chmod +x NVIDIA-Linux-*.run 
# ./NVIDIA-Linux-*.run 
   <>
# systemctl set-default graphical.target
# reboot
 
   << Here you got back to graphical mode and restarted without nouveau and with nvidia driver >> 
** Optional **
# dnf install vdpauinfo libva-vdpau-driver libva-utils


Something to note is that I added nomodeset in the kernel load line. This isn't in neither resource but I broke my teeth for a fair amount of time because when I installed the drivers the few first times I always was getting a blank or pixelated screen during startup. Nomodeset helps by loading BIOS driver during startup until Xserver is started. So, in mode 3 (text) I could at least login to the machine and run the installation script. Without it I couldn't even do that.


I'm actually keeping nomodeset after nvidia is properly installed. As far as I could read, it only affects startup and it's just to make it prettier... I actually don't care about that, so I'll let it start with raw matrix-like startup and load nvidia only after X is running. If X crashes I can go back to text mode.

Hope this helps.

01 August, 2018

Letting go


Todo empezó como un día normal.

Un martes cualquiera, de esos en que duermo mal, me despierto cansado y que sé que será una lucha mental por obligarme a cumplir todos mis deberes. Lo mismo de siempre: salir a la sala, saludar a gordi, regar las plantas, limpiar el patio. Tania se acaba de cambiar y dejo entrar al Camus para que la salude. Nos despedimos como cada día, deseándonos un buen dia. Comienza de mi trabajo de oficina, resolviendo problemas de integración.

¿Quién me diría que sería el último día que la tendría conmigo? Ni de lejos me pasaba en la cabeza que no iba a volver a verla recibirnos al abrir la puerta del departamento, que no iba a volver a escuchar sus chillidos cuando quiere salir, que ya no iba a ver una serie con Tania acostado en el sillón con ella dormida sobre mí... ya no mas darle comida que "accidentalmente" se me caía, no más esos gritos ridículos de "gordiiiiii" día y noche... ¿Quién iba a imaginar que hoy sería la última vez que la iba a cargar y abrazar?

Se nos fué mi gordita. Hipermetástatis dice la veterinaria. Pobre Baileys apenas podía respirar, y es así, que tras unas horas en el hospital y tras hacerle estudios, decidimos que era mejor dejarla ir. Que se fuera al cielo de los perros sin sufrir, en compañia de todos a quienes llenó de luz. Tania por supuesto la abrazó hasta su último respiro. Nos acompañaron sus padres y hermano en ese difícil momento. Naturalmente todos estamos inconsolables.

La recordaré como un ser que me dió mucha alegría y tranquilidad, que me dió compañía en la soledad de mi trabajo diario, que me hacía reír, que con sus actitudes altivas me alegraba el día. ¡Pinche gorda! yo decía cuando me despreciaba. ¡Oh! ¡Cuánto daría por un poco más de sus ojos dormilones! Llevo unas horas sin ella y ya la extraño; quiero pero aún no puedo dejarla ir.

Espero esté bien, si existe el alma seguro nos encontraremos. Me recibirá moviendo su cola y haciendo "garrita". Me exigirá su cuota de comida, y seremos felices en el más allá.

Yo solo estaré un poco mas de tiempo en este mundo, pero te voy a alcanzar mi gordi, te daré papayita y melón, te rascaré la panza hasta que te duermas y te veré dormir por horas. Te quiero mucho. Descansa en paz.

04 December, 2011

Telmex Nightmare (Huawei Modem)

I spent some time today trying to fix some of the problems the WI-FI modem given by Telmex was having.

Since my 2wire modem was broken (don't know what happened, just stopped working), I got some issues with my wireless internet. The modem that Telmex gave to me as a replacement of the 2wire is a "new" Huawei hg530.

The main and most annoying issue with the Huawei is that from time to time the DNS stop working. When I check the default network configuration of the DHCP, I can see the default GW, route and DNS is 192.168.1.254... in other words, the modem itself. Therefore, if something is broken it must be the modem, and trying to change it is not that easy, given the fact that there's a lot of WAN configuration, it could mean more time configuring than what I want to bear with. So the quick fix is to reconfigure dhcp services.

The first step is to gain access to the modem. This is done easily by googling it. The steps:
- Open a browser with the address http://192.168.1.254
- Type "TELMEX" as user and your WEP key as password.

The second step is to configure the DHCP DNS's
- In the left frame, open Basic->DHCP and type the google DNS's : 8.8.8.8 and 8.8.4.4

The changes are applied on the fly, but I couldn't connect properly until I restarted the modem, so I recomend to do so.

The last issue I wanted to solve now that I have access to the modem configuration, is to change the encription algorithm. By default you have a WEP key of 64 bits that is very easy to crack, so I changed it to WPA2-PSK. It's still crackable but it's way more dificult. Need to go to Basico->LAN Inalambrica and change the Encription method and key.

Now I have a bit better expierence... until now... let's see later.

17 July, 2011

Setting up Fedora Core 15 with Gnome 3 for Java Development

After installing fc15:

Update the system

$ yum -y update
$ yum install kernel-devel
$ reboot


I've an nvidia driver, that just works with the default driver (nouveau) but it doesnt use the full potential of the nvidia card, so I needed to install the official Nvidia drivers via rpmfusion:

$ rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
$ rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
$ yum install akmod-nvidia xorg-x11-drv-nvidia-libs
$ vi /boot/grub/grub.conf


and check if it's added

rdblacklist=nouveau nouveau.modeset=0

in the kernel line

Then:
$ reboot


After that, you might need to install Oracle Java in the desktop

Download Oracle JDK latest version
Execute:

$ chmod +x /path/to/file/jdk-6u25-linux-*-rpm.bin
$ /path/to/file/jdk-6u25-linux-*-rpm.bin
$ alternatives --install /usr/bin/java java /usr/java/latest/bin/java 20000
$ alternatives --install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 20000
$ alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
$ alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000
$ alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 20000


Some commands to test everything is ok:

$ java -version

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)

Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

$ javac -version
javac 1.6.0_22

$javaws
Java(TM) Web Start 1.6.0_22


Until now you have a whole OS with desktop and Java tools, but you cannot program without a little bit of multimedia:

Flash plugin (64bits, if you have 32 bits machine, the commands are slightly different):

$ rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
$ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
$ yum install flash-plugin nspluginwrapper.x86_64 nspluginwrapper.i686 alsa-plugins-pulseaudio.i686 libcurl.i686


Bluetooth service works out-of-the-box in FC15 in my dell computer, but it's necessary to enable the service, otherwise you see the bluetooth icon in an undefined status.

$ systemctl status bluetooth.service

bluetooth.service – Bluetooth Manager
Loaded: loaded (/lib/systemd/system/bluetooth.service)
Active: inactive (dead)
CGroup: name=systemd:/system/bluetooth.service

$ systemctl enable bluetooth.service

ln -s ‘/lib/systemd/system/bluetooth.service’ ‘/etc/systemd/system/dbus-org.bluez.service’
ln -s ‘/lib/systemd/system/bluetooth.service’ ‘/etc/systemd/system/bluetooth.target.wants/bluetooth.service’

systemctl start bluetooth.service


Now to wath videos and MP3 you need xine and codecs:
$ yum install gstreamer-plugins gstreamer-plugins-* xine xine-*


The default theme in FC15 is minimalistic and dark, it only needs a few changes:
$ gsettings set org.gnome.shell.clock show-seconds true
$ gsettings set org.gnome.shell.clock show-date true
$ vi /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml
$ vi /usr/share/gnome-shell/theme/gnome-shell.css

... and if the font it's bigger than you can bear, just check out Universal Access Settings and make the font size smaller.


# If you are a chrome fan, flash might not work in the 64 bits environment, it needs an small fix:

sudo mkdir -p /opt/google/chrome/plugins
sudo ln -s /usr/lib64/mozilla/plugins-wrapped/nswrapper_32_64.libflashplayer.so /opt/google/chrome/plugins/nswrapper_32_64.libflashplayer.so


And voilá, you have a fully functional linux environment so that you can create the most amazing Java programs in the world :P.

Mr H.

04 May, 2011

USB 2.0 Not recognized by Virtualbox Guest OS

It seems this is a common issue in Virtualbox using Linux as a host OS, and I think it should be addressed by Oracle either adding a button get all stuff configured or creating a 2-steps how-to like this blog entry in the official documentation.

First you must install Oracle VM Virtualbox Extension Pack. Download it from the link above, and follow:

- Select File-> Preferences, it opens a dialog box with configuration preferences
- Select "Extensions" and click the arrow in the right side to add the Extension Pack
- Select the file downloaded, for example: Oracle_VM_VirtualBox_Extension_Pack-4.0.6-71344.vbox-extpack
- Click open and wait until process is complete.

Now that you have USB 2.0 support, you need to add the user running Virtualbox to the vboxusers groups, otherwise you wont be able to see the usb devices:

- edit /etc/group

in the line
vboxusers:x:501:

add the userid of the host OS user running Virtualbox, like this:
vboxusers:x:501:hjuarezv

And voilá, you can start your guest OS and it should be recognizing properly all your usb 2.0 devices.

Hope this helps.

01 December, 2010

Android emulator on fc14 x64 not working

I was testing Android sdk on a dell laptop with fc14 x64. Android SDK still relies on 32 bit stuff, therefore I got some errors while installing then testing the emulator:

$ ./emulator @SansungGalaxyS
SDL init failure, reason is: No available video device

I got a good advice from a quite old forum entry:

Problems are 32 bit libraries missing. I didn't need to install all stuff they say, I traced a bit the binary file and found the libraries missing:

$ strace ./emulator

Then:
# yum yum provides libXrender.so.1
# yum provides libXext.so.6
# yum install libXrender-0.9.6-1.fc14.i686 libXext-1.1.2-2.fc14.i686

it installs some other dependent packages.

Finally gotcha! Again started the emulator and worked fine!



22 October, 2010

Solaris 10 SSHD not starting

I got crazy this morning cuz sshd service wasn't working on our lab's server. It's absolutely necessary if we want to work remotely. I lost the former output of the problem, but I want to show you (and me, when this is cleared from my cache) some of the commands i used to sove this problem:


# svcadm enable ssh
here doesn't display any message.

# svcs -l ssh
here displays the service status. It was offline. It should be online since i "enable" it. It shows also its dependencies. "autofs" service was offline.

# svcs -d svc:/system/filesystem/autofs:default
STATE STIME FMRI
online 12:27:03 svc:/milestone/name-services:default
online 12:27:10 svc:/system/filesystem/local:default
online 12:27:17 svc:/network/rpc/bind:default
offline* 12:27:21 svc:/network/nfs/client:default

I offlined nfs client service because Richard screwed the NAS so he needs to repair it in oder to be able to enable this service.

# svcs -x
If typed alone -x option shows all services that hasn't started. If you add the service name, it prints:

svc:/system/filesystem/autofs:default (automounter)
State: offline since Fri Oct 22 12:27:22 2010
Reason: Unknown
See: automount(1M)
See: /var/svc/log/system-filesystem-autofs:default.log
Impact: There are 22 dependent services.

svc:/network/nfs/client:default (NFS client)
State: offline since Fri Oct 22 12:27:21 2010
Reason: Start method is running.
See: http://sun.com/msg/SMF-8000-C4
See: mount_nfs(1M)
See: /var/svc/log/network-nfs-client:default.log
Impact: This service is not running.

What I did to solve was edit /etc/vfstab and comment the line where the NFS it's mounted. Then I typed (after a lot of research):

# svcadm clear svc:/system/filesystem/autofs:default
# svcadm disable svc:/system/filesystem/autofs:default
# svcadm enable svc:/system/filesystem/autofs:default
# svcs -x svc:/system/filesystem/autofs:default

And finally
# svcs -l ssh

And it worked!

Hope it still works after rebooting the system :D.