Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HDMI output port management
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 215

PostPosted: Sun Oct 21, 2018 10:46 pm    Post subject: HDMI output port management Reply with quote

I am looking for a way to manage my HDMI port on my laptop. The features I am looking for are:

1) Swapping the audio source from the speakers to the HDMI output and vice versa when a HDMI source is plugged in
2) Setting the output resolution to that of the maximum supported by the external hardware while maintaining the original resolution on the laptops screen
3) Automatically doing all this so I don't need to manually play with this stuff any more

For a while now 1) was achieved via me editing the /etc/asound.conf alsa uses to switch from card 0 device 0 to what ever my laptops HDMI port was assigned to at the time. I want to automate this.

Next 2) has always been an issue. When ever I issue the `xrandr --output HDMI1 --auto` command it outputs to the TV/monitor as 1080p, but there are distortions on the screen and apps will not full screen due to the laptops resolution being 1280x768. The app will full screen to the laptops monitor, but the TV will only display the full screen application in the upper left corner and have distortions to fill the rest of the screen. I am after having the app fill my monitor, but upscale the display to fill the entire 1080p+ TV/monitor.

Is there a way/application to seamlessly automate the audio switching and properly upscale my laptops display to fill the external sources screen? Afterwards reverse the changes when the HDMI source is removed from the port.

Thanks
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 215

PostPosted: Mon Oct 22, 2018 5:56 pm    Post subject: Reply with quote

So I've found some of my old scripts that I've written but I am not quite happy with the outcomes.

Code:
function enable-hdmi () { xrandr --output LVDS1 --auto --output HDMI1 --auto --right-of LVDS1 ; }


This creates a new monitor at 1080p which looks crisp and sharp, but I3 dedicates a virtual workspace to it rather than cloning my current monitor/display. This means I would have to switch to this virtual workspace if I wanted to display something on that monitor. Likewise I can't see this monitor on my laptops screen, which sucks for presentations.

Code:
xrandr --output LVDS1 --mode 1366x768 --scale 1x1 --output HDMI1 --same-as LVDS1 --mode 1920x1080 --scale 0.711x0.711
#Below seems to be the same thing as above, just less verbose. Still blurry though compared to the above command
#xrandr --output HDMI1 --auto --scale-from 1366x768


Off of google this clones my display, but it is no where near as crisp and is fairly fuzzy/blurry. Everything seems larger compared to the first command. Without the scale option the TV only displays my monitor in the upper left corner and then surrounds it with distortions.

Is there a way to get the crispness of the first command while cloning what I see on my laptop to the TV?

Likewise I am still looking for a way to automate this when a HDMI device is plugged in. I feel that udev might be able to help here, but I've never used it before.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum