WSXGA+ 1680x1050 Console Framebuffer Support?

(Perhaps I am simply missing a far, far, easier way to go about all this, but I can’t see any way of getting 1680x1050 to work using the regular vesa fb. If there is an easier way, I’d love to know. Does any one else have vty’s working at this resolution, and if so how?)

I appear to be on a quest for the Holy Grail of frame buffers. My goal is to be able to use 1680x1050 in the console as my monitor (HP w2207h) is persnickety when switching to any vty and does not adjust the signal, and so powers off. Sadness.

Enter uvesafb

I thought I’d just adapt the directions from spock’s devsite > uvesafb as this should be pretty easy really.

I’m running the 2.6.31.12-0.2-desktop and I see there is already a uvesafb module, but it seems this is pretty much useless unless you also build the user space v86d daemon which gets launched from initramfs. Without that I believe the module gets you nowhere.

And to compile v86d correctly, it needs compiled against klibc. So that means I need to build klibc.

klibc Build Fails

Ahh . . . and here is where it all goes wrong.

I can’t seam to get klibc to build against the newer kernel.

Trying to build klibc-1.5.15 (or earlier version) pretty much goes to hell with many undefined reference, etc. It appears klibc does not play nice with newer kernels, but I can’t find any patches really, nor packages for Suse - which is a bit surprising. I see some reference about have to re-symlink the asm directories in the kernel source, but from what I can tell that is really not the issue.

My plan was to build klibc, and also the klcc wrapper for gcc, so I could then configure v86d with --with-klibc, but I’m stuck it seems.

Has anyone built klibc on 2.6.31 successfully?

Other References

I also found this site pretty helpful with various uvesa issues in general, but the solutions for patching v86d did not help:

And just as a note, if anyone else tries to build klcc, note in the README that you have to either symlink a linux directory to your kernel source, or specify it with the option KLIBCKERNELSRC (see make help)

Here is the specific build error with klibc:



Callandor:~/klibc-1.5.9 # make                               
  GEN     klcc/klibc.config                                  
  GEN     klcc/klcc                                          
  HOSTCC  scripts/basic/fixdep                               
scripts/basic/fixdep.c: In function ‘traps’:                 
scripts/basic/fixdep.c:368: warning: dereferencing type-punned pointer will break strict-aliasing rules
scripts/basic/fixdep.c:370: warning: dereferencing type-punned pointer will break strict-aliasing rules
  KLIBCCC usr/klibc/__static_init.o                                                                    
  KLIBCCC usr/klibc/vsnprintf.o                                                                        
In file included from usr/klibc/../include/sys/types.h:15,                                             
                 from usr/klibc/../include/unistd.h:11,                                                
                 from usr/klibc/../include/stdio.h:11,                                                 
                 from usr/klibc/vsnprintf.c:13:                                                        
linux/include/linux/posix_types.h:47:29: error: asm/posix_types.h: No such file or directory           
In file included from usr/klibc/../include/unistd.h:11,                                                
                 from usr/klibc/../include/stdio.h:11,                                                 
                 from usr/klibc/vsnprintf.c:13:                                                        
usr/klibc/../include/sys/types.h:16:23: error: asm/types.h: No such file or directory                  
In file included from usr/klibc/../include/unistd.h:11,                                                
                 from usr/klibc/../include/stdio.h:11,                                                 
                 from usr/klibc/vsnprintf.c:13:                                                        
usr/klibc/../include/sys/types.h:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ino_t’
usr/klibc/../include/sys/types.h:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘mode_t’
usr/klibc/../include/sys/types.h:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘nlink_t’
usr/klibc/../include/sys/types.h:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘off_t’  
usr/klibc/../include/sys/types.h:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘loff_t’ 
usr/klibc/../include/sys/types.h:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pid_t’  
usr/klibc/../include/sys/types.h:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘daddr_t’
usr/klibc/../include/sys/types.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘suseconds_t’
usr/klibc/../include/sys/types.h:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uid_t’      
usr/klibc/../include/sys/types.h:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gid_t’      
usr/klibc/../include/sys/types.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fsid_t’     
usr/klibc/../include/sys/types.h:61: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘time_t’     
usr/klibc/../include/sys/types.h:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘clock_t’    
usr/klibc/../include/sys/types.h:71: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘caddr_t’    
In file included from usr/klibc/../include/sys/time.h:11,                                                        
                 from usr/klibc/../include/sys/select.h:9,                                                       
                 from usr/klibc/../include/unistd.h:12,                                                          
                 from usr/klibc/../include/stdio.h:11,                                                           
                 from usr/klibc/vsnprintf.c:13:                                                                  
