Solved

Get displaylink USB/VGA working in text mode for Slackware 14.1

Posted on 2014-12-04
19
397 Views
Last Modified: 2014-12-28
I have a Sony Vaio VGN-P530H running a newly installed 32bit Slackware 14.1. I have a DisplayLink USB->VGA adapter connected. I get the "Green Screen" on the connected monitor, which it supposedly a good sign that the udlfb driver is working. I've read through /usr/src/linux-3.14.24/Documentation/fb/udlfb.txt, but I can't seem to glean "how to" get stuff onto the monitor. One link, http://comments.gmane.org/gmane.comp.freedesktop.libdlo/653, referencing the aforementioned documentation, suggests:

 modprobe udlfb defio=1 console=1

Open in new window


which I did, but nothing happened. I unplugged and replugged the displaylink, still nothing.

The documentation further states that "The most common client of udlfb is xf86-video-displaylink or a modified xf86-video-fbdev X server." I don't have that, but that appears to be for X. I'm not interested in X (at this point). I really only need the VAIO text console to be cloned to the external monitor.

Seems like this should be simple. What should I do?
0
Comment
Question by:jmarkfoley
  • 10
  • 8
19 Comments
 
LVL 61

Expert Comment

by:gheist
ID: 40490849
USB modules are loaded automatically.
You need to add module options into /etc/modprobe.d/whatever_or_local.conf (new file will do just fine and not conflict with system upgrades)
options udlfb console=1
Then rmmod.
Then plug your USB device and check dmesg.
No there will be no clone in console framebuffer, that is luxury of Xorg. Best you can achieve is to disable builtin video card modeset driver and hope that USB console appears.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40498454
gheist: I'll need your suggestions fleshed out a bit ...

You need to add module options into /etc/modprobe.d/whatever_or_local.conf

What module options? Does the file name "whatever" not matter? is your "local.conf" a suggested file name? As you can probably tell, I'm not too familiar with using modprobe. The link I referenced said:

Or for permanent option, create file like /etc/modprobe.d/options with text
options udlfb defio=1 console=1
Does this mean that I should create a file /etc/modprobe.d/options with the one line of content:
options udlfb defio=1 console=1

Open in new window

Is that basically what you are saying? Again, the actual name of the file does not matter because modprobe will run 'em all?

Assuming I'm making the correct assumptions, I've created such a file in /etc/modprobe.d/displaylink.conf, containing the one line shown above.

Then rmmod.

You didn't say which module, so I did `rmmod utlfb` (with USB unplugged)

Then plug your USB device and check dmesg.

Did that and nothing happened except that I no longer have a green screen. Dmesg output is below.

Tried rebooting. Got the green screen back, but otherwise nothing.

the /etc/modprobe.d/README file says:
# /etc/modprobe.d/README
#
# The monolithic "blacklist" file (and others) that used to be here in this
# directory have been split into several more fine-grained files and moved
# to the /lib/modprobe.d/ directory.  Any file in /lib/modprobe.d/ will be
# overridden by an identically named file in this directory (/etc/modprobe.d/)
# or /run/modprobe.d/ (but since /run is on a tmpfs, it's not persistent
# across reboots, so you probably don't want to use it).
#
# See "man modprobe.d" for more information.
#

Open in new window

So I move the displaylink.conf to /lib/modprobe.d and rebooted. Still nothing. (green screen, yes). I've put what I believe to be the dmesg output from this last boot at the bottom of this posting.

dmesg after creating displaylink.conf, rmmod and re-plugging USB monitor"
[1236617.939299] usb 1-1.2: USB disconnect, device number 10
[1236617.939597] udlfb: USB disconnect starting
[1236617.939612] udlfb: Freeing all render urbs
[1236617.945505] udlfb: fb_info for /dev/fb1 has been freed
[1236617.945697] udlfb: freeing dlfb_data eff1a800
[1236646.762243] usbcore: deregistering interface driver udlfb
[1236669.792454] gma500 0000:00:02.0: Backlight lvds set brightness 7a127a12
[1236669.792508] gma500 0000:00:02.0: Backlight lvds set brightness 7a127a12
[1236698.235877] usb 1-1.2: new high-speed USB device number 11 using ehci-pci
[1236698.317149] usb 1-1.2: New USB device found, idVendor=17e9, idProduct=02ee
[1236698.317174] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1236698.317188] usb 1-1.2: Product: VGA Display Adapter
[1236698.317200] usb 1-1.2: Manufacturer: DisplayLink
[1236698.317212] usb 1-1.2: SerialNumber: 111305
[1236698.324154] [drm] vendor descriptor length:1b data:1b 5f 01 00 19 05 00 01 03 00 04
[1236698.522081] udl 1-1.2:1.0: fb1: udldrmfb frame buffer device
[1236698.522106] [drm] Initialized udl 0.0.1 20120220 on minor 1

Open in new window


dmesg after moving displaylink.conf to /lib/modprobe.d and rebooting
[   14.428177] udlfb: 720x400 @ 70 Hz valid mode
[   14.428182] udlfb: 640x480 @ 60 Hz valid mode
[   14.428186] udlfb: 640x480 @ 72 Hz valid mode
[   14.428191] udlfb: 640x480 @ 75 Hz valid mode
[   14.428195] udlfb: 800x600 @ 56 Hz valid mode
[   14.428198] udlfb: 800x600 @ 60 Hz valid mode
[   14.428201] udlfb: 800x600 @ 72 Hz valid mode
[   14.428205] udlfb: 800x600 @ 75 Hz valid mode
[   14.428208] udlfb: 1024x768 @ 60 Hz valid mode
[   14.428211] udlfb: 1024x768 @ 70 Hz valid mode
[   14.428215] udlfb: 1024x768 @ 75 Hz valid mode
[   14.428218] udlfb: Reallocating framebuffer. Addresses will change!
[   14.431530] udlfb: 1024x768 @ 60 Hz valid mode
[   14.431535] udlfb: set_par mode 1024x768
[   14.829320] udlfb: DisplayLink USB device /dev/fb1 attached. 1024x768 resolution. Using 3072K framebuffer memory

Open in new window

So, I suppose my assumptions were wrong?
0
 
LVL 61

Expert Comment

by:gheist
ID: 40498635
defio is not a valid parameter according to ubuntu 14.04 I have.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40499026
Removed defio parameter. No difference. dmesg out put is the same as shown at end of previous message. I have a file in /lib/modprobe.d/displaylink.conf, contents:
options udlfb console=1

Open in new window

Is that correct?
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40499044
Moved displaylink.conf back to /etc/modprobe.d, disabled /etc/rc.d/rc.setfont, rebooted. No difference. Still have green screen though. dmesg from latest boot:
[   15.137881] Bluetooth: HCI device and connection manager initialized
[   15.145087] udlfb: DisplayLink VGA Display Adapter - serial #111305
[   15.145093] udlfb: vid_17e9&pid_02ee&rev_0103 driver's dlfb_data struct at f5e89000
[   15.145095] udlfb: console enable=1
[   15.145097] udlfb: fb_defio enable=1
[   15.145099] udlfb: shadow enable=1
[   15.146858] udlfb: vendor descriptor length:1b data:1b 5f 01 0019 05 00 01 03 00 04
[   15.146862] udlfb: DL chip limited to 2080000 pixel modes
[   15.147091] udlfb: allocated 4 65024 byte urbs
[   15.147673] usbcore: registered new interface driver udlfb
[   15.228442] usbcore: registered new interface driver udl
[   15.237963] udlfb: 1024x768 @ 60 Hz valid mode
[   15.237968] udlfb: 720x400 @ 70 Hz valid mode
[   15.237971] udlfb: 640x480 @ 60 Hz valid mode
[   15.237975] udlfb: 640x480 @ 72 Hz valid mode
[   15.237978] udlfb: 640x480 @ 75 Hz valid mode
[   15.237981] udlfb: 800x600 @ 56 Hz valid mode
[   15.237984] udlfb: 800x600 @ 60 Hz valid mode
[   15.237987] udlfb: 800x600 @ 72 Hz valid mode
[   15.237991] udlfb: 800x600 @ 75 Hz valid mode
[   15.237994] udlfb: 1024x768 @ 60 Hz valid mode
[   15.237997] udlfb: 1024x768 @ 70 Hz valid mode
[   15.238001] udlfb: 1024x768 @ 75 Hz valid mode
[   15.238020] udlfb: Reallocating framebuffer. Addresses will change!
[   15.241233] udlfb: 1024x768 @ 60 Hz valid mode
[   15.241238] udlfb: set_par mode 1024x768

Open in new window

0
 
LVL 61

Expert Comment

by:gheist
ID: 40499302
You might need to disable other "Color framebuffer" drivers
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40499736
How would I do that? /etc/lilo.conf is set to vga=788 # 800x600x32K. Should I set to "Normal VGA mode"?

I also have "nomodeset" in lilo.conf, but that doesn't appear to do anything on this particular computer. Should I remove that?

In fact, removing nomodeset and setting vga=normal had no effect. Below is part of my dmesg after boot with above changes. My built-in screen goes from larger, readable font to micro-font and the displaylink monitor goes all-green just before I see the message "Console: switching to colour frame buffer device 200x48". Additional frame-buffer messages are included thereafter.

The last several lines listed are tantalizing. It appears a frame buffer is attached to /dev/fb1, It lists a 1024x768 resolution ... now if I could just *see* something on that screen!
[   17.917195] fbcon: psbdrmfb (fb0) is primary device
[   18.248902] Console: switching to colour frame buffer device 200x48
[   18.272174] gma500 0000:00:02.0: fb0: psbdrmfb frame buffer device
[   18.272352] gma500 0000:00:02.0: registered panic notifier
[   18.272658] gma500 0000:00:02.0: Backlight lvds set brightness 7a127a12
:
:
[   18.582952] udlfb: DisplayLink VGA Display Adapter - serial #111305
[   18.583215] udlfb: vid_17e9&pid_02ee&rev_0103 driver's dlfb_data struct at f4549000
[   18.583485] udlfb: console enable=1
[   18.583621] udlfb: fb_defio enable=1
[   18.583758] udlfb: shadow enable=1
[   18.584150] udlfb: vendor descriptor length:1b data:1b 5f 01 0019 05 00 01 03 00 04
[   18.589294] udlfb: DL chip limited to 2080000 pixel modes
[   18.594348] udlfb: allocated 4 65024 byte urbs
[   18.599514] usbcore: registered new interface driver udlfb
[   18.646707] uvcvideo: Found UVC 1.00 device <unnamed> (05ca:18b2)
[   18.654162] input: UVC Camera (05ca:18b2) as /devices/pci0000:00/0000:00:1d.7/usb4/4-8/4-8:1.0/input/input14
[   18.660204] usbcore: registered new interface driver uvcvideo
[   18.666150] USB Video Class driver (1.1.1)
[   18.710275] udlfb: 1024x768 @ 60 Hz valid mode
[   18.716177] udlfb: 720x400 @ 70 Hz valid mode
[   18.722166] udlfb: 640x480 @ 60 Hz valid mode
[   18.728196] udlfb: 640x480 @ 72 Hz valid mode
[   18.734095] udlfb: 640x480 @ 75 Hz valid mode
[   18.739999] udlfb: 800x600 @ 56 Hz valid mode
[   18.745913] udlfb: 800x600 @ 60 Hz valid mode
[   18.751971] udlfb: 800x600 @ 72 Hz valid mode
[   18.758089] udlfb: 800x600 @ 75 Hz valid mode
[   18.764069] udlfb: 1024x768 @ 60 Hz valid mode
[   18.770105] udlfb: 1024x768 @ 70 Hz valid mode
[   18.776165] udlfb: 1024x768 @ 75 Hz valid mode
[   18.782779] udlfb: Reallocating framebuffer. Addresses will change!
[   18.792289] udlfb: 1024x768 @ 60 Hz valid mode
[   18.792690] usbcore: registered new interface driver udl
[   18.806769] udlfb: set_par mode 1024x768
[   18.825659] udlfb: DisplayLink USB device /dev/fb1 attached. 1024x768 resolution. Using 3072K framebuffer me
mory

Open in new window

0
 
LVL 61

Expert Comment

by:gheist
ID: 40507259
I think i saw this machine already before on E-E
To get text console on other adapter you must disable poulsbo driver loading at boot, then let kernel initialize text console on usb adapter and let Xorg load poulsbo driver later.
by disabling i mean not making it via modprobe.d, most likely you need to remove poulsbo module from initrd, and add usb extender there. (just make sure to make a copy of current initrd and boot entry)
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40507722
> I think i saw this machine already before on E-E

Yes you did. I had it loaded with Ubuntu and we did successfully get the X display onto the display adapter. Now I'm looking to forget about X and just want the text console. I rarely use X on Linux, well, never in fact. Therefore, using the Xorg setup is not really where I want to go. Just plain 'ole text console. Seems like this should be easier than an X display, but I guess not. I have no idea what poulsbo is, but I'll investigate. I'm sure I'll be back with question.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 61

Expert Comment

by:gheist
ID: 40507799
Text console is on one framebuffer. You need to get rid of GMA500 kernel module for boot stage, then USB framebuffer will be used.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40514350
I find the following:
$ lsmod | grep -i gma500
gma500_gfx            149957  1
drm_kms_helper         31444  2 udl,gma500_gfx
drm                   192016  4 udl,drm_usb,drm_kms_helper,gma500_gfx
i2c_algo_bit            4575  1 gma500_gfx
i2c_core               18166  7 drm,i2c_isch,i2c_dev,drm_kms_helper,i2c_algo_bit,gma500_gfx,videodev
video                  10319  1 gma500_gfx

Open in new window


So, would blacklisting "gma500_gfx" do the trick?
0
 
LVL 61

Expert Comment

by:gheist
ID: 40514490
It turns out easy to blacklist on slackware:
http://docs.slackware.com/howtos:hardware:proprietary_graphics_drivers
(would be muuucchhh loongerr jooourneey on your old friend ubuntu)

yes, you blacklist gma500_gfx, default display comes up as 80x25 and boot should continue on framebuffer over USB (well in a perfect world at least)
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40515057
At last some progress! Blacklisting gma500_gfx did send the console output to the VGA, Yeah! Two problems though:

1. `setfont -C /dev/console` no longer works, so I can't change the console font.

2. Bigger problem: I must *always* have the displayLink VGA attached because the built-in display no longer shows console output after "Entering runlevel 3".

In fact, I did some more research and found this link: https://www.kernel.org/doc/Documentation/fb/fbcon.txt and tried the following setting in /etc/lilo.conf:

 append="nomodeset fbcon=map:1 vt.default_utf8=0"

... not blacklisting anything. That actually worked too AND I could set the console fonts.

Problem #2 still remains. Is there a way to:

a) set this boot parameter at boot time from the lilo boot menu? I've tried entering "Linux fbcon=map:1" at the "boot: " prompt, but no luck.

b) even better, can this be set *after* booting from the command line? That way I could choose whether or not to use the external VGA, or I could even put commands in rc.local to detect the presence of the displayLink and automatically use it if present, or not change the fbcon setting if not connected.

Ideas?
0
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
ID: 40515697
Since blacklisting is not needed - make 2 boot options. Easy with lilo, a bit harder with grub, rocket science with grub 2
Use most likely setup as default.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40515782
Hmmm, excellent idea. Before I totally mess up lilo.conf and have to boot from CD, please review my settings. Current lilo.conf is:
boot = /dev/sda
message = /boot/boot_message.txt
append="nomodeset fbcon=map:1 vt.default_utf8=0"
prompt
timeout = 600
vga = normal

image = /boot/vmlinuz
  root = /dev/sda1
  label = Linux
  read-only  # Partitions should be mounted read-only for checking

other = /dev/sda2
  label = Windows
  table = /dev/sda

Open in new window

Would I alter it as follows?
boot = /dev/sda
message = /boot/boot_message.txt
prompt
timeout = 600
vga = normal

image = /boot/vmlinuz
  append="nomodeset vt.default_utf8=0"
  root = /dev/sda1
  label = Linux
  read-only  # Partitions should be mounted read-only for checking

image = /boot/vmlinuz
  append="nomodeset fbcon=map:1 vt.default_utf8=0"
  root = /dev/sda1
  label = "Linux displayLink VGA"
  read-only  # Partitions should be mounted read-only for checking

other = /dev/sda2
  label = Windows
  table = /dev/sda

Open in new window

0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40516031
OK, I couldn't wait for your response so I went ahead and tried my suggested lilo.conf and thanfully, it worked! I can switch back and forth between built-in monitor and external VGA by selecting different boot "images".

One last question - is there a way after booting (e.g. from rc.local) to determine which frame buffer was selected at boot? I've looked for clues in /sys/class/vtconsole/, /sys/dev/char/29:*/, /usr/src/linux-3.14.24/Documentation/fb/framebuffer.txt, and /usr/src/linux-3.14.24/Documentation/console/console.txt, but no luck.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40516043
ls /sys/dev/ices/virtual/graphics ?
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40516095
Nope, that doesn't really tell me anything.

I've worked out a crude solution, but surely there must be something that tells me which frame buffer I'm using!!

Here's what I'm doing. In /etc/rc.d/rc.font I have the script shown below. Basically, I've determined that the VAIO built-in screen comes up in 200 column mode with boot parameters "nomodeset" and "vga = normal". When I boot the displayLink VGA "image" the console is 128 columns. I'd prefer a more technically robust method like examining something in /sys or /proc, but this seems to work.
#!/bin/sh

cols=`/usr/bin/stty -a | grep columns | awk 'BEGIN{RS=";"}{print $0}' | grep columns | awk '{print $2}'`

if [ "$cols" -eq 200 ]          # vaio default with nomodeset, vga = normal
then
    echo setting console font ter-132b.psf.gz
    setfont -C /dev/console ter-132b.psf.gz             # when using viao screen
else
    echo setting console font ter-122b.psf.gz
    setfont -C /dev/console ter-122b.psf.gz             # when using DisplayLink USB attached VGA
fi

Open in new window

I'll leave this open a bit longer in case you have a "Eureka!" moment and suddenly think of /proc or /sys file to examine or some command to run to really tell me which frambuffer.

Otherwise, I think we can stick a fork in this one!

As the E-E resident low-level Linux guru, you are invited to check out my next conundrum with this little time-consuming VAIO device: http://www.experts-exchange.com/OS/Linux/Q_28586311.html - closing the lid!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SCCM And Branchcache Server 1 35
Dual bridge protection 18 51
Car computer reset 4 52
Making a PC to access Bluetoothe devices 2 27
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now