Klaus Knopper answers your Linux questions

Ask Klaus

Article from Issue 179/2015
Author(s):

NVidia graphics problems and setting up an FTP server.

Nvidia Graphics Card Problems

Hello Klaus:

I follow the Linux Magazine website, and I am a Knoppix n00b trying to figure out how to overcome some graphic/display configuration issues I am having. I am also an EnCase Examiner working on a troubleshooting issue. I am using the forensic LinEN v7.08 Live CD based on Knoppix v7.05.

The LinEN screen pops up perfectly fine, but once I get past that, I am unable to boot Knoppix (i.e., the screen goes blank). Therefore, I tried the following, per the recommendations offered on KNOPPIX.net [1]:

boot: knoppix vga=0
boot: knoppix acpi=off pnpbios=off       noapic noapm
boot: knoppix vga=0 debug -b 3

None of these tips from the Cheat Codes website did the trick, so I am going to try choosing the correct graphics driver. I was advised that Knoppix can use either the nvidia or nouveau kernel module (driver) for Nvidia graphics cards and that some Nvidia-based computers will work fine with both drivers, whereas others will need to use one or the other.

My specific question is: How do I choose/use a different kernel module (driver)? For instance, how do I toggle between Nvidia/nouveau drivers? Is this done in the home screen after hitting the Tab key to modify the command line? If so, no instructions are provided as to how to flip the bit on/off for either Nvidia driver.

I was told to highlight the appropriate option and hit Enter or to press Tab beforehand if I want to see the command-line parameters associated with an option. However, I am not seeing an option so that I may hit Enter. I value your time and appreciate any advice you may be able to offer in advance.

Tyler

Problems with unsupported or only partly supported graphics cards are still common when trying to configure any operating system automatically. The way Knoppix attempts to configure graphics correctly is to use the following sequence:

  1. First, choose the "best match" for the graphics card, which is, in case of Nvidia, the nouveau open source graphics driver. The advantage of using this driver is that for cards that are well supported (check the support matrix [2]), you get stable accelerated graphics with low power consumption in most cases, allowing the Compiz 3D desktop to work with magnification, desktop cube, and smooth accessibility features and effects. If the card is blacklisted in Knoppix, the composite extension and/or direct memory access are switched off, so at least you should get a stable 2D desktop.
  2. If the native driver fails, the accelerated framebuffer driver is tried instead. This driver still has a good chance of giving you an appropriate resolution that matches your display or monitor, as well as decent working speed.
  3. If the framebuffer driver fails, too, standard VESA mode is used, which usually works with all cards but has limited resolutions and features (i.e., you may get 1024x768 at 60Hz), although it's quite slow.

With these fallbacks, most users will be able to use graphics, even if method 1 or  2 fails.

Now comes the problem: If the graphics card is correctly detected and the optimal driver is also loaded successfully in step 1 or 2, in the case of incomplete support of the particular graphics card, the driver may be crashing without reporting this to the hardware detection scripts. Thus, the rest of the system assumes you have working graphics, whereas, in fact, the screen is blank or shows funny pixels, and the mouse cursor is unusable. There is no way to detect such a crash from software alone, and I think this is just what you observed by the screen going blank while loading the perfect matching driver after initially showing a nice logo in framebuffer mode (which is what many Knoppix derivates do).

The workaround requires manually specifying options for correcting the graphics driver's behavior, either by turning off special options that are not supported by the card or by skipping hardware detection step 1 or 2 and loading the vesa driver with no acceleration directly. Table 1 shows some examples combined from the Knoppix cheat codes list.

Table 1

Boot Commands

Command

Description

fb1024x768

Framebuffer-only graphics mode + loading the framebuffer Xorg module in 1024x768 resolution.

fb800x600

Same as above for 800x600 resolution.

knoppix xmodule=vesa nofb nodrm nomodeset vga=0

Start with VESA Xorg module, no framebuffer, no direct memory access, disable kernel mode setting, leave console in standard text mode. This option is safe but slow.

knoppix xmodule=nouveau nouveau.noaccel=1 nocomposite

Use Nvidia-specific Xorg driver but turn acceleration off.

Note that the framebuffer logo, which is shown after the boot screen disappears, can also cause the graphics card to malfunction, because some cards are known to be unable to switch to accelerated or VESA mode after framebuffer was initialized. The vga=0 option is, in this case, very helpful, but not enough for choosing the right driver.

Independent of this, for Knoppix 7.4 and later, it has been reported that booting in 32-bit mode on a 64-bit computer with knoppix … or explicitly starting to load the 64-bit kernel with knoppix64 … triggered correct behavior of the accelerated driver, but I doubt that is the case here.

If you have an Nvidia chipset that is only partly supported by the nouveau driver, the last boot command in Table 1 may be the best option. Please note that the public download edition of Knoppix does not contain the proprietary Nvidia manufacturer-specific drivers because of some license issues that could restrict redistribution in some cases.

The boot command line (in Knoppix, the syslinux bootloader that prompts with boot:) needs to be entered before loading the Linux kernel. If a derivative distro does not offer you a boot menu, hitting the Tab key in the initial splash screen may indeed drop you back to the boot command-line mode. If Tab does not work, then try the Escape key or (for GRUB bootloader) the e key for command-line editing mode.

Pressing Tab may, depending on the bootloader used, display which kernels are available for loading. It usually does not show kernel or boot options or help files. Apart from the Knoppix-specific knoppix-cheatcodes.txt, most Linux kernel options are documented in the file Documentation/kernel-parameters.txt in the kernel's source core or online  [3]. Additionally, each kernel module (the drivers) has its own set of parameters, which you can query by typing the command

modinfo <modulename>

in a running Linux system (Listing 1).

Listing 1

modinfo

 

In this example, you can see all supported parameters for the nouveau kernel module. They can be specified on the command line while loading the module manually (sudo modprobe nouveau noaccel=1 on the text console), entered into a configuration file under /etc/modprobe.d/*.conf (look at the examples there), or given as kernel parameters from the bootloader as mentioned above, prefixed by the module name and a dot.

If you find that your Nvidia graphics card works best with the noaccel=1 parameter to nouveau, change /mnt-system/syslinux/syslinux.cfg by adding the nouveau.noaccel=1 parameter after each APPEND line to make the change permanent.

Setting Up an FTP Server

Hi Klaus,

I'm a newbie in Linux and am wondering how I can create an FTP server from Ubuntu. Also, how do I install a speedtest analysis GUI in the FTP server and hence be able to test upload and download speeds?

Cheers, Herman Tutanava

Just install one of the available FTP server packages (e.g., vsftp, which is the preferred FTP server in Ubuntu). After installing the package, you might have to change the FTP server's configuration file /etc/vsftpd.conf. Open the file with an editor as root (I prefer the command line – that is, Terminal – for this)

sudo leafpad /etc/vsftpd.conf

and change the lines in Table 2 to meet your needs.

Table 2

FTP Configuration

Configuration Parameter

Description

local_enable=YES

Allow access to local users with their login/password.

write_enable=YES

Allow write access to the user's home directories

listen=YES

Run in standalone mode (i.e., from an init script; see below).

anonymous_enable=YES

Allow guest (passwordless) login for the anonymous user.

anon_upload_enable=YES anon_upload_enable=YES anon_other_write_enable=YES anon_mkdir_write_enable=YES anon_world_readable_only=NO

Allow guest (passwordless) user to upload files or create subdirectories in a public writable space and read all files without restriction (but see the security warning in the article).

To create a public upload directory (if the package installation did not already do this for you, enter:

sudo mkdir -p /home/ftp/upload
sudo chmod 777 /home/ftp/upload

Before (re-)starting the FTP server after these changes, please be aware of the following security issues:

  1. FTP transfers passwords insecurely in cleartext. Everyone in the network(s) between client and server could easily read them by intercepting network traffic!
  2. Attackers can use FTP to break into a system or probe for passwords if the system is not protected by a firewall and other security mechanisms, which would need some in-depth background knowledge.
  3. The anonymous configuration will allow anyone on the network to use your computer as a file share server. You probably don't want this (except for local tests).
  4. Because of protocol overhead, FTP is not the perfect tool to measure raw bandwidth between two computers.

Therefore, my recommendation is that if you want to test the FTP server, please disconnect your computer during these tests from any network that could possibly attempt a break-in, especially if you work in a public LAN or WLAN environment. After your tests, deactivate (or better yet, uninstall) the FTP server. If you want to offer a shared file directory, even if it's only for measurement, a web server may be a better choice (e.g., Apache 2 with a read-only public space).

Having said that, to start the vsftpd server after changing its configuration, type one of the following commands:

sudo start vsftpd
sudo /etc/init.d/vsftpd restart

The first command is Ubuntu specific, and the second is the common Debian command. Use stop instead of start/restart to teminate the FTP server.

Please be aware that the installation might have added an automatic start script, so the FTP server will restart on the next reboot automatically without your noticing. Thus, you should make sure it is set to disabled by default in the bootup configuration, or, again, remove the software package after the tests to keep your computer safe from FTP-based attacks.

A more secure server option is sftp, which uses an encryption layer (i.e., SSH2) between the client and the FTP server. Still, trying passwords for user accounts would be possible for an attacker. Other, less security critical programs that I could recommend for measuring network performance are listed in Table 3. To run these commands, the corresponding package needs to be installed.

Table 3

Network Performance Programs

Command

Description

iperf

Performs various network throughput tests. Requires an iPerf server and a client for tests.

sudo bing <local-ip> <remote-ip>

Measures maximum network throughput by continuously sending small and large ICMP network packets (no server installation required).

sudo iptraf

Shows network traffic statistics on your computer for all network interfaces and protocols.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Ask Klaus!

    Klaus Knopper answers your Linux questions.

  • Nouveau Driver Comes to Kernel 2.6.33

    Good news for anyone with a NVIDIA graphics card: the Nouveau driver goes into Kernel 2.6.33 and supports DRM.

  • Ubuntu 9.04 Picks up Nouveau Drivers for NVIDIA Cards

    The many years of hard work and reverse engineering that went into developing the free Nouveau drivers for NVIDIA graphics cards have finally paid off. Nouveau is now included in the repository of the next Ubuntu 9.04 release.

  • Nouveau Becomes NVIDIA's New Standard Driver

    The NV driver served for a long time as the standard driver for NVIDIA graphic cards. Now Ubuntu developers have replaced it with Nouveau driver in Ubuntu 10.04. It provides more than just benefits.

  • Interview: Klaus Knopper

    Ten is a fair age for a Linux distribution that doesn’t have massive staff resources to back it up. Klaus Knopper looks back with a sense of satisfaction after just having compiled version 6.4. As a tribute to the community, this version includes only free software.

comments powered by Disqus