Screen Rotation Problem

Good Morning Community!

I purchased the following PC Case, which comes with a built-in Screen, and I have been facing screen rotation problems. I am hoping for some light at the end of the tunnel :bulb:


JONSBO D41 MESH SC White with Screen
https://www.amazon.com/gp/product/B0BQJ5S99L/ref=ox_sc_act_title_1?smid=AJMV6UTEPZJ04&psc=1


KDE Display Configuration


GRUB Bootloader


BIOS


Moonlight using Sunshine.

I’ve attempted to use some resources, which include the following:
https://www.novaspirit.com/2020/03/23/peakago-linux-screen-rotation-fix/
https://www.baeldung.com/linux/find-device-drivers

When running udevadmin, the DRIVER value comes empty:

# udevadm info -a -n /dev/dri/card1
  looking at device '/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1':
    KERNEL=="card1"
    SUBSYSTEM=="drm"
    DRIVER==""
    ATTR{power/async}=="disabled"
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_kids}=="0"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_enabled}=="disabled"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"
    ATTR{power/runtime_usage}=="0"

I’m able to see the major and minor driver from /dev, but I’m worried that this might be the amdgpu driver and not the monitor driver:

# ls -l /dev/dri/card1
crw-rw----+ 1 root video 226, 1 Jul  7 08:02 /dev/dri/card1

Some of the goals I want to achieve:d

  • Have GRUB on the correct rotation.
  • Have lightdm on the correct rotation.
  • Have X11/Wayland logged sessions on the right rotation
  • Have sunshine/moonlight for remote gaming on the right rotation.
  • Bonus: American Megatrends/Asus bios on the right rotation, possibly?>

Additional information:

# cat /var/log/Xorg.0.log
[    16.486] (II) modeset(0): EDID for output HDMI-1
[    16.486] (II) modeset(0): Manufacturer: SGN  Model: 11c0  Serial#: 20221020
[    16.486] (II) modeset(0): Year: 2022  Week: 43
[    16.486] (II) modeset(0): EDID Version: 1.3
[    16.486] (II) modeset(0): Digital Display Input
[    16.486] (II) modeset(0): DFP 1.x compatible TMDS
[    16.486] (II) modeset(0): Max Image Size [cm]: horiz.: 17  vert.: 10
[    16.486] (II) modeset(0): Gamma: 2.20
[    16.486] (II) modeset(0): DPMS capabilities: StandBy Suspend Off
[    16.486] (II) modeset(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 
[    16.486] (II) modeset(0): First detailed timing is preferred mode
[    16.486] (II) modeset(0): redX: 0.628 redY: 0.331   greenX: 0.279 greenY: 0.551
[    16.486] (II) modeset(0): blueX: 0.140 blueY: 0.142   whiteX: 0.301 whiteY: 0.328
[    16.486] (II) modeset(0): Manufacturer's mask: 0
[    16.486] (II) modeset(0): Supported detailed timing:
[    16.486] (II) modeset(0): clock: 73.2 MHz   Image Size:  800 x 1280 mm
[    16.486] (II) modeset(0): h_active: 800  h_sync: 860  h_sync_end 876 h_blank_end 936 h_border: 0
[    16.486] (II) modeset(0): v_active: 1280  v_sync: 1290  v_sync_end 1294 v_blanking: 1304 v_border: 0
[    16.486] (II) modeset(0): Monitor name: L01N8A
[    16.486] (II) modeset(0): EDID (in hex):
[    16.486] (II) modeset(0): 	00ffffffffffff004ceec0115c8c3401
[    16.486] (II) modeset(0): 	2b20010381110a78eaf8d0a054478d23
[    16.486] (II) modeset(0): 	244d5400000001010101010101010101
[    16.486] (II) modeset(0): 	010101010101981c2088300018503c10
[    16.486] (II) modeset(0): 	a40020003500001e000000fc004c3031
[    16.486] (II) modeset(0): 	4e38410a202020202020000000000000
[    16.486] (II) modeset(0): 	00000000000000000000000000000010
[    16.486] (II) modeset(0): 	00000000000000000000000000000068
[    16.487] (II) modeset(0): Printing probed modes for output HDMI-1
[    16.487] (II) modeset(0): Modeline "800x1280"x60.0   73.20  800 860 876 936  1280 1290 1294 1304 +hsync +vsync (78.2 kHz eP)

# udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[1791.190768] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1 (drm)
UDEV  [1791.237540] change   /devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1 (drm)

According the manual you need a second display. And on MS Windows you need an additional tool (you need to pay for it) to setup this thing.

According your second screenshot, the display is following your settings of orientation when the OS is up. What happens when you chose to rotate it 90° in systemsettings?

See also here the hints regarding fbcon for the verbose boot messages when starting your machine:
https://www.reddit.com/r/mffpc/comments/1895zt2/how_to_rotate_jonsbo_d31d41_built_in_screen/

Hi @hui thanks for reaching out.
Leaving the bios rotation aside, I should’ve made a note, but yes - 90° displays the monitor correctly in the real world but not virtually, thus giving the wrong rotation on Moonlight for gameplay streaming.

This is not an issue with remote protocols like vnc. It mirrors the correct aspect ratio.

The built-in screen needs connected for sunshine to mirror the display for game streaming via moonlight. Sunshine is the server installed on openSUSE and Moonlight is the client on Android, macOS, etc. There are no options in sunshine to fix rotation leaving me with having to fix it at the os level.

I was attempting the following:
https://www.youtube.com/watch?v=DAovrIaZmb4
https://www.novaspirit.com/2020/03/23/peakago-linux-screen-rotation-fix/

But the main problem is that I can’t move further since the Driver value is empty, as described in the original post.

Would leaving it blank or using amdgpu be okay for writing the rule under /lib/udev/hwdb.d/61-sensor-local.hwdb or similar .hwdb?

Also, would it even be 61-sensor-local.hwdb since they are using debian based distributions, openSUSE does not have a /dev/iio path. I can’t and will not switch to a debian based distribution. All of my work requires an rpm distribution (Autodesk Maya, rpm builds, etc).

@mikeyjoel I’m on a Dell Venue 11 Pro 7130 vPro Tablet running MicroOS, but I see iio devices…

ls /dev/ii*

/dev/iio:device0  /dev/iio:device1  /dev/iio:device2  /dev/iio:device3  /dev/iio:device4  /dev/iio:device5

lsmod |grep iio

hid_sensor_iio_common    20480  7 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_incl_3d,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
hid_sensor_hub         32768  9 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_iio_common,hid_sensor_incl_3d,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation,hid_sensor_custom

Upload full output of

udevadm info --export-db

to https://paste.opensuse.org/

Hi @malcolmlewis ! thanks for reaching out. Sadly I don’t have this. Could it be that its only available on tablets and not desktops? The monitor connects via HDMI via the external amdgpu.

Here full information:

sh-5.2# cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20240704"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20240704"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
# CPE 2.3 format, boo#1217921
CPE_NAME="cpe:2.3:o:opensuse:tumbleweed:20240704:*:*:*:*:*:*:*"
#CPE 2.2 format
#CPE_NAME="cpe:/o:opensuse:tumbleweed:20240704"
BUG_REPORT_URL="https://bugzilla.opensuse.org"
SUPPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
LOGO="distributor-logo-Tumbleweed"
sh-5.2# screenfetch
             .;ldkO0000Okdl;.                root@box-workstation
         .;d00xl:^''''''^:ok00d;.            OS: openSUSE 20240704
       .d00l'                'o00d.          Kernel: x86_64 Linux 6.9.7-1-default
     .d0K^'  Okxoc;:,.          ^O0d.        Uptime: 5h 45m
    .OVVAK0kOKKKKKKKKKKOxo:,      lKO.       Packages: 4332
   ,0VVAKKKKKKKKKKKKK0P^,,,^dx:    ;00,      Shell: sh
  .OVVAKKKKKKKKKKKKKk'.oOPPb.'0k.   cKO.     Disk: 11T / 24T (46%)
  :KVAKKKKKKKKKKKKKK: kKx..dd lKd   'OK:     CPU: Intel Core i9-9900K @ 16x 5GHz [41.0°C]
  lKlKKKKKKKKKOx0KKKd ^0KKKO' kKKc   lKl     GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 32 [Radeon RX 7700 XT / 7800 XT] (rev c8)
  lKlKKKKKKKKKK;.;oOKx,..^..;kKKK0.  lKl     RAM: 5109MiB / 32008MiB
  :KAlKKKKKKKKK0o;...^cdxxOK0O/^^'  .0K:    
   kKAVKKKKKKKKKKKK0x;,,......,;od  lKP     
   '0KAVKKKKKKKKKKKKKKKKKK00KKOo^  c00'     
    'kKAVOxddxkOO00000Okxoc;''   .dKV'      
      l0Ko.                    .c00l'       
       'l0Kk:.              .;xK0l'         
          'lkK0xc;:,,,,:;odO0kl'            
              '^:ldxkkkkxdl:^'         
sh-5.2# ls /dev/ii*
ls: cannot access '/dev/ii*': No such file or directory

@arvidjaar Thanks for reaching out! Here you go:
https://paste.opensuse.org/pastes/218dabdc0950

xrandr

Screen 0: minimum 16 x 16, current 1280 x 800, maximum 32767 x 32767
HDMI-A-1 connected primary 1280x800+0+0 left (normal left inverted right x axis y axis) 800mm x 1280mm
   800x1280      59.93*+

Let me know if you need anything else.

@mikeyjoel If it’s external then I would expect xrandr --rotate right to rotate clockwise, since it looks like your on X11?

I’m actually on Wayland for this specific machine. If running xrandr on x11 we get a slightly different output.

xrandr on x11

Screen 0: minimum 320 x 200, current 1280 x 800, maximum 16384 x 16384
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected primary 1280x800+0+0 left (normal left inverted right x axis y axis) 800mm x 1280mm
   800x1280      59.97*+

Doing xrandr --output HDMI-1 --rotate normal provides:


With xrandr --output HDMI-1 --rotate left results in the correct position in the physical world but not virtually:


I’ve also attempted to create a conf file for X11, which provides the same result as xrandr:

# cat /etc/X11/xorg.conf.d/10-monitors.conf
Section "Monitor"
        Identifier "HDMI-1"
        Option "PreferredMode" "1280x800"
        Option "DPMS" "true"
        Option "Rotate" "left"
EndSection

Trust me, I’m trying hard :sob:

@mikeyjoel ah, ok, so use arandr then

@mikeyjoel another thought, there is nothing in the system BIOS about screen rotation?

@mikeyjoel I also note that the screen is removable, so are there some controls for it that can change the orientation

Hi, @malcolmlewis, Thanks for these directions.

I dug into the BIOS, along with the manual and some research online, and am reviewing it again after your advice.

There are no options for changing the screen rotations. Only options are for selecting if the graphics adapter that I want to use are the CPU built in or my dedicate graphics via PCI-E and the speeds for it.

$ sudo demidecode -t 2
# dmidecode 3.6
Getting SMBIOS data from sysfs.
SMBIOS 3.2.1 present.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: ROG STRIX Z390-I GAMING
        Version: Rev X.0x
        Serial Number: 180835233601485
        Asset Tag: Default string
        Features:
                Board is a hosting board
                Board is replaceable
        Location In Chassis: Default string
        Chassis Handle: 0x0003
        Type: Motherboard
        Contained Object Handles: 0
$ sudo demidecode -t bios
# dmidecode 3.6
Getting SMBIOS data from sysfs.
SMBIOS 3.2.1 present.

Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
        Vendor: American Megatrends Inc.
        Version: 2812
        Release Date: 10/12/2020
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 16 MB
        Characteristics:
                PCI is supported
                APM is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                BIOS ROM is socketed
                EDD is supported
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
                UEFI is supported
        BIOS Revision: 5.13

Screen Pictures:


Here the back of the LCD after removal.

Mini HDMI and USB-C Female connectors on the LCD Screen.

Power and brightness buttons on the side of the LCD.

LCD Slot after removal on the PC Case.

Bios Pictures:





As for arandr, it seems like a front end for the xrandr cli, thus re-creating the same effect as if I were using regular xrandr on the command line.

$ sudo zypper search arandr
S  | Name                           | Summary                                                      | Type
---+--------------------------------+--------------------------------------------------------------+--------
i+ | arandr                         | Visual Front End for XRandR                                  | package

@hui I’m going to sit down now regarding the fbcon discussion on reddit (I also replied and shared this post there just in case anyone wants to shed some light into this).

Kernel Level Mastery it is! Let’s get dirty :disguised_face:

First steps taken so far have been to check whether or not KMS is enabled which it is assumed to be enabled on Intel, AMD and nouveau type of GPU builds so I have no issues with with KMS (please confirm). I even went down in history lane memory for when SUSE first implemented fbcon :sweat_smile:

Resources:
https://superuser.com/questions/223094/how-do-i-know-if-i-have-kms-enabled#comment1711130_229224
https://wiki.archlinux.org/title/kernel_mode_setting
https://www.phoronix.com/news/Linux-Bootsplash-FB-Over-DRM

dmesg | grep modesetting
[    3.904372] [    T518] [drm] amdgpu kernel modesetting enabled.
[    3.904731] [    T518] [drm] initializing kernel modesetting (IP DISCOVERY 0x1002:0x747E 0x1DA2:0x475A 0xC8).

I will proceed replacing my current nvme storage so I don’t mess up my working install while attempting all this and get back to this post with results.

Please post any other findings you might find useful/supportive while I experiment on my end.

@mikeyjoel so no sort of monitor menu from those buttons, as in pressing the power button after it powers on? What if you plug the hdmi into a laptop or other system, is the orientation correct?

Update: The following statement cannot be more true after crack opening regardless of warranty. The ROM for the monitor itself was setup at factory 800x1280 instead of 1280x800.

I don’t have the original firmware for this nor could I find it anywhere. Might have to bring this up at one of the homebrew monitor forums to bring some monitor gurus up to speed to see if this can be modified.

Temporary solution for now that worked out of the 3 different dummy dongles I purchased : https://www.amazon.com/dp/B0B5TMXLY5?psc=1&ref=ppx_yo2ov_dt_b_product_details

Set this bad puppy up and you should be good to go once sunshine has been setup for gamestreaming from that particular dummy display.

Thank you everyone that contributed to this post. Have a great weekend!

Oh, and stay safe from Crowdstrike :joy:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.