linux/include/linux/time.h:15: error: expected specifier-qualifier-list before ‘__kernel_time_t’                 
linux/include/linux/time.h:21: error: expected specifier-qualifier-list before ‘__kernel_time_t’                 
In file included from usr/include/arch/i386/klibc/archsignal.h:99,                                               
                 from usr/klibc/../include/signal.h:14,                                                          
                 from usr/klibc/../include/sys/select.h:11,                                                      
                 from usr/klibc/../include/unistd.h:12,                                                          
                 from usr/klibc/../include/stdio.h:11,                                                           
                 from usr/klibc/vsnprintf.c:13:                                                                  
...
linux/include/asm-generic/signal.h:94: error: ‘__BITS_PER_LONG’ undeclared here (not in a function)              
linux/include/asm-generic/signal.h:95: error: conflicting types for ‘sigset_t’                                   
usr/include/arch/i386/klibc/archsignal.h:22: note: previous declaration of ‘sigset_t’ was here                   
In file included from usr/klibc/../include/signal.h:14,                                                          
                 from usr/klibc/../include/sys/select.h:11,                                                      
                 from usr/klibc/../include/unistd.h:12,                                                          
                 from usr/klibc/../include/stdio.h:11,                                                           
                 from usr/klibc/vsnprintf.c:13:                                                                  
usr/klibc/../include/unistd.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fork’          
usr/klibc/../include/unistd.h:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vfork’         
usr/klibc/../include/unistd.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getpid’        
usr/klibc/../include/unistd.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getpgid’       
usr/klibc/../include/unistd.h:21: warning: parameter names (without types) in function declaration               
usr/klibc/../include/unistd.h:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getppid’       
usr/klibc/../include/unistd.h:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getpgrp’       
usr/klibc/../include/unistd.h:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘setsid’        
usr/klibc/../include/unistd.h:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getsid’        
usr/klibc/../include/unistd.h:37: warning: parameter names (without types) in function declaration               
usr/klibc/../include/unistd.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getuid’        
usr/klibc/../include/unistd.h:39: warning: parameter names (without types) in function declaration               
usr/klibc/../include/unistd.h:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘geteuid’       
usr/klibc/../include/unistd.h:41: warning: parameter names (without types) in function declaration               
usr/klibc/../include/unistd.h:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getgid’        
usr/klibc/../include/unistd.h:43: warning: parameter names (without types) in function declaration               
usr/klibc/../include/unistd.h:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘getegid’       
usr/klibc/../include/unistd.h:45: error: expected declaration specifiers or ‘...’ before ‘gid_t’                 
usr/klibc/../include/unistd.h:46: warning: type defaults to ‘int’ in declaration of ‘gid_t’                      
usr/klibc/../include/unistd.h:46: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token                               
usr/klibc/../include/unistd.h:47: warning: parameter names (without types) in function declaration               
usr/klibc/../include/unistd.h:48: warning: parameter names (without types) in function declaration               
usr/klibc/../include/unistd.h:68: error: expected declaration specifiers or ‘...’ before ‘mode_t’                
usr/klibc/../include/unistd.h:69: error: expected declaration specifiers or ‘...’ before ‘mode_t’                
usr/klibc/../include/unistd.h:70: error: expected declaration specifiers or ‘...’ before ‘mode_t’                
usr/klibc/../include/unistd.h:93: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lseek’         
usr/klibc/../include/unistd.h:95: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘llseek’        
usr/klibc/../include/unistd.h:102: error: expected declaration specifiers or ‘...’ before ‘off_t’                
In file included from usr/klibc/vsnprintf.c:13:                                                                  
usr/klibc/../include/stdio.h:62: error: expected declaration specifiers or ‘...’ before ‘off_t’                  
usr/klibc/../include/stdio.h: In function ‘fseek’:                                                               
usr/klibc/../include/stdio.h:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lseek’          
usr/klibc/../include/stdio.h:64: warning: implicit declaration of function ‘lseek’                               
usr/klibc/../include/stdio.h:64: error: expected expression before ‘int’                                         
usr/klibc/../include/stdio.h:65: error: ‘__o’ undeclared (first use in this function)                            
usr/klibc/../include/stdio.h:65: error: (Each undeclared identifier is reported only once                        
usr/klibc/../include/stdio.h:65: error: for each function it appears in.)                                        
usr/klibc/../include/stdio.h:65: error: ‘off_t’ undeclared (first use in this function)                          
usr/klibc/../include/stdio.h: At top level:                                                                      
usr/klibc/../include/stdio.h:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ftell’          
make[2]: *** [usr/klibc/vsnprintf.o] Error 1                                                                     
make[1]: *** [all] Error 2                                                                                       
make: *** [klibc] Error 2                                           

