This is about an Advantech UNO-3074 computer that's used for light administrative tasks in a dusty workshop. It requires a 32 bit OS that is lightweight, so I installed Debian and LXDE.
Fixing the resolution
After installation the screen resolution seems to be stuck at 640x480 pixels. In the display configuration the only option is 640x480. The odd thing is that the grub screen seems to use a correct resolution. And initially during the boot sequence the resolution looks fine, but it changes half way so it looks like the hardware is ok, but something goes wrong during boot probably the automatic detection of settings.
Drivers and GPU support
First thing to do was to check whether the graphics card is supported and drivers are installed.
$ lspci -knn | grep -A5 VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 82852/855GM Integrated Graphics Device [8086:3582] (rev 02)
Subsystem: Intel Corporation 82852/855GM Integrated Graphics Device [8086:3582]
Kernel modules: i915
00:02.1 Display controller [0380]: Intel Corporation 2852/855GM Integrated Graphics Device [8086:3582] (rev 02)
Subsystem: Intel Corporation 82852/855GM Integrated Graphics Device [8086:3582]
Kernel modules: i915
This is an Intel card for which no proprietary drivers are available, however the standard driver does support the graphics card. The graphics drivers are installed correctly:
$ apt-cache policy xserver-xorg-video-intel
xserver-xorg-video-intel:
Installed: 2:2.99.917+git20210115-1
Checking xrandr
In X the graphics are handled by xrandr by default (rather than /etc/X11/xorg.conf on older systems). So I checked the available settings.
$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 640 x 480, maximum 640 x 480
default connected 640x480+0+0 0mm x 0mm
640x480 0.00*
This shows my screen and output (there's only one output on the computer, so I guess it's called default then), the resolution I was given and the error: "Failed to get size of gamma for output default".
I'm not sure if the error causes my problem, but it suggest a problem with hardware and I tried several suggestions to fix it by editing the grub configuration.
$ su
# nano /etc/default/grub
# export PATH=$PATH:/usr/sbin
# update-grub
There are several options I tried, most of which are nicely described in this how to. It warns about using acpi=off as it may result in some unwanted side-effects such as fans being turned off, but this computer is passively cooled. The suggestion to set GRUB_GFXMODE came from this topic.
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi=off"
GRUB_CMDLINE_LINUX_DEFAULT="quiet pnpbios=off"
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset acpi=off"
GRUB_CMDLINE_LINUX_DEFAULT="quiet pnpbios=off acpi=off nomodeset"
GRUB_GFXMODE=1920x1080
Neither of these made any difference, the resolution remained the same and xrandr kept showing the same error. I nevertheless tried to configure the resolution with xrandr at various kernel settings:
$ cvt 1920 1080
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
$ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr: Failed to get size of gamma for output default
$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 640 x 480, maximum 640 x 480
default connected 640x480+0+0 0mm x 0mm
640x480 0.00*
1920x1080_60.00 (0x558) 173.000MHz -HSync +VSync
h: width 1920 start 2048 end 2248 total 2576 skew 0 clock 67.16KHz
v: height 1080 start 1083 end 1088 total 1120 clock 59.96Hz
$ xrandr --addmode default "1920x1080_60.00"
xrandr: Failed to get size of gamma for output default
$ xrandr --output default --mode "1920x1080_60.00"
xrandr: Failed to get size of gamma for output default
xrandr: screen cannot be larger than 640x480 (desired size 1920x1080)
I always got the same result. Although the option 1920x1080 showed up in the display settings it would fall back to 640x480.
Trying other hardware
I came across one topic that mentioned problems when using a very specific cable setup. So I decided to switch the VGA-cable for another one that I had lying aroung but that didn't change anything. I then decided to switch from my Samsung Syncmaster S24B300 to the Samsung SyncMaster 214T I intend to use with the computer. On the new monitor the resolution default to 1600x1200 which is what I want.
Resolution problem "solved"
So switching monitors kind of solved my problem. However, xrandr still shows the same error and the resolution still seems to change during boot so these may not be related to the original problem. I think however that it lies somewhere in detecting the correct settings for the monitor, but I haven't attempted to get it working with the original monitor.
Other suggestions I didn't try
There are some suggestions (from Debian Bullseye) is to update the Kernell to 6.0 but in Debian 12.4 (Bookworm) uses that by default. Another suggestion I was to actually use /etc/X11/xorg.conf as it would be available as a back-up method, however I haven't tried it.
Kernell errors
When trying to fix the resolution problems some warnings were raised during boot that had to do with the kernell settings. The bootlog (and other logs can be read out with the following command
# dmesg
PnPBIOS
The following warning was raised on PnPBIOS. The PnPBIOS (Plug and Play BIOS) detects new hardware and allows the software to reach it. The system seems obsolete and replaced by ACPI. So I turned it off.
[ 0.480059] PnPBIOS: Scanning system for PnP BIOS support...
[ 0.480127] PnPBIOS: Found PnP BIOS installation structure at 0x(ptrval)
[ 0.480132] PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0xbc10, dseg 0xf0000
[ 0.480143] PNPBIOS fault.. attempting recovery.
[ 0.480221] PnPBIOS: Warning! Your PnP BIOS caused a fatal error. Attempting to continue
[ 0.480298] PnPBIOS: You may need to reboot with the "pnpbios=off" option to operate stably
[ 0.480371] PnPBIOS: Check with your vendor for an updated BIOS
[ 0.480441] PnPBIOS: dev_node_info: unexpected status 0x24
[ 0.480513] PnPBIOS: Unable to get node info. Aborting.
PM-Timer bug
dmesg shows a warning about the PM-Timer bug:
* The chipset may have PM-Timer Bug. Due to workarounds for a bug,
* this clock source is slow. If you are sure your timer does not have
* this bug, please use "acpi_pm_good" to disable the workaround
The PM-Timer bug appears to be a bug where a workaround requires to read the time three times, being slower than reading it once. There seem to be some programmes that can test for the bug. It can be solved by setting the clocksource kernell parameter. A description of some options is given here, some more information is available in the Red Hat reference guide. I decided to switch it to tsc.
ACPI
[ 0.018170] ACPI: Early table checksum verification disabled
[ 0.023621] ACPI BIOS Error (bug): A valid RSDP was not found (20220331/tbxfroot-210)
These don't seem to be serious bugs, mare like notificatioon messages. The latter one is just to acknowledge ACPI is turned off as it's not supported by the BIOS.
Conclusion on kernell settings
GRUB_CMDLINE_LINUX_DEFAULT="quiet pnpbios=off clocksource=tsc"
Services
As the machine is old, and slow shut down some unused services like the printer server (cups) and bluetooth.
# systemctl status cups
# systemctl --reverse list-dependencies cups
# systemctl disable cups
# systemctl disable cups-browsed
# systemctl disable bluetooth
To be continued...