Choose style:

Author Topic: Setting remote viewing resolution headless install  (Read 1446 times)

0 Members and 1 Guest are viewing this topic.

Offline tchenier

  • nOOb
  • *
  • Posts: 5
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Setting remote viewing resolution headless install
« on: February 13, 2018, 04:27:12 pm »

How would I set default resolution without an attached monitor?
I am setting up for remote desktop into an Intel NUC.  No monitor attached, AnyDesk software
I have been reading through xrandr and playing with ARAndR, but cannot figure out how to configure my resolution outside of setting a resolution for an attached monitor.  AnyDesk software takes off of the resolution on the monitor.

my system (with monitor attached):
Code: [Select]
System:    Host: itadmin-desktop Kernel: 4.13.0-32-generic x86_64 (64 bit)
           Desktop: N/A Distro: Peppermint Eight
Machine:   Mobo: Intel model: NUC5CPYB v: H61145-408
           Bios: Intel v: PYBSWCEL.86A.0057.2016.1012.1134 date: 10/12/2016
CPU:       Dual core Intel Celeron N3050 (-MCP-) cache: 1024 KB
           clock speeds: max: 2160 MHz 1: 1600 MHz 2: 1600 MHz
Graphics:  Card: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller
           Display Server: X.Org 1.19.5 drivers: (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.00hz
           GLX Renderer: Mesa DRI Intel HD Graphics 400 (Braswell)
           GLX Version: 3.0 Mesa 17.0.2
Audio:     Card Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.13.0-32-generic
Network:   Card-1: Intel Wireless 3165 driver: iwlwifi
           IF: wlp2s0 state: down mac: <filter>
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169
           IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 500.1GB (2.0% used)
           ID-1: /dev/sda model: WDC_WD5000BEVT size: 500.1GB
Partition: ID-1: / size: 455G used: 5.8G (2%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 4.21GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 41.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 161 Uptime: 29 min Memory: 393.6/3864.5MB
           Client: Shell (bash) inxi: 2.2.35

Here is output from xrandr followed by some failed attempts to change screen 0 resolution (Yeah, I'm green at any xrandr stuff)
Code: [Select]

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
DP-1 disconnected primary (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 476mm x 268mm
   1920x1080     60.00*+  50.00    50.00    59.94 
   1680x1050     59.88 
   1600x900      60.00 
   1280x1024     60.02 
   1440x900      59.90 
   1280x800      59.91 
   1280x720      60.00    50.00    59.94 
   1024x768      60.00 
   800x600       60.32 
   720x576       50.00 
   720x480       60.00    59.94 
   640x480       60.00    59.94 
   720x400       70.08 
itadmin@itadmin-desktop ~ $ xrandr --output Screen0 --mode 1680x1050
warning: output Screen0 not found; ignoring
itadmin@itadmin-desktop ~ $ sudo xrandr --output Screen0 --mode 1680x1050
[sudo] password for itadmin:
warning: output Screen0 not found; ignoring
itadmin@itadmin-desktop ~ $ sudo xrandr --output Screen 0 --mode 1680x1050

Problem is when I disconnect the monitor and want to change screen resolution.
AnyDesk does not allow me to set monitor

Offline tchenier

  • nOOb
  • *
  • Posts: 5
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: Setting remote viewing resolution headless install
« Reply #1 on: February 13, 2018, 04:33:49 pm »
And none of the Peppermint Apps seem to help in doing so:
Monitor Settings does not open (no monitor?)
ARandR gives me an error and makes my resolution worse when I try to apply a config from when I had the monitor attached.

Output without the monitor attached:
Code: [Select]
 itadmin@itadmin-desktop ~ $ inxi -Fz
System:    Host: itadmin-desktop Kernel: 4.13.0-32-generic x86_64 (64 bit)
           Desktop: N/A Distro: Peppermint Eight
Machine:   Mobo: Intel model: NUC5CPYB v: H61145-408
           Bios: Intel v: PYBSWCEL.86A.0057.2016.1012.1134 date: 10/12/2016
CPU:       Dual core Intel Celeron N3050 (-MCP-) cache: 1024 KB
           clock speeds: max: 2160 MHz 1: 1600 MHz 2: 1600 MHz
Graphics:  Card: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller
           Display Server: X.Org 1.19.5 drivers: (unloaded: fbdev,vesa)
           Resolution: 1024x768
           GLX Renderer: Mesa DRI Intel HD Graphics 400 (Braswell)
           GLX Version: 3.0 Mesa 17.0.2
Audio:     Card Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.13.0-32-generic
Network:   Card-1: Intel Wireless 3165 driver: iwlwifi
           IF: wlp2s0 state: down mac: <filter>
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169
           IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 500.1GB (2.0% used)
           ID-1: /dev/sda model: WDC_WD5000BEVT size: 500.1GB
Partition: ID-1: / size: 455G used: 5.8G (2%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 4.21GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 45.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 152 Uptime: 7 min Memory: 305.7/3864.5MB
           Client: Shell (bash) inxi: 2.2.35

Code: [Select]
itadmin@itadmin-desktop ~ $ xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
DP-1 disconnected primary (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)

What I think I want is to be able to set the current Screen 0 resolution, but maybe I'm going about this wrong.

Offline murraymint

  • Trusted User
  • Veteran
  • *****
  • Posts: 1964
  • Karma: 341
  • soft boiled with a yolk of gold
    • View Profile
  • Peppermint version(s): 7, 8, 9
Re: Setting remote viewing resolution headless install
« Reply #2 on: February 13, 2018, 04:58:26 pm »
There's a space between Screen and 0. Could it be that? Oh, I see you tried that in the end.

NoMachine is a good piece of software. You shouldn't have this problem using it.
« Last Edit: February 13, 2018, 05:00:45 pm by murraymint »

Offline tchenier

  • nOOb
  • *
  • Posts: 5
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: Setting remote viewing resolution headless install
« Reply #3 on: February 13, 2018, 05:54:24 pm »
I need to enter this machine behind a carrier grade NAT.  If I am able to negotiate a 1:1 NAT and public IP or even port forwarding, I could use NoMachine, but don't believe that is an option otherwise.  In semi-rural Peru, so not sure what I'll be able to do when I get there.  So hoping to solve the resolution problem.  Tried a number of other solutions and either too pricey for this project or no Linux port or too slow with what I've tried.  Liked Chrome remote desktop, but it is being depreciated and seems to want user input from time to time on remote machine anyway.  Thanks for the suggestion.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25725
  • Karma: 2822
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Setting remote viewing resolution headless install
« Reply #4 on: February 13, 2018, 05:56:23 pm »
Hi tchenier, and welcome to the forum :)

Maybe this will work (it should)....

You can extract the monitors Extended Display Identification Data (EDID) to a binary firmware file, then tell the kernels Direct Rendering Manager Kernel Mode Setting 'helper' module to load that firmware file at bootup .. so hopefully the system should think the monitor is attached even if it isn't.

So attach the monitor, and run:
Code: [Select]
sudo apt-get install read-edid
then:
Code: [Select]
sudo get-edid > ~/Desktop/my_edid.bin
hopefully you'll now have a file called my_edid.bin on your desktop.

Create a directory to put it in:
Code: [Select]
sudo mkdir -p /lib/firmware/edid
and move the file there:
Code: [Select]
sudo mv -v ~/Desktop/my_edid.bin /lib/firmware/edid/
and make sure it's owned by root:
Code: [Select]
sudo chown root:root /lib/firmware/edid/my_edid.bin
Now you need to tell the kernels DRM KMS helper module (drm_kms_helper) to load that firmware file at boot...

Run:
Code: [Select]
sudo xed /etc/default/grub
find the line that reads:-
Code: [Select]
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
and change it to:-
Code: [Select]
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm_kms_helper.edid_firmware=edid/my_edid.bin"
SAVE the file and exit the text editor.

Back in the terminal run:
Code: [Select]
sudo update-grub
REBOOT without the monitor .. test the remote desktop.



Further info can be found at these 2 links
https://askubuntu.com/questions/81370/how-to-create-extract-the-edid-for-from-a-monitor
and
https://wiki.archlinux.org/index.php/kernel_mode_setting#Forcing_modes_and_EDID



I remember years back having to extract a couple of monitors EDID in Windows, convert them to a format Linux understands, and load it at boot .. at that time Linux wasn't detecting those particular monitors but Windows was.

And here's one emegra and I did earlier (for a different reason):
https://linuxforums.org.uk/index.php?topic=12176.0
« Last Edit: February 14, 2018, 02:34:55 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline tchenier

  • nOOb
  • *
  • Posts: 5
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: Setting remote viewing resolution headless install
« Reply #5 on: February 14, 2018, 02:31:56 pm »
Thank you for your help!  But no luck yet.  I still come up with 1024x768 with xrandr giving the same output as before. 
(your mkdir command had a typo with the option in front for anyone else following, otherwise all commands did what they should have it seems, but no result)
I'm pressed for time at the moment, so haven't gone through the other links you gave at the bottom.  Will do so asap.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25725
  • Karma: 2822
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Setting remote viewing resolution headless install
« Reply #6 on: February 14, 2018, 02:36:19 pm »
Can you reattach the monitor and post the output from:
Code: [Select]
parse-edid /lib/firmware/edid/my_edid.bin
?



I've also fixed the command above :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline tchenier

  • nOOb
  • *
  • Posts: 5
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: Setting remote viewing resolution headless install
« Reply #7 on: February 16, 2018, 02:19:44 pm »
I definitely will when I return home next Wednesday!   (doing a little r&r in Colorado)   8)