Ahhh . . . well, part of the problem at least with compiling klibc was in fact the kernel source was missing the asm symlink I believe. I corrected it by running make prepare in the kernel source, then a make mrproper in klibc build directory and then make ran okay.

I also copied over the asm files:

cp -a /usr/src/linux/arch/x86/include/asm/* /usr/lib/klibc/include/asm/

And I also discovered the additional info for building klidc in usr/klibc/README.klibc

Now however, it errors with:


  KLIBCCC usr/klibc/mrand48.o
  KLIBCCC usr/klibc/nrand48.o
  KLIBCCC usr/klibc/srand48.o
  KLIBCCC usr/klibc/seed48.o
  KLIBCCC usr/klibc/inet/inet_ntoa.o
In file included from /root/klibc-1.5.18/usr/klibc/../include/netinet/in.h:11,
                 from /root/klibc-1.5.18/usr/klibc/../include/arpa/inet.h:11,
                 from usr/klibc/inet/inet_ntoa.c:6:
/root/klibc-1.5.18/usr/klibc/../include/sys/socket.h:146: error: redefinition of typedef ‘sa_family_t’
/root/klibc-1.5.18/linux/include/linux/socket.h:34: note: previous declaration of ‘sa_family_t’ was here
/root/klibc-1.5.18/usr/klibc/../include/sys/socket.h:147: error: redefinition of ‘struct sockaddr’
/root/klibc-1.5.18/usr/klibc/../include/sys/socket.h:152: error: redefinition of ‘struct msghdr’
make[2]: *** [usr/klibc/inet/inet_ntoa.o] Error 1
make[1]: *** [all] Error 2
make: *** [klibc] Error 2

And this one I don’t know how to work through.

Cheers,
LewsTherin

Mark W from the klibc development team was kind enough to help out. Apparently klibc needs built against 2.6.33, which did work for me, which is great.

Note that, for some reason, when you run make prepare in the 2.6.33 source tree it does not seem to create the required asm symlink, so make sure you manually symlink or klibc will fail to build:

Callandor:/usr/src/linux-2.6.31.12-0.2 # ls -ld include/asm
lrwxrwxrwx 1 root root 23 May 7 13:56 include/asm → …/arch/x86/include/asm

So far then, I’ve got klibc and klcc to work! After that I could compile v86d against klibc, no problem, so that is done too. Building a new kernel now and we will see if it works . . .

An interesting adventure. Please let us know how this works out.

I believe the newer kernels have better support, because I run the latest kernel from HEAD: on my desktop and I have my VTs set to 1400x1050 (I couldn’t find a mode setting to use the full 1920x1080 though).

Just change the vga= line at boot (permanently in /boot/grub/menu.lst) to a nice size, see here for a good explanation -

VESA BIOS Extensions - Wikipedia, the free encyclopedia

You can set it easily through Yast -> System -> Boot Loader. It has a drop down box of available modes.

I hope I’m talking about the same thing, if not then just ignore me :).

Hi Growbag,

Thank you for you suggestions.

The problem is that the framer buffer device used by the current Suse kernels has more limited support, so the resolutions that are available through the vga kernel boot parameter are just the vesa modes your card supports, and may not include all of them. That is where using the uvesa frame buffer comes it.

I did try the 2.6.34-desktop kernel from factory, but by default, it only supports the same resolutions. (Annoyingly, it actually support a resolution higher than my target of 160x1050, but not this one. Understandably I guess as WSXGA+ is a bit of a newer, wide screen aspect ratio resolution.)

Honestly, this all may be for naught, as my card may not be VESA 3.0 compliant, but in any event it is a fun and educational experiment, and an opportunity to learn more about klibc, uvesafb and such, so even if it does not work in the end, the journey is interesting.

Cheers,
Lews Therin

Just for the record: I never succeeded to get WSXGA+ 1680x1050 to run on 11.2 and abandoned my efforts after 3 days of trying every possible solution (yes, lots of googling).

What you are attempting is new to me. I really hope you succeed. Please keep us posted.