radeonkms - sometimes the colors are wrong when the screen unblanks

tingo

Daemon

Reaction score: 402
Messages: 2,064

I wonder if anyone else has seen this bug: sometimes when the screen unblanks the colors are all wrong.
Examples of wrong colors:
normal colors for comparison:
apologies for the poor quality - pictures where taken with a mobile phone.
Also, they were too big to attach here, and I didn't want to resize them and make them even crappier.

Details - this workstation runs FreeBSD 11.3-release:
Code:
tingo@kg-core2$ freebsd-version -ku
11.3-RELEASE-p1
11.3-RELEASE-p1
kernel
Code:
tingo@kg-core2$ uname -a
FreeBSD kg-core2.kg4.no 11.3-RELEASE-p1 FreeBSD 11.3-RELEASE-p1 #0: Tue Jul 23 18:21:16 UTC 2019
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
the drm packages are
Code:
root@kg-core2# pkg info drm*
drm-fbsd11.2-kmod-4.11g20190424
drm-kmod-g20190710
the graphics card is a MSI R5 230 2GD3H LP, which is identified like this
Code:
root@kg-core2# pciconf -lv | grep -B 4 VGA
vgapci0@pci0:7:0:0:    class=0x030000 card=0x80991462 chip=0x677b1002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Caicos PRO [Radeon HD 7450]'
    class      = display
    subclass   = VGA
when the bug appears the screen is unusable (too hard to read text), but if I wait until the screen blanks again and then press a key to unblank it the normal colors are back.
I see this bug on two different machines, connected to two different monitors (the other machine have a MSI Radeon R5 230 1GB DDR3 graphics card) so I don't think it is a hardware bug. It has happened for a while, both on FreeBSD 11.2 and 11.3, with several versions of drm-kmod.
Also:
- no messages related to this in logs
- if I take a screenshot when the wrong colors are showing, the screenshot shows normal colors

I tried looking for bugs related to this, but couldn't find any.
 

Phishfry

Son of Beastie

Reaction score: 1,424
Messages: 4,208

sometimes when the screen unblanks the colors are all wrong.
Possible Supend States?
Xfce Power Manager settings for system sleep mode??(Hibernate versus Suspend) ie. eliminate Suspend as culprit.

I am using laptops for my desktop env and I have been using stock Intel DRM driver with no issues on Xfce
Recently picked up a HP 8470p with Radeon and it seems fine too. Limited time with it though.
 

Phishfry

Son of Beastie

Reaction score: 1,424
Messages: 4,208

I just checked my Radeon laptop with Suspend and Hibernate and it woke fine.

Code:
vgapci0@pci0:1:0:0:    class=0x030000 card=0x179d103c chip=0x68411002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Thames [Radeon HD 7550M/7570M/7650M]'
    class      = display
    subclass   = VGA
The Xfce Power Manager is not installed by default sysutils/xfce4-power-manager
 
OP
OP
T

tingo

Daemon

Reaction score: 402
Messages: 2,064

Well, no Xfce Power Manager installed here. These are the xfce4* packages installed
Code:
root@kg-core2# pkg info xfce4*
xfce4-appfinder-4.12.0_1
xfce4-conf-4.12.1
xfce4-cpugraph-plugin-1.1.0
xfce4-datetime-plugin-0.7.0
xfce4-desktop-4.12.5
xfce4-mixer-4.11.0_4
xfce4-netload-plugin-1.3.1
xfce4-notifyd-0.4.4
xfce4-panel-4.12.2
xfce4-screenshooter-plugin-1.9.5
xfce4-session-4.12.1_6
xfce4-settings-4.12.4_3
xfce4-systemload-plugin-1.2.2_1
xfce4-terminal-0.8.8
xfce4-tumbler-0.2.6
xfce4-weather-plugin-0.9.1
xfce4-wm-4.12.5_1
and (for good measure) this is what xset reports
Code:
tingo@kg-core2$ xset q
Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000002
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    on     02: Scroll Lock: off
    03: Shift Lock:  off    04: Group 2:     off    05: Mouse Keys:  off
  auto repeat delay:  500    repeat rate:  20
  auto repeating keys:  00feffffdffffbbf
                        fadfffffffdfe5ef
                        ffffffffffffffff
                        ffffffffffffffff
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  600    cycle:  600
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffffff
Font Path:
  /usr/local/share/fonts/misc/,/usr/local/share/fonts/TTF/,/usr/local/share/fonts/OTF/,/usr/local/share/fonts/100dpi/,/usr/local/share/fonts/75dpi/,built-ins
DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Enabled
  Monitor is On
Font cache:
  Server does not have the FontCache Extension
 
OP
OP
T

tingo

Daemon

Reaction score: 402
Messages: 2,064

Since this is a workstation, I don't use suspend / hibernate, the only thing that happens is that DPMS turns off the monitor.
Anyway, updated packages, problem remains. Relevant packages
Code:
root@kg-core2# pkg info drm* gpu*
drm-fbsd11.2-kmod-4.11g20190806
drm-kmod-g20190710
gpu-firmware-kmod-g20190825
 

Phishfry

Son of Beastie

Reaction score: 1,424
Messages: 4,208

Sounds similar to these:

Any messages in logs like this:
*ERROR* Could not force DPM to low

Alot of these problems seem to be based around 'Display Port' monitor connections. What are you using?
UEFI or Legacy BIOS? VT or SC ?
 
OP
OP
T

tingo

Daemon

Reaction score: 402
Messages: 2,064

- no error messages like the one you have shown in any logs, in fact no error messages related to DPM at all.
- the machine uses the VGA connector output
Code:
tingo@kg-core2$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
HDMI-1 disconnected (normal left inverted right x axis y axis)
DVI-D-1 disconnected (normal left inverted right x axis y axis)
VGA-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 298mm
   1920x1080     60.00*+
   1680x1050     59.95
   1400x1050     74.76    59.98
   1600x900      60.00
   1280x1024     75.02    60.02
   1280x960      60.00
   1280x800      59.81
   1152x864      75.00
   1280x720      60.00
   1024x768      75.05    60.04    75.03    70.07    60.00
   960x720       75.00    60.00
   928x696       75.00    60.05
   896x672       75.05    60.01
   832x624       74.55
   800x600       75.00    70.00    65.00    60.00    72.19    75.00    60.32    56.25
   700x525       74.76    59.98
   640x512       75.02    60.02
   640x480       60.00    75.00    72.81    75.00    59.94
   720x400       70.08
   576x432       75.00
   512x384       75.03    70.07    60.00
   416x312       74.66
   400x300       72.19    75.12    60.32    56.34
   320x240       72.81    75.00    60.05
- UEFI
Code:
root@kg-core2# efibootmgr
BootCurrent: 0001
Timeout : 1 seconds
BootOrder : 0001, 0002, 0004
Boot0004* Hard Drive BBS(HD,,0x0)
Boot0002* UEFI OS HD(4,GPT,ca7624c9-6c2a-11e9-9be5-b42e991fc5a7,0x8664028,0x64000)/File(\EFI\BOOT\BOOTX64.EFI)
                      ada0p4:/EFI/BOOT/BOOTX64.EFI (null)
Boot0001* UEFI OS HD(1,GPT,689dead3-5e35-11e9-9582-b42e991fc5a7,0x28,0x64000)/File(\EFI\BOOT\BOOTX64.EFI)
                      ada0p1:/EFI/BOOT/BOOTX64.EFI (null)
- and VT
Code:
root@kg-core2# dmesg | grep vga
VT(vga): resolution 640x480
vtvga0: <VT VGA driver> on motherboard
vgapci0: <VGA-compatible display> port 0xe000-0xe0ff mem 0xe0000000-0xefffffff,0xfce20000-0xfce3ffff irq 54 at device 0.0 on pci7
vgapci0: Boot video device
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
VT: Replacing driver "vga" with new "fb".
VT(vga): resolution 640x480
vtvga0: <VT VGA driver> on motherboard
vgapci0: <VGA-compatible display> port 0xe000-0xe0ff mem 0xe0000000-0xefffffff,0xfce20000-0xfce3ffff irq 54 at device 0.0 on pci7
vgapci0: Boot video device
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
VT: Replacing driver "vga" with new "fb".
I'll try that xset force off trick next time
 
OP
OP
T

tingo

Daemon

Reaction score: 402
Messages: 2,064

Colors were wrong again this morning. Luckily, I had prepared a terminal window (when colors are wrong text in terminal windows is unreadable too). This workaround
Code:
tingo@kg-core2$  xset dpms force off ; sleep 0.1; xset dpms force on
tingo@kg-core2$  xset dpms force off ; sleep 0.1; xset dpms force on
got the colors back - no need to wait for automatic DPMS to kick in.
 
